[PATCH] EnableTracing prints exact class name
云达(Yunda)
yunda.mly at taobao.com
Thu Apr 18 20:28:10 PDT 2013
Hi all,
Currently EnableTracing prints class information in this way but I don’t think it’s the information that we need:
Java Monitor Wait: [Monitor Class = {instance class}
- klass: {other class}
The method information used to be this way too:
Compilation: [Java Method = {method}
- klass: {other class}
But the changeset http://hg.openjdk.java.net/hsx/hsx24/hotspot/rev/a71f8a0deaf1 makes it the right way now and it prints the method name:
Compilation: [Java Method = java.lang.Object.<init>()V
So I think we can make a change here too(against http://hg.openjdk.java.net/hsx/hsx24/hotspot/):
diff -r 78538cd4794c src/share/vm/trace/traceStream.hpp
--- a/src/share/vm/trace/traceStream.hpp Wed Apr 17 13:16:25 2013 +0200
+++ b/src/share/vm/trace/traceStream.hpp Fri Apr 19 11:10:10 2013 +0800
@@ -79,7 +79,7 @@
}
void print_val(const char* label, klassOop& val) {
- _st.print("%s = %s", label, val->print_string());
+ _st.print("%s = %s", label, val ? val->klass_part()->external_name() : "NULL");
}
void print_val(const char* label, methodOop& val) {
And now the class name is right:
Java Monitor Wait: [Monitor Class = java.lang.ref.ReferenceQueue$Lock
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/hotspot-runtime-dev/attachments/20130419/b2d586e8/attachment.html
More information about the hotspot-runtime-dev
mailing list