-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8295375: debug agent class tracking should not piggy back on the cbClassPrepare() callback #10776
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -546,11 +546,6 @@ filterAndHandleEvent(JNIEnv *env, EventInfo *evinfo, EventIndex ei, | |
| HandlerNode *node; | ||
| char *classname; | ||
|
|
||
| /* We must keep track of all classes prepared to know what's unloaded */ | ||
| if (evinfo->ei == EI_CLASS_PREPARE) { | ||
| classTrack_addPreparedClass(env, evinfo->clazz); | ||
| } | ||
|
|
||
|
Comment on lines
-549
to
-553
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We no longer need this hack here since the class tracking code now installs its own CLASS_PREPARE event handler. |
||
| node = getHandlerChain(ei)->first; | ||
| classname = getClassname(evinfo->clazz); | ||
|
|
||
|
|
@@ -1509,11 +1504,6 @@ eventHandler_initialize(jbyte sessionID) | |
| if (error != JVMTI_ERROR_NONE) { | ||
| EXIT_ERROR(error,"Can't enable thread end events"); | ||
| } | ||
| error = threadControl_setEventMode(JVMTI_ENABLE, | ||
| EI_CLASS_PREPARE, NULL); | ||
| if (error != JVMTI_ERROR_NONE) { | ||
| EXIT_ERROR(error,"Can't enable class prepare events"); | ||
| } | ||
|
Comment on lines
-1512
to
-1516
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We no longer permanently enable CLASS_PREPARE events here. It's now done in classTrack.c, and only impacts the JVMTIEnv that is used for class tracking. |
||
| error = threadControl_setEventMode(JVMTI_ENABLE, | ||
| EI_GC_FINISH, NULL); | ||
| if (error != JVMTI_ERROR_NONE) { | ||
|
|
||
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.
Since CLASS_PREPARE is no longer globally and permanently enabled, we remove it from this list so the code below can enable it as needed based on whether or not the debugger as requested CLASS_PREPARE events.