diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 14:07:15 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 14:07:15 -0800 |
commit | c9584234709aff90fbf38f71904a068ee9e8bce3 (patch) | |
tree | 85d0d76c25767b49470eb3f6f2cb9142914c5dae /include/trace | |
parent | 3a36281a17199737b468befb826d4a23eb774445 (diff) | |
parent | c85c9a2c6e368dc94907e63babb18a9788e5c9b6 (diff) | |
download | linux-c9584234709aff90fbf38f71904a068ee9e8bce3.tar.gz linux-c9584234709aff90fbf38f71904a068ee9e8bce3.tar.bz2 linux-c9584234709aff90fbf38f71904a068ee9e8bce3.zip |
Merge tag 'trace-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt:
- Update to the way irqs and preemption is tracked via the trace event
PC field
- Fix handling of unregistering event failing due to allocate memory.
This is only triggered by failure injection, as it is pretty much
guaranteed to have less than a page allocation succeed.
- Do not show the useless "filter" or "enable" files for the "ftrace"
trace system, as they have no effect on doing anything.
- Add a warning if kprobes are registered more than once.
- Synthetic events now have their fields parsed by semicolons. Old
formats without semicolons will still work, but new features will
require them.
- New option to allow trace events to show %p without hashing in trace
file. The trace file can only be read by root, and reading the raw
event buffer did not have any pointers hashed, so this does not
expose anything new.
- New directory in tools called tools/tracing, where a new tool that
reads sequential latency reports from the ftrace latency tracers.
- Other minor fixes and cleanups.
* tag 'trace-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits)
kprobes: Fix to delay the kprobes jump optimization
tracing/tools: Add the latency-collector to tools directory
tracing: Make hash-ptr option default
tracing: Add ptr-hash option to show the hashed pointer value
tracing: Update the stage 3 of trace event macro comment
tracing: Show real address for trace event arguments
selftests/ftrace: Add '!event' synthetic event syntax check
selftests/ftrace: Update synthetic event syntax errors
tracing: Add a backward-compatibility check for synthetic event creation
tracing: Update synth command errors
tracing: Rework synthetic event command parsing
tracing/dynevent: Delegate parsing to create function
kprobes: Warn if the kprobe is reregistered
ftrace: Remove unused ftrace_force_update()
tracepoints: Code clean up
tracepoints: Do not punish non static call users
tracepoints: Remove unnecessary "data_args" macro parameter
tracing: Do not create "enable" or "filter" files for ftrace event subsystem
kernel: trace: preemptirq_delay_test: add cpu affinity
tracepoint: Do not fail unregistering a probe due to memory failure
...
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/trace_events.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index 7785961d82ba..8268bf747d6f 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -231,9 +231,11 @@ TRACE_MAKE_SYSTEM_STR(); * { * struct trace_seq *s = &iter->seq; * struct trace_event_raw_<call> *field; <-- defined in stage 1 - * struct trace_entry *entry; * struct trace_seq *p = &iter->tmp_seq; - * int ret; + * + * -------(for event)------- + * + * struct trace_entry *entry; * * entry = iter->ent; * @@ -245,14 +247,23 @@ TRACE_MAKE_SYSTEM_STR(); * field = (typeof(field))entry; * * trace_seq_init(p); - * ret = trace_seq_printf(s, "%s: ", <call>); - * if (ret) - * ret = trace_seq_printf(s, <TP_printk> "\n"); - * if (!ret) - * return TRACE_TYPE_PARTIAL_LINE; + * return trace_output_call(iter, <call>, <TP_printk> "\n"); * - * return TRACE_TYPE_HANDLED; - * } + * ------(or, for event class)------ + * + * int ret; + * + * field = (typeof(field))iter->ent; + * + * ret = trace_raw_output_prep(iter, trace_event); + * if (ret != TRACE_TYPE_HANDLED) + * return ret; + * + * trace_event_printf(iter, <TP_printk> "\n"); + * + * return trace_handle_return(s); + * ------- + * } * * This is the method used to print the raw event to the trace * output format. Note, this is not needed if the data is read @@ -364,7 +375,7 @@ trace_raw_output_##call(struct trace_iterator *iter, int flags, \ if (ret != TRACE_TYPE_HANDLED) \ return ret; \ \ - trace_seq_printf(s, print); \ + trace_event_printf(iter, print); \ \ return trace_handle_return(s); \ } \ |