Hi Erik, thanks for the fast confirmation and for opening the bug report.
Regards, Volker On Thu, Jul 10, 2014 at 5:40 PM, Erik Gahlin <[email protected]> wrote: > Hi , > > I can confirm the macro evaluates to _trace_id in Oracles closed code :( > > Sorry about that. I have filed a P2 bug to have it fixed. See. > https://bugs.openjdk.java.net/browse/JDK-8049881 > > Thanks for reporting > Erik > > Volker Simonis skrev 2014-07-10 12:30: > >> Hi, >> >> the change "8046282: SA update" introduced the following new code in >> agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java >> >> + traceIDField = type.getField("_trace_id"); >> >> But I can not find the corresponding field in >> src/share/vm/oops/klass.hpp. The Klass class only contains the macro >> TRACE_DEFINE_KLASS_TRACE_ID which is defined to "typedef int >> ___IGNORED_hs_trace_type2" in traceMacros.hpp. >> >> This leads to an error when calling for example jstack on a core file: >> >> $ images/j2sdk-image/bin/jstack ./images/j2sdk-image/bin/java core >> Attaching to core core from executable ./images/j2sdk-image/bin/java, >> please wait... >> Debugger attached successfully. >> Server compiler detected. >> JVM version is 1.9.0-internal-d046063_2014_07_10_11_16-b00 >> Deadlock Detection: >> >> Exception in thread "main" java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:484) >> at sun.tools.jstack.JStack.runJStackTool(JStack.java:140) >> at sun.tools.jstack.JStack.main(JStack.java:106) >> Caused by: java.lang.ExceptionInInitializerError >> at sun.jvm.hotspot.oops.ObjectHeap.initialize(ObjectHeap.java:74) >> at sun.jvm.hotspot.oops.ObjectHeap.<init>(ObjectHeap.java:110) >> at sun.jvm.hotspot.runtime.VM.getObjectHeap(VM.java:582) >> at >> sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:55) >> at >> sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39) >> at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62) >> at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45) >> at sun.jvm.hotspot.tools.JStack.run(JStack.java:66) >> at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260) >> at sun.jvm.hotspot.tools.Tool.start(Tool.java:223) >> at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118) >> at sun.jvm.hotspot.tools.JStack.main(JStack.java:92) >> ... 6 more >> Caused by: java.lang.RuntimeException: field "_trace_id" not found in type >> Klass >> at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:183) >> at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:190) >> at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:194) >> at sun.jvm.hotspot.oops.Klass.initialize(Klass.java:58) >> at sun.jvm.hotspot.oops.Klass.access$000(Klass.java:33) >> at sun.jvm.hotspot.oops.Klass$1.update(Klass.java:37) >> at >> sun.jvm.hotspot.runtime.VM.registerVMInitializedObserver(VM.java:394) >> at sun.jvm.hotspot.oops.Klass.<clinit>(Klass.java:35) >> ... 18 more >> >> Is this a problem with OpenJDK only (i.e. is '_trace_id' defined in >> Oracle proprietary builds) ?. Or is this another problem? >> >> Thank you and best regards, >> Volker > >
