Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335946

DTrace code snippets should be generated when DTrace flags are enabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • hotspot
    • b06
    • generic
    • generic

      Some DTrace code snippets are generated no matter dtrace is enabled or not. It looks dtrace flags could be dynamic changed in previous jdk releases. Since they are not changeable, the code snippets can be generated based on flags. The code snippets are:
      1. method entry of native wrapper
      2. method entry/exit of interpreter
      3. allocation of interpreter

      In x86_64, run this command and check output:
      ./java -XX:+UnlockDiagnosticVMOptions -XX:+PrintNativeNMethods -version

        0x00007f541436418f: cmpb $0x0,0x163c8b17(%rip) # 0x00007f542a72ccad
                                                                  ; {external_word}
        0x00007f5414364196: je 0x00007f54143641d0
        0x00007f541436419c: push %rsi
        0x00007f541436419d: push %rdx
        0x00007f541436419e: push %rcx
        0x00007f541436419f: movabs $0x7f5386436860,%rsi ; {metadata({method} {0x00007f5386436860} 'getReferenceVolatile' '(Ljava/lang/Object;J)Ljava/lang/Object;' in 'jdk/internal/misc/Unsafe')}
        0x00007f54143641a9: mov %r15,%rdi
        0x00007f54143641ac: test $0xf,%spl
        0x00007f54143641b0: je 0x00007f54143641c8
        0x00007f54143641b6: sub $0x8,%rsp
        0x00007f54143641ba: callq 0x00007f5429ffe180 ; {runtime_call SharedRuntime::dtrace_method_entry(JavaThread*, Method*)}
        0x00007f54143641bf: add $0x8,%rsp
        0x00007f54143641c3: jmpq 0x00007f54143641cd
        0x00007f54143641c8: callq 0x00007f5429ffe180 ; {runtime_call SharedRuntime::dtrace_method_entry(JavaThread*, Method*)}
        0x00007f54143641cd: pop %rcx
        0x00007f54143641ce: pop %rdx
        0x00007f54143641cf: pop %rsi

            kwei Kuai Wei
            kwei Kuai Wei
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: