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

JVMTI trigger VMStart event according to can_generate_early_vmstart #13737

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Oct 19, 2021

Moved TRIGGER_J9HOOK_JAVA_BASE_LOADED to standardInit() after initializeAttachedThread() for mainThread, which is the earliest point to run an agent such as YourKit Java profiler agent;
Fixed processEvent() for J9HOOK_JAVA_BASE_LOADED;
When can_generate_early_vmstart capability is specified, VMStart event is triggered in the jvmtiHookModuleSystemStarted handler, otherwise in jvmtiHookVMStarted after JavaVM initialization;
Refactoring the functions affected, replaced JAVA_SPEC_VERSION 9 with 11.

issue #13708

Signed-off-by: Jason Feng fengj@ca.ibm.com

@pshipton
Copy link
Member

We must be missing a test as well, since this problem went unnoticed.

@JasonFengJ9
Copy link
Member Author

We must be missing a test as well, since this problem went unnoticed.

This PR is aimed for 0.29.1 and/or 0.29.0. How about adding the test in a separated PR instead?

@pshipton
Copy link
Member

A separate PR is fine. It's too late for 0.29.0, and we'll see about 0.29.1.

runtime/jvmti/jvmtiHook.c Outdated Show resolved Hide resolved
Moved TRIGGER_J9HOOK_JAVA_BASE_LOADED to standardInit() after
initializeAttachedThread() for mainThread, which is the earliest point
to run an agent such as YourKit Java profiler agent;
Fixed processEvent() for J9HOOK_JAVA_BASE_LOADED;
When can_generate_early_vmstart capability is specified, VMStart event
is triggered in the jvmtiHookModuleSystemStarted handler, otherwise in
jvmtiHookVMStarted after JavaVM initialization;
Refactoring the functions affected, replaced JAVA_SPEC_VERSION 9 with
11.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@gacholio
Copy link
Contributor

jenkins test sanity zlinux jdk8,jdk11

@gacholio
Copy link
Contributor

jenkins compile win jdk11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants