Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8330846: Add stacks of mounted virtual threads to the HotSpot thread dump #19482

Closed
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1a75277
8330846: Add stacks of mounted virtual threads to the HotSpot thread …
txominpelu May 30, 2024
ae690b2
Remove duplicated Carrying statement and indent vthread stack
txominpelu Jun 3, 2024
47d7746
Merge remote-tracking branch 'upstream/master' into txominpelu_833084…
txominpelu Jun 3, 2024
76e6e58
Add missing header
txominpelu Jun 3, 2024
59b18db
Use JavaThread::print_vthread_stack_on
txominpelu Jun 3, 2024
12a41a5
Update test/hotspot/jtreg/serviceability/dcmd/thread/PrintVirtualThre…
txominpelu Jun 3, 2024
6a3b779
Add indentation for virtual thread stack
txominpelu Jun 3, 2024
9acbf29
Print mounted virtual thread after carrier
txominpelu Jun 3, 2024
e619320
Fix copyright year
txominpelu Jun 4, 2024
b122cc0
Cleanup test
txominpelu Jun 4, 2024
2cc4ba1
Remove extra indentation (leave it for the next PR)
txominpelu Jun 4, 2024
7a57d05
Remove dead code
txominpelu Jun 4, 2024
a483113
Incorporate @tstuefe's remarks
txominpelu Jun 4, 2024
a97184c
Include virtual thread name in output
txominpelu Jun 4, 2024
ba3385a
Merge remote-tracking branch 'upstream/master' into txominpelu_833084…
txominpelu Jun 10, 2024
b1e61b2
Rename test
txominpelu Jun 11, 2024
9591b28
Incorporate Alan's suggestions
txominpelu Jun 11, 2024
69b7ec0
Require continuations to run the test
txominpelu Jun 11, 2024
05d861c
Test fixes: pass to junit, avoid spinning thread on fail
txominpelu Jun 12, 2024
4d6a8cc
Fix scope of the try block
txominpelu Jun 12, 2024
e2b8551
Remove unneeded line
txominpelu Jun 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/hotspot/share/runtime/javaThread.cpp
Original file line number Diff line number Diff line change
@@ -1825,11 +1825,6 @@ void JavaThread::print_vthread_stack_on(outputStream* st) {
}
if (f->is_java_frame()) {
javaVFrame* jvf = javaVFrame::cast(f);
int indentation = st->indentation();
while(indentation > 0) {
st->print("\t");
indentation--;
}
java_lang_Throwable::print_stack_element(st, jvf->method(), jvf->bci());

// Print out lock information
4 changes: 1 addition & 3 deletions src/hotspot/share/runtime/threads.cpp
Original file line number Diff line number Diff line change
@@ -1333,10 +1333,8 @@ void Threads::print_on(outputStream* st, bool print_stacks,
if (p->is_vthread_mounted()) {
oop vt = p->vthread();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! I've fixed that in: a483113

assert(vt != nullptr, "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a valid assert string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! I've fixed that in: a483113

st->print_cr(" \tMounted virtual thread #" INT64_FORMAT, (int64_t)java_lang_Thread::thread_id(vt));
st->inc();
st->print_cr(" Mounted virtual thread #" INT64_FORMAT, (int64_t)java_lang_Thread::thread_id(vt));
p->print_vthread_stack_on(st);
st->dec();
}
}
}