Skip to content

Initial trace-cmd perf support

Tzvetomir Stoyanov (VMware) linux-trace-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5trace-cmd: Internal refactoring of pid address map logictracecmd/Makefile tracecmd/include/trace-local.h tracecmd/trace-obj-debug.c +1 more+152 -1130 replies
2/5trace-cmd: Make read_file_string() non statictracecmd/include/trace-local.h tracecmd/trace-dump.c+4 -30 replies
3/5trace-cmd: New internal APIs for reading ELF headerMakefile tracecmd/include/trace-local.h tracecmd/trace-obj-debug.c+803 -00 replies
4/5trace-cmd: Add a new option in trace.dat file for the address to function name mappinglib/trace-cmd/include/private/trace-cmd-private.h lib/trace-cmd/trace-input.c tracecmd/trace-dump.c+152 -00 replies
5/5trace-cmd: Add new subcomand "trace-cmd perf"tracecmd/Makefile tracecmd/include/trace-local.h tracecmd/trace-cmd.c +1 more+730 -07 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/5] Initial trace-cmd perf support

Initial implementation of trace-cmd perf subcommand. It collects call traces of a given PID and resolves collected addresses to function names. Still work in progress.
What it has till now:
- Configures and runs perf to collect call traces of the given PID.
- Runs per CPU thread to read perf buffers and store traces in temp files.
- Resolves collected addresses to function names (well, at least tries to do it). This includes also dynamic libraries, loaded runtime during the trace.
What should be implemented:
- Store the results in a trace.dat file. Should think about how to extend its format to hold these traces.
- Visualise the call stack from trace.dat file with trace-cmd report and KernelShark.

Tzvetomir Stoyanov (VMware) (5):
trace-cmd: Internal refactoring of pid address map logic
trace-cmd: Make read_file_string() non static
trace-cmd: New internal APIs for reading ELF header
trace-cmd: Add a new option in trace.dat file for the address to
function name mapping
[WIP] trace-cmd: Add new subcomand "trace-cmd perf"

 Makefile                                      |  10 +
 .../include/private/trace-cmd-private.h       |   5 +
 lib/trace-cmd/trace-input.c                   | 144 +++
 tracecmd/Makefile                             |   2 +
 tracecmd/include/trace-local.h                |  46 +-
 tracecmd/trace-cmd.c                          |   1 +
 tracecmd/trace-dump.c                         |   9 +-
 tracecmd/trace-obj-debug.c                    | 907 ++++++++++++++++++
 tracecmd/trace-perf.c                         | 726 ++++++++++++++
 tracecmd/trace-record.c                       | 107 +--
 10 files changed, 1841 insertions(+), 116 deletions(-)
 create mode 100644 tracecmd/trace-obj-debug.c
 create mode 100644 tracecmd/trace-perf.c
Signature · 1 line
2.28.0