[PATCH] EnableTracing prints exact class name

David Holmes david.holmes at oracle.com
Thu Apr 18 21:12:10 PDT 2013


Hi Yunda,

Marcus is already covering this as part of the classload/unload event 
changes:

http://cr.openjdk.java.net/~mgronlun/8012182/webrev05/

Cheers,
David

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


More information about the hotspot-runtime-dev mailing list