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.
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件
人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其 他用途、或
透露本邮件之内容。谢谢。