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

Fix reflection registration for JFR eventHandler fields #3662

Merged
merged 3 commits into from
Aug 13, 2021

Conversation

jiekang
Copy link
Collaborator

@jiekang jiekang commented Aug 9, 2021

Closes #3608

|| c.getCanonicalName().equals("jdk.jfr.events.AbstractJDKEvent")) {
continue;
}
fieldRegistration.computeIfAbsent(c, this::registerEventHandler);
Copy link
Member

Choose a reason for hiding this comment

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

RuntimeReflectionSupport already uses a set internally for deduplication. So, you shouldn't need ConcurrentHashMap fieldRegistration.

if (eventClass != null && access.isReachable(eventClass)) {
Set<Class<?>> s = access.reachableSubtypes(eventClass);
for (Class<?> c : s) {
if (c.getCanonicalName().equals("jdk.jfr.Event")
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment why it is necessary to compare the canonical names (instead of just comparing the classes directly).

@christianhaeubl
Copy link
Member

@mcraj017 please merge this change to master.

@munishchouhan
Copy link
Contributor

@christianhaeubl sure

@graalvmbot graalvmbot merged commit e9f5528 into oracle:master Aug 13, 2021
@zakkak
Copy link
Collaborator

zakkak commented Aug 17, 2021

Hello @mcraj017 @christianhaeubl is there any chance we could get this (and #3639) backported to a potential 21.2.0.x bug-fix release?

@munishchouhan
Copy link
Contributor

@zakkak Sure, I will check about the possibility of a potential 21.2.0.x bug-fix release and let you know

@munishchouhan
Copy link
Contributor

Hi @zakkak
Is there any specific reason for 21.2.0.x bug-fix release?
Can it be solved with our dev releases?
Our next release cycle is on 19 Oct 2021, can we add them in that cycle?

@zakkak
Copy link
Collaborator

zakkak commented Aug 19, 2021

Hi @zakkak
Is there any specific reason for 21.2.0.x bug-fix release?

21.2 added JFR support but it looks like #3608 prevents some (basic to my understanding) use cases.
In mandrel we chose to backport the fix (see graalvm#281) and we will soon do a bug-fix release, since we would like to get the JFR feature tested as much as possible before the 21.3 LTS release.

Can it be solved with our dev releases?
Our next release cycle is on 19 Oct 2021, can we add them in that cycle?

Sure, as it's a new feature I guess it's OK to wait for the next dev release for a fix.

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

Successfully merging this pull request may close these issues.

Exception when running a Quarkus native image with JFR enabled
5 participants