JDK-7003487 : clhsdbproc stacktrace fails on x64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-30
  • Updated: 2011-04-23
  • Resolved: 2011-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7 Other
5.0u31,hs20Fixed 6u25Fixed 7Fixed hs20Fixed
Description
The Serviceability Agent supports x64, and jstack etc work fine.
clhsdbproc64.sh however fails to produce stacktraces:

(5.10)$ ./clhsdbproc64.sh 16904
java version "1.5.0_24"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_24-b02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_24-b02, mixed mode)

Attaching to process 16904, please wait...

hsdb> where -a
Exception in thread "main" java.lang.ExceptionInInitializerError
        at sun.jvm.hotspot.CommandProcessor$27.doit(CommandProcessor.java:920)
        at sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1243)
        at sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1213)
        at sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1116)
        at sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:74)
        at sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:18)
Caused by: java.lang.RuntimeException: cpu 'amd64' is not yet supported!
        at sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.initialize(HTMLGenerator.java:185)
        at sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.access$000(HTMLGenerator.java:27)
        at sun.jvm.hotspot.ui.classbrowser.HTMLGenerator$1.update(HTMLGenerator.java:171)
        at sun.jvm.hotspot.runtime.VM.registerVMInitializedObserver(VM.java:306)
        at sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.<clinit>(HTMLGenerator.java:169)
        ... 6 more



This is true for tests on JDK1.5.0 and jdk7.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/6da3527317ff
17-12-2010

SUGGESTED FIX http://cr.openjdk.java.net/~kevinw/7003487/webrev.00/
30-11-2010

EVALUATION An oversight whereby although jstack and the Serviceability Agent's jstackproc.sh work on x64, the clhsdbproc tool (and I expect HSDB) can't get a stacktrace. Straightforward fix in agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
30-11-2010

SUGGESTED FIX HTMLGenerator needs updating: on intialization it creates a helper object based on the CPU, and the logic needs expanding to create an AMD64Helper (a class which already exists).
30-11-2010