Skip to contentSkip to conversation

perf-probe updates: string support, etc.

PATCH In review Masami Hiramatsu 1 participant 3 messages May 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover perf-probe updates: string support, etc.

Hi,

Here is a series of patches which improves perf probe to add below features.

- String support, which enables dynamic events to trace string variables instead of its address.

- Fixed-index array entry support, which allows user to trace an array entry with digit index, e.g. array[0].

- Global/static variable support, which allows user to trace global or static variables, as same as local one.

TODOs (possible features):
- Support dynamic array-indexing (var[var2])
- Support force type-casting ((type)var)
- Show what deta-structure member is assigned to each argument.
- Better support for probes on modules
- More debugger like enhancements(%next, --disasm, etc.)

Thank you,

---

Masami Hiramatsu (4):
perf probe: Support static and global variables perf probe: Support tracing an entry of array perf probe: Support "string" type tracing/kprobes: Support "string" type

 Documentation/trace/kprobetrace.txt     |    2 
 kernel/trace/trace_kprobe.c             |  356 ++++++++++++++++++++++++-------
 tools/perf/Documentation/perf-probe.txt |    4 
 tools/perf/util/probe-event.c           |   71 ++++--
 tools/perf/util/probe-event.h           |    1 
 tools/perf/util/probe-finder.c          |  192 +++++++++++++----
 6 files changed, 484 insertions(+), 142 deletions(-)
Signature · 2 lines
Masami Hiramatsu
e-mail: [email protected]
#1 lore raw

PATCH 1/4 tracing/kprobes: Support "string" type

Support string type tracing and printing in kprobe-tracer. This allows user to trace string data in kernel including __user data. Note that sometimes __user data may not be accessed if it is paged-out (sorry, but kprobes operation should be done in atomic, we can not wait for page-in).

Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Frederic Weisbecker <[email protected]>

---

 Documentation/trace/kprobetrace.txt |    2 
 kernel/trace/trace_kprobe.c         |  356 +++++++++++++++++++++++++++--------
 2 files changed, 279 insertions(+), 79 deletions(-)
Documentation/trace/kprobetrace.txt +1 -1
index ec94748..5f77d94 100644
@@ -42,7 +42,7 @@ Synopsis of kprobe_events
   +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
   NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
   FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
-		  (u8/u16/u32/u64/s8/s16/s32/s64) are supported.
+		  (u8/u16/u32/u64/s8/s16/s32/s64) and string are supported.
 
   (*) only for return probe.
   (**) this is useful for fetching a field of data structures.
kernel/trace/trace_kprobe.c +278 -78

630 lines not on this page · raw message

Signature · 2 lines
Masami Hiramatsu
e-mail: [email protected]