-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8295851: Do not use ttyLock in BytecodeTracer::trace #25915
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
// We need a global instance to keep track of the method being printed so we can report that | ||
// the method has changed. If this method is redefined and removed, that's ok because the method passed in won't match, and | ||
// this will print that one. | ||
static Method* _current_method = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we are calling trace_interpreter
from multiple threads they will each stomp on this shared global field. Sorry I can't see how some form of locking is not needed here.
This didn't need ttyLock for synchronization, the code only needs to see if the method changes so it can print the method name before the bytecodes, like:
[490166] static void java.lang.String.()
[490166] 13 18 putstatic 613 <java/lang/String.CASE_INSENSITIVE_ORDER:Ljava/util/Comparator;>
[490166] 14 21 return
[490166] static void java.lang.System.()
[490166] 15 0 invokestatic 471 <java/lang/System.registerNatives()V>
[490166] 16 3 aconst_null
[490166] 17 4 putstatic 474 <java/lang/System.in:Ljava/io/InputStream;>
Verified manually and added some parallelism to the test, and fixed trace() to initialize is_linked(), which it always is.
Also ran tier1-4.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25915/head:pull/25915
$ git checkout pull/25915
Update a local copy of the PR:
$ git checkout pull/25915
$ git pull https://git.openjdk.org/jdk.git pull/25915/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25915
View PR using the GUI difftool:
$ git pr show -t 25915
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25915.diff
Using Webrev
Link to Webrev Comment