United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7003487 clhsdbproc stacktrace fails on x64
JDK-7003487 : clhsdbproc stacktrace fails on x64

Details
Type:
Bug
Submit Date:
2010-11-30
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
svc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
hs20 (b06)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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
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).
                                     
2010-11-30
SUGGESTED FIX

http://cr.openjdk.java.net/~kevinw/7003487/webrev.00/
                                     
2010-11-30
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
                                     
2010-11-30
EVALUATION

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



Hardware and Software, Engineered to Work Together