-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research using uprobes on JIT'd methods #26
Comments
@jrudolph I found some info on the first bullet point:
openjdk has an option
which has the interesting property of mapping the codecache VMA to a writable executable file.
It does however delete it after mapping it.
So what happens if we don't
Looking inside the codecache VMA: perf-map reports the function location as normal:
print assembly correlates with the memory address of the compiled method :
If we try and create the uprobe on the function (could be via perf or ftrace):
the create doesn’t report any error.
but no data is recorded, I guess because of the VMA being writeable (your next bullet point). |
Cool, that already looks quite promising. Thanks for the research, @ceeaspb. |
loosely related, changing to a file backed VMA may need this recent perf patch (not for uprobes but perf events): https://lkml.org/lkml/2015/11/19/580 |
You are running the probe against |
Hi @jrudolph - yes because it has the -a system wide collection option. the sleep here is just a dummy command to set the record duration.
|
I'm also researching on a way to use uprobe for dynamic tracing in Java, using eBPF. |
1 similar comment
I'm also researching on a way to use uprobe for dynamic tracing in Java, using eBPF. |
Hi @jrudolph,May I ask you a question! Does ebpf probe support JIT'd method(java) using /tmp/perf-${pid}.map generated by perf-map-agent project using bin/create-java-perf-map.sh $pid command? When I use cilium to load EBPF program,code as following,An error occurred:creating perf_uprobe PMU: token /proc/13096/exe:0x733f8cc7aaa0: opening perf event: invalid argument. root@ubuntu22:/data/ilucky/cloudwise/euspace# cat /tmp/perf-13096.map | grep setRequestProperty |
Yes that's the full (virtual) address. The problem is that uprobe expects addresses to be relative to a memory mapped executable, however, JIT code gets compiled into an anonymous mapping that (currently) cannot be addressed with uprobes... |
Challenges:
The text was updated successfully, but these errors were encountered: