diff options
| author | Steven Rostedt <[email protected]> | 2013-06-20 15:44:44 +0000 |
|---|---|---|
| committer | H. Peter Anvin <[email protected]> | 2013-06-21 05:24:32 +0000 |
| commit | f5abaa1bfc3dbf26d19d3513f39279ca369f8d65 (patch) | |
| tree | b3b5151c021486b65b0f01f5f4d1cfb94b82d1f9 /tools/perf/util/scripting-engines/trace-event-perl.c | |
| parent | Linux 3.10-rc6 (diff) | |
| download | kernel-f5abaa1bfc3dbf26d19d3513f39279ca369f8d65.tar.gz kernel-f5abaa1bfc3dbf26d19d3513f39279ca369f8d65.zip | |
tracing: Add DEFINE_EVENT_FN() macro
Each TRACE_EVENT() adds several helper functions. If two or more trace events
share the same structure and print format, they can also share most of these
helper functions and save a lot of space from duplicate code. This is why the
DECLARE_EVENT_CLASS() and DEFINE_EVENT() were created.
Some events require a trigger to be called at registering and unregistering of
the event and to do so they use TRACE_EVENT_FN().
If multiple events require a trigger, they currently have no choice but to use
TRACE_EVENT_FN() as there's no DEFINE_EVENT_FN() available. This unfortunately
causes a lot of wasted duplicate code created.
By adding a DEFINE_EVENT_FN(), these events can still use a
DECLARE_EVENT_CLASS() and then define their own triggers.
Signed-off-by: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Seiji Aguchi <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions
