[PATCH]"classes" command of CLHSDB doesn't work
云达(Yunda)
yunda.mly at taobao.com
Mon Apr 1 02:54:45 PDT 2013
Hi all,
I find that the "classes" command of CLHSDB doesn't work:
hsdb> classes
Error: java.lang.RuntimeException: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.reflect.UndeclaredThrowableException (sa.js#493) in sa.js at line number 493
So I made a patch to fix this( against the latest hotspot-rt):
diff -r c0f9217203b2 agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js Fri Mar 29 08:38:00 2013 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js Mon Apr 01 10:52:29 2013 +0800
@@ -235,7 +235,7 @@
this.jclasses = function() {
forEachKlass(function (clazz) {
- writeln(clazz.getName().asString() + " @" + clazz.getHandle().toString());
+ writeln(clazz.getName().asString() + " @" + clazz.getAddress().toString());
});
}
registerCommand("classes", "classes", "jclasses");
I think it’s a missed change of NPG, since the same change was made in line 226 in chagetset 3601(JDK-6964458), the main NPG changeset( So I cc-ed Coleen ):
223 if (typeof(name) == "string") {
224 var clazz = sapkg.utilities.SystemDictionaryHelper.findInstanceKlass(name);
225 if (clazz) {
226 writeln(clazz.getName().asString() + " @" + clazz.getAddress().toString());
227 } else {
228 writeln("class not found: " + name);
229 }
Regards,
Yunda
________________________________
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20130401/512fa441/attachment.html
More information about the serviceability-dev
mailing list