Skip to content

perf-probe updates - data-structure support improvements, etc.

Masami Hiramatsu lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 19 repliesIn review
  2. v28 patches 6 repliesSuperseded
  3. v17 patches 5 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10perf probe: Support argument nametools/perf/Documentation/perf-probe.txt tools/perf/builtin-probe.c tools/perf/util/probe-event.c +2 more+52 -241 reply
2/10perf probe: Use the last field name as the argument nametools/perf/Documentation/perf-probe.txt tools/perf/util/probe-event.c+5 -11 reply
3/10tracing/kprobes: Support basic types on dynamic eventsDocumentation/trace/kprobetrace.txt kernel/trace/trace.h kernel/trace/trace_kprobe.c+334 -2211 reply
4/10perf probe: Query basic types from debuginfotools/perf/util/probe-event.c tools/perf/util/probe-event.h tools/perf/util/probe-finder.c+80 -82 replies
5/10perf probe: Support basic type castingtools/perf/Documentation/perf-probe.txt tools/perf/util/probe-event.c tools/perf/util/probe-event.h +1 more+33 -41 reply
6/10perf probe: Support DW_OP_call_frame_cfa in debuginfotools/perf/util/probe-finder.c tools/perf/util/probe-finder.h+12 -37 replies
7/10perf probe: Remove die() from probe-finder codetools/perf/util/probe-event.c tools/perf/util/probe-finder.c+322 -1991 reply
8/10perf probe: Remove die() from probe-event codetools/perf/builtin-probe.c tools/perf/util/probe-event.c tools/perf/util/probe-event.h+480 -2291 reply
9/10perf probe: Remove xzalloc() from util/probe-{event, finder}.ctools/perf/util/probe-event.c tools/perf/util/probe-finder.c+69 -251 reply
10/10perf probe: Remove xstrdup()/xstrndup() from util/probe-{event, finder}.ctools/perf/util/probe-event.c tools/perf/util/probe-finder.c+156 -611 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc.

Hi Ingo and Arnaldo,

Here are several updates of perf-probe. This series improves data structure accessing. In this version, I added 'removing x*()' patches.

- Set the name of argument which traces a data structure member as the last member of the data structure reference (e.g. f_mode of file->f_mode). This allows us to use perf-trace for tracin data-structure members.

- Add the basic type support. This allows us to fetch the memory with specified bitwidth. Usually, data-structure members are packed on the memory, this means if we want to read a member from memory, we have to access it with type casting. kprobe-tracer now support tracing argument with basic types (u8,u16,u32,u64,s8,s16,s32,s64), and perf-probe decodes the type information of the members.

- Support canonical frame address, which is used for refering frame-base on the kernel built without CONFIG_FRAME_POINTER.

- Remove almost all die()s and xzalloc/xstr*dup from util code, according to acme's advice. Thanks!

TODOs (possible features):
- Support string/dynamic arrays (*var, var[N..M])
- Support tracing static variables (non global)
- Support array element (var[N])
- 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 (10):
perf probe: Remove xstrdup()/xstrndup() from util/probe-{event,finder}.c perf probe: Remove xzalloc() from util/probe-{event,finder}.c perf probe: Remove die() from probe-event code
perf probe: Remove die() from probe-finder code
perf probe: Support DW_OP_call_frame_cfa in debuginfo
perf probe: Support basic type casting
perf probe: Query basic types from debuginfo tracing/kprobes: Support basic types on dynamic events
perf probe: Use the last field name as the argument name perf probe: Support argument name

 Documentation/trace/kprobetrace.txt     |    4 
 kernel/trace/trace.h                    |   16 -
 kernel/trace/trace_kprobe.c             |  535 ++++++++++++-------
 tools/perf/Documentation/perf-probe.txt |   11 
 tools/perf/builtin-probe.c              |   74 ++-
 tools/perf/util/probe-event.c           |  855 ++++++++++++++++++++++---------
 tools/perf/util/probe-event.h           |   27 +
 tools/perf/util/probe-finder.c          |  647 ++++++++++++++++-------
 tools/perf/util/probe-finder.h          |    1 
 9 files changed, 1469 insertions(+), 701 deletions(-)
Signature · 2 lines
Masami Hiramatsu
e-mail: [email protected]