This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Question about java probe
- From: Shuxin Yang <shuxinyang dot oss at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Mon, 27 Mar 2017 09:45:19 -0700
- Subject: Question about java probe
- Authentication-results: sourceware.org; auth=none
Hi, There:
I have bunch of questions about java probe. The stap I'm using is
built from the most recent release without any special flags.Tons thanks
in advance for the help!
Q1: I find an example here:
https://developers.redhat.com/blog/2014/01/10/probing-java-w-systemtap/
The statement 'printf("hit ... %d\n", $arg1)' print a wrong
value. However, if I change this statement to 'printf("hit ... %s\n",
arg1)', then it works. Why so?
Q2: follow the example in Q1. What if the function being probed has a
non-primitive typed parameter. Say argument foo of type Foo. Is it
possible to access foo's data member, or call its member function.
Q3: Look like print_java_stack() only prints the stack of the thread
in question; It does *not* print all threads' stack. Am I right?
Q4: How to print java stack when a system call is hit? I try to call
print_java_stack() inside system call probe function, and get nothing.
Should I call other function? Or it's impossible for now? If this is the
case, is it possible to hack the systemtap to take advantage of the
perf-jit support (https://lwn.net/Articles/633846/) to print the java
stack of JIT-ed code?
Thanks
Shuxin