visualvm-logfile.txt
Describe the bug
I'm working on a performance issue with TruffleRuby, so I'm working against its master version: 2d75a9837e3f6ca3ffc638bc312212e195e9d7f7. I'm using VisualVM build 210504. With this combination, I'm unable to profile a TruffleRuby application. Attempts to use the "Polyglot Sampler" result in an error.
On the TruffleRuby side, I see the following stack trace:
SEVERE: null
java.lang.NoSuchFieldException: impl
at java.base/java.lang.Class.getDeclaredField(Class.java:2411)
at org.graalvm.visualvm.sampler.truffle.stagent.TruffleJMX.getContextImpl(TruffleJMX.java:107)
at org.graalvm.visualvm.sampler.truffle.stagent.TruffleJMX.agentmain(TruffleJMX.java:64)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
To Reproduce
- Clone TruffleRuby SHA 2d75a9837e3f6ca3ffc638bc312212e195e9d7f7.
- Run VisualVM build 210504
- Run a Ruby script: `jt ruby --jvm -e 'loop { "abc".size; sleep 1 }'
- Go to the "Polyglot Sampler" tab in VisualVM
- Wait a little bit and VisualVM will update the "CPU sampling" message to say "Not available. Cannot access truffle JMX in target application. Check the logfile for details (use Help | About | Logfile)."
Expected behavior
I expected to see profiled Ruby methods.
VisualVM log
Please attach VisualVM messages.log file to help diagnose your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS 11.3.1; Ubuntu 21.04
- Java version:
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02)
OpenJDK 64-Bit Server VM GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02, mixed mode, sharing)
Additional context
This was working as of a few days ago. It looks like an internal field may have been renamed causing a lookup to fail.
visualvm-logfile.txt
Describe the bug
I'm working on a performance issue with TruffleRuby, so I'm working against its master version: 2d75a9837e3f6ca3ffc638bc312212e195e9d7f7. I'm using VisualVM build 210504. With this combination, I'm unable to profile a TruffleRuby application. Attempts to use the "Polyglot Sampler" result in an error.
On the TruffleRuby side, I see the following stack trace:
To Reproduce
Expected behavior
I expected to see profiled Ruby methods.
VisualVM log
Please attach VisualVM messages.log file to help diagnose your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02)
OpenJDK 64-Bit Server VM GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02, mixed mode, sharing)
Additional context
This was working as of a few days ago. It looks like an internal field may have been renamed causing a lookup to fail.