[PATCH]"classes" command of CLHSDB doesn't work
云达(Yunda)
yunda.mly at taobao.com
Wed May 1 20:04:43 PDT 2013
Hi all,
Could anyone give me some advice on the test code or just push this for me, please?
Regards,
Yunda
From: 云达(Yunda)
Sent: Wednesday, April 03, 2013 3:34 PM
To: 'Coleen Phillimore'
Cc: serviceability-dev at openjdk.java.net
Subject: RE: [PATCH]"classes" command of CLHSDB doesn't work
Coleen,
I think the bug can be caused only by executing the "classes" command of CLHSDB since the code is for registering the command. So I don’t know how to test it other than executing the command itself and I don’t find such kind of test that executes CLHSDB commands in current test code(not sure about that and hope someone in Serviceability team could confirm).
Regards,
Yunda
From: Coleen Phillimore [mailto:coleen.phillimore at oracle.com]
Sent: Monday, April 01, 2013 10:54 PM
To: 云达(Yunda)
Cc: serviceability-dev at openjdk.java.net
Subject: Re: [PATCH]"classes" command of CLHSDB doesn't work
Yes, I am sure we missed this with permgen elimination. We didn't test the serviceability agent that thorougly, except for our automated tests. Should there be a test that we can add with this patch?
Thanks,
Coleen
On 04/01/2013 05:54 AM, 云达(Yunda) wrote:
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.
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其 他用途、或透露本邮件之内容。谢谢。
________________________________
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/20130502/7b53f6a3/attachment.html
More information about the serviceability-dev
mailing list