linux/tools/perf/arch/x86/util
Alexis Berlemont 3b1f8311f6 perf probe: Add sdt probes arguments into the uprobe cmd string
An sdt probe can be associated with arguments but they were not passed
to the user probe tracing interface (uprobe_events); this patch adapts
the sdt argument descriptors according to the uprobe input format.

As the uprobe parser does not support scaled address mode, perf will
skip arguments which cannot be adapted to the uprobe format.

Here are the results:

  $ perf buildid-cache -v --add test_sdt
  $ perf probe -x test_sdt sdt_libfoo:table_frob
  $ perf probe -x test_sdt sdt_libfoo:table_diddle
  $ perf record -e sdt_libfoo:table_frob -e sdt_libfoo:table_diddle test_sdt
  $ perf script
  test_sdt  ...   666.255678:   sdt_libfoo:table_frob: (4004d7) arg0=0 arg1=0
  test_sdt  ...   666.255683: sdt_libfoo:table_diddle: (40051a) arg0=0 arg1=0
  test_sdt  ...   666.255686:   sdt_libfoo:table_frob: (4004d7) arg0=1 arg1=2
  test_sdt  ...   666.255689: sdt_libfoo:table_diddle: (40051a) arg0=3 arg1=4
  test_sdt  ...   666.255692:   sdt_libfoo:table_frob: (4004d7) arg0=2 arg1=4
  test_sdt  ...   666.255694: sdt_libfoo:table_diddle: (40051a) arg0=6 arg1=8

Signed-off-by: Alexis Berlemont <alexis.berlemont@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20161214000732.1710-3-alexis.berlemont@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-03-21 10:59:01 -03:00
..
auxtrace.c perf evlist: Rename for_each() macros to for_each_entry() 2016-06-23 11:26:15 -03:00
Build perf unwind: Separate local/remote libunwind config 2016-06-07 12:08:52 -03:00
dwarf-regs.c perf dwarf: Guard !x86_64 definitions under #ifdef else clause 2016-04-08 12:04:29 -03:00
group.c perf stat: Basic support for TopDown in perf stat 2016-06-06 17:04:15 -03:00
header.c perf tools: Support CPU id matching for x86 v2 2016-10-03 19:58:01 -03:00
intel-bts.c perf evlist: Rename for_each() macros to for_each_entry() 2016-06-23 11:26:15 -03:00
intel-pt.c perf intel-pt: Record address filter in AUXTRACE_INFO event 2016-09-29 11:17:05 -03:00
kvm-stat.c perf kvm/{x86,s390}: Remove const from kvm_events_tp 2016-01-29 17:49:53 -03:00
perf_regs.c perf probe: Add sdt probes arguments into the uprobe cmd string 2017-03-21 10:59:01 -03:00
pmu.c perf tools: Add Intel BTS support 2015-08-21 11:34:10 -03:00
tsc.c perf record: Robustify perf_event__synth_time_conv() 2016-05-30 12:41:44 -03:00
unwind-libdw.c perf tools: Add libdw DWARF post unwind support 2014-02-24 09:29:36 -03:00
unwind-libunwind.c perf callchain: Support x86 target platform 2016-06-07 15:13:27 -03:00