mbox series

[v3,0/3] Initial trace-cmd support for ftrace uprobes

Message ID 20201125104422.823216-1-tz.stoyanov@gmail.com (mailing list archive)
Headers show
Series Initial trace-cmd support for ftrace uprobes | expand

Message

Tzvetomir Stoyanov (VMware) Nov. 25, 2020, 10:44 a.m. UTC
Ftrace supports uprobes - trace events on user space applications.
Trace-cmd cannot configure uprobes, in order to support it this new
functionality is introduced:
 - Function name to file offset mapping, this information is extracted
  from the dwarf and ELF headers in the binary file.
 - New options are added to "trace-cmd record" for setting a uprobe on
   given file and the libraries it depends on:
    --uprobe file:function
    --uprobe-ret file:function
    --libs
    --no-libs

[
 v3 changes:
   - Added DEBUG_INTERNALS local define in trace-obj-debug.c, for printing
     debug information about resolving process.
   - Replaced function name regex match with simple wildcards match.
   - Implemented functionality to search for functions in the libraries that
     the given application depends on.
   - Added --libs and --no-libs arguments to trace-cmd record.
 v2 changes:
   - Renamed some internal trace-cmd functions, to not overlap the bfd
     library namespace. Suggested by Steven Rostedt.
]

Tzvetomir Stoyanov (VMware) (3):
  trace-cmd: Internal refactoring of pid address map logic
  trace-cmd: New internal APIs for reading ELF header
  trace-cmd: [POC] Add support for uprobes

 Makefile                       |  10 +
 tracecmd/Makefile              |   2 +
 tracecmd/include/trace-local.h |  56 +-
 tracecmd/trace-obj-debug.c     | 908 +++++++++++++++++++++++++++++++++
 tracecmd/trace-record.c        | 204 ++++----
 tracecmd/trace-uprobes.c       | 223 ++++++++
 tracecmd/trace-usage.c         |   8 +
 7 files changed, 1297 insertions(+), 114 deletions(-)
 create mode 100644 tracecmd/trace-obj-debug.c
 create mode 100644 tracecmd/trace-uprobes.c