Thread (45 messages) 45 messages, 9 authors, 2012-01-30

Re: [PATCH v9 3.2 7/9] tracing: uprobes trace_event interface

From: Ingo Molnar <hidden>
Date: 2012-01-17 09:29:23
Also in: lkml

* Jiri Olsa [off-list ref] wrote:
I've tested following event:
        echo "p:probe_libc/free /lib64/libc-2.13.so:0x7a4f0 %ax" > ./uprobe_events

and commands like:
        perf record -a -e probe_libc:free  --filter "common_pid == 1127"
        perf record -e probe_libc:free --filter "arg1 == 0xa" ls

got me proper results.
Btw., Srikar, if that's the primary UI today then we'll need to 
make it a *lot* more user-friendly than the above usage 
workflow.

In particular this line:
        echo "p:probe_libc/free /lib64/libc-2.13.so:0x7a4f0 %ax" > ./uprobe_events
is not something a mere mortal will be able to figure out.

There needs to be perf probe integration, that allows intuitive 
usage, such as:

   perf probe add libc:free

Using the perf symbols code it should first search a libc*so DSO 
in the system, finding say /lib64/libc-2.15.so. The 'free' 
symbol is readily available there:

  aldebaran:~> eu-readelf -s /lib64/libc-2.15.so  | grep ' free$'
  7186: 00000039ff47f080    224 FUNC    GLOBAL DEFAULT       12 free

then the tool can automatically turn that symbol information 
into the specific probe.

Will it all work with DSO randomization, prelinking and default 
placement as well?

Users should not be expected to enter magic hexa numbers to get 
a trivial usecase going ...

this bit:
        perf record -a -e probe_libc:free  --filter "common_pid == 1127"
        perf record -e probe_libc:free --filter "arg1 == 0xa" ls
looks good and intuitive and 'perf list' should list all the 
available uprobes.

Thanks,

	Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help