-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Native Image] Accessing methods on OperatingSystemMXBean through Reflection worked on v21 but not on v23 #10488
Comments
Looks that configuration files are somewhat different:
v23 reachability-metadata.json:
So the tracing agent does not seem to behave the same in v21 & v23. |
Hi, could you please share a full reproducer to this issue? thanks |
In a folder, say src-issue:
My following output:
Class:
Script:
|
Well, with the previous specific test files, the configuration files are the following:
Reachability-metadata.json for v23
So it looks that the tracing agent did not provide methods info in v23.
|
Describe the Issue
Windows. GraalVM for JDK 21.0.5+9.1 then 23.0.1+11.1.
Compiling java classes with GraalVM, and making a jar. No module.
Executing the jar/Main on test files with the following options to let the tracing agent create / update the configuration json files
Running the native-image.cmd on the jar with the following options
The problematic code:
Under GraalVM 21, the returned methods are:
for the java execution of the tracing agent
for the execution of the native image
Under GraalVM 23, they are:
for the java execution of the tracing agent
for the execution of the native image
so it looks that in v21 only 2 of the OperatingSystemMXBean methods are visible (and by chance the one looked for), and that in v23 none are visible.
Any configuration mistake?
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
Windows. GraalVM for JDK 21.0.5+9.1 then 23.0.1+11.1.
Operating System and Version
Windows 11
Troubleshooting Confirmation
Run Command
Expected Behavior
Able to get the cpu process time
Actual Behavior
Ok with v21, ko with v23
Steps to Reproduce
Additional Context
See above
Run-Time Log Output and Error Messages
See above
The text was updated successfully, but these errors were encountered: