From: Adrian Hunter <adrian.hunter@intel.com>
To: Roman Lozko <lozko.roma@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Re: Using Intel PT with JIT
Date: Tue, 11 Jul 2023 22:05:13 +0300 [thread overview]
Message-ID: <ac0f7815-e14d-f1e0-a44e-bc4a19f0b8c8@intel.com> (raw)
In-Reply-To: <CAEhC_Bkc9gV72k1iLqGjpjmRGx8aMjS6n_6gmmdr=XTzNeFc=g@mail.gmail.com>
On 11/07/23 16:54, Roman Lozko wrote:
> Hi, I tried to use `perf record` with Intel PT but afterwards I can't
> inject JIT dump to trace, `perf inject` says:
>
> error, jitted code must be sampled with perf record -k 1
> 0x59d8 [0xb0]: failed to process type: 10 [Operation not permitted]
>
> On the other hand, `-k 1` cannot be passed to `perf record`:
>
> Cannot use clockid (-k option) with intel_pt
>
> Is there a way to use Intel PT with jitted code? I am using perf
> 5.13.8, maybe it is already implemented in later versions?
>
Seems to work:
$ cat HelloWorldApp.java
import java.util.*;
/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}
$ javac HelloWorldApp.java
$ perf version
perf version 5.13.8.g3cfdd7252e00
$ perf record -e intel_pt//u -o java.perf.data java -agentpath:/home/ahunter/git/linux-stable/tools/perf/libperf-jvmti.so HelloWorldApp
java: jvmti: jitdump in /home/ahunter/.debug/jit/java-jit-20230711.XXgKfxna/jit-75025.dump
Hello World!
[ perf record: Woken up 3 times to write data ]
[ perf record: Captured and wrote 4.072 MB java.perf.data ]
$ perf inject -i java.perf.data --jit -o java.perf.data.jitted
$
prev parent reply other threads:[~2023-07-11 19:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 13:54 Using Intel PT with JIT Roman Lozko
2023-07-11 19:05 ` Adrian Hunter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac0f7815-e14d-f1e0-a44e-bc4a19f0b8c8@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=lozko.roma@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).