1
0
Fork 0
alistair23-linux/Documentation/trace
Linus Torvalds 343a9f3540 The biggest change here is the updates to kprobes
Back in January I posted patches to create function based events. These were
 the events that you suggested I make to allow developers to easily create
 events in code where no trace event exists. After posting those changes for
 review, it was suggested that we implement this instead with kprobes.
 
 The problem with kprobes is that the interface is too complex and needs to
 be simplified. Masami Hiramatsu posted patches in March and I've been
 playing with them a bit. There's been a bit of clean up in the kprobe code
 that was inspired by the function based event patches, and a couple of
 enhancements to the kprobe event interface.
 
  - If the arch supports it (we added support for x86), you can place a
    kprobe event at the start of a function and use $arg1, $arg2, etc
    to reference the arguments of a function. (Before you needed to know
    what register or where on the stack the argument was).
 
  - The second is a way to see array of events. For example, if you reference
    a mac address, you can add:
 
    echo 'p:mac ip_rcv perm_addr=+574($arg2):x8[6]' > kprobe_events
 
    And this will produce:
 
    mac: (ip_rcv+0x0/0x140) perm_addr={0x52,0x54,0x0,0xc0,0x76,0xec}
 
 Other changes include
 
  - Exporting trace_dump_stack to modules
 
  - Have the stack tracer trace the entire stack (stop trying to remove
    tracing itself, as we keep removing too much).
 
  - Added support for SDT in uprobes
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCW9hdjxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qmtbAP9GS/o2WSvsYLSIw4+mF94eCL06lUxp
 rRrktkEofm/PagEAl2JNmvHrAJN+LIrajqXTbwlZ7Ckk1rZhCW41Am7qnQs=
 =sTUM
 -----END PGP SIGNATURE-----

Merge tag 'trace-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing updates from Steven Rostedt:
 "The biggest change here is the updates to kprobes

  Back in January I posted patches to create function based events.
  These were the events that you suggested I make to allow developers to
  easily create events in code where no trace event exists. After
  posting those changes for review, it was suggested that we implement
  this instead with kprobes.

  The problem with kprobes is that the interface is too complex and
  needs to be simplified. Masami Hiramatsu posted patches in March and
  I've been playing with them a bit. There's been a bit of clean up in
  the kprobe code that was inspired by the function based event patches,
  and a couple of enhancements to the kprobe event interface.

   - If the arch supports it (we added support for x86), you can place a
     kprobe event at the start of a function and use $arg1, $arg2, etc
     to reference the arguments of a function. (Before you needed to
     know what register or where on the stack the argument was).

   - The second is a way to see array of events. For example, if you
     reference a mac address, you can add:

	echo 'p:mac ip_rcv perm_addr=+574($arg2):x8[6]' > kprobe_events

     And this will produce:

	mac: (ip_rcv+0x0/0x140) perm_addr={0x52,0x54,0x0,0xc0,0x76,0xec}

  Other changes include

   - Exporting trace_dump_stack to modules

   - Have the stack tracer trace the entire stack (stop trying to remove
     tracing itself, as we keep removing too much).

   - Added support for SDT in uprobes"

[ SDT - "Statically Defined Tracing" are userspace markers for tracing.
  Let's not use random TLA's in explanations unless they are fairly
  well-established as generic (at least for kernel people) - Linus ]

* tag 'trace-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (24 commits)
  tracing: Have stack tracer trace full stack
  tracing: Export trace_dump_stack to modules
  tracing: probeevent: Fix uninitialized used of offset in parse args
  tracing/kprobes: Allow kprobe-events to record module symbol
  tracing/kprobes: Check the probe on unloaded module correctly
  tracing/uprobes: Fix to return -EFAULT if copy_from_user failed
  tracing: probeevent: Add $argN for accessing function args
  x86: ptrace: Add function argument access API
  tracing: probeevent: Add array type support
  tracing: probeevent: Add symbol type
  tracing: probeevent: Unify fetch_insn processing common part
  tracing: probeevent: Append traceprobe_ for exported function
  tracing: probeevent: Return consumed bytes of dynamic area
  tracing: probeevent: Unify fetch type tables
  tracing: probeevent: Introduce new argument fetching code
  tracing: probeevent: Remove NOKPROBE_SYMBOL from print functions
  tracing: probeevent: Cleanup argument field definition
  tracing: probeevent: Cleanup print argument functions
  trace_uprobe: support reference counter in fd-based uprobe
  perf probe: Support SDT markers having reference counter (semaphore)
  ...
2018-10-30 09:49:56 -07:00
..
postprocess mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory 2018-04-05 21:36:27 -07:00
coresight-cpu-debug.txt coresight: Remove %px for printing pcsr value 2018-05-14 16:20:00 +02:00
coresight.txt docs: Fix some broken references 2018-06-15 18:10:01 -03:00
events-kmem.rst trace doc: convert trace/events-kmem.txt to rst format 2018-03-07 10:25:54 -07:00
events-msr.rst trace doc: convert trace/events-msr.txt to rst format 2018-03-07 10:26:06 -07:00
events-nmi.rst trace doc: convert trace/events-nmi.txt to rst format 2018-03-07 10:26:02 -07:00
events-power.rst cpufreq: trace frequency limits change 2018-07-26 10:17:47 +02:00
events.rst docs: histogram.txt: convert it to ReST file format 2018-07-02 11:26:02 -06:00
ftrace-design.rst trace doc: convert trace/ftrace-design.txt to rst format 2018-03-07 10:22:57 -07:00
ftrace-uses.rst docs: Fix some broken references 2018-06-15 18:10:01 -03:00
ftrace.rst docs: tracing: Add stacktrace filter command 2018-08-31 16:34:49 -06:00
function-graph-fold.vim tracing: Add vim script to enable folding for function_graph traces 2009-08-26 00:32:04 -04:00
histogram.rst docs: Fix typos in histogram.rst 2018-10-18 12:33:08 -06:00
hwlat_detector.rst trace doc: convert trace/hwlat_detector.txt to rst fromat 2018-03-07 10:26:14 -07:00
index.rst docs: histogram.txt: convert it to ReST file format 2018-07-02 11:26:02 -06:00
intel_th.rst docs: Fix some broken references 2018-06-15 18:10:01 -03:00
kprobetrace.rst tracing: probeevent: Add $argN for accessing function args 2018-10-10 22:19:11 -04:00
mmiotrace.rst trace doc: convert trace/mmiotrace.txt to rst format 2018-03-07 10:26:10 -07:00
ring-buffer-design.txt doc: fix double words 2014-03-21 13:16:58 +01:00
stm.rst stm class: SPDX-ify the documentation 2018-10-11 12:12:55 +02:00
sys-t.rst stm class: Document the MIPI SyS-T protocol usage 2018-10-11 12:12:55 +02:00
tracepoint-analysis.rst docs: Fix some broken references 2018-06-15 18:10:01 -03:00
tracepoints.rst trace doc: convert trace/tracepoints.txt to rst format 2018-03-07 10:23:23 -07:00
uprobetracer.rst Documentation: {u,k}probes: fix filename for event enabling 2018-07-23 09:26:37 -06:00