License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 14:07:57 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2009-04-13 16:25:37 +00:00
|
|
|
/*
|
|
|
|
* Stage 1 of the trace events.
|
|
|
|
*
|
2015-03-03 21:48:18 +00:00
|
|
|
* Override the macros in the event tracepoint header <trace/events/XXX.h>
|
|
|
|
* to include the following:
|
2009-04-13 16:25:37 +00:00
|
|
|
*
|
2015-05-13 19:27:47 +00:00
|
|
|
* struct trace_event_raw_<call> {
|
2009-04-13 16:25:37 +00:00
|
|
|
* struct trace_entry ent;
|
|
|
|
* <type> <item>;
|
|
|
|
* <type2> <item2>[<len>];
|
|
|
|
* [...]
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* The <type> <item> is created by the __field(type, item) macro or
|
|
|
|
* the __array(type2, item2, len) macro.
|
|
|
|
* We simply do "type item;", and that will create the fields
|
|
|
|
* in the structure.
|
|
|
|
*/
|
|
|
|
|
2015-04-29 18:36:05 +00:00
|
|
|
#include <linux/trace_events.h>
|
2009-04-13 16:25:37 +00:00
|
|
|
|
2015-03-31 18:37:12 +00:00
|
|
|
#ifndef TRACE_SYSTEM_VAR
|
|
|
|
#define TRACE_SYSTEM_VAR TRACE_SYSTEM
|
|
|
|
#endif
|
|
|
|
|
2022-03-03 22:05:33 +00:00
|
|
|
#include "stages/init.h"
|
2017-05-31 21:56:50 +00:00
|
|
|
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
/*
|
2009-11-26 08:04:55 +00:00
|
|
|
* DECLARE_EVENT_CLASS can be used to add a generic function
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
* handlers for events. That is, if all events have the same
|
|
|
|
* parameters and just have distinct trace points.
|
|
|
|
* Each tracepoint can be defined with DEFINE_EVENT and that
|
2009-11-26 08:04:55 +00:00
|
|
|
* will map the DECLARE_EVENT_CLASS to the tracepoint.
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
*
|
|
|
|
* TRACE_EVENT is a one to one mapping between tracepoint and template.
|
|
|
|
*/
|
|
|
|
#undef TRACE_EVENT
|
|
|
|
#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
|
2009-11-26 08:04:55 +00:00
|
|
|
DECLARE_EVENT_CLASS(name, \
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
PARAMS(proto), \
|
|
|
|
PARAMS(args), \
|
|
|
|
PARAMS(tstruct), \
|
|
|
|
PARAMS(assign), \
|
|
|
|
PARAMS(print)); \
|
|
|
|
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage1_struct_define.h"
|
2009-04-13 16:25:37 +00:00
|
|
|
|
2009-11-26 08:04:55 +00:00
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
|
2015-05-13 19:27:47 +00:00
|
|
|
struct trace_event_raw_##name { \
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
struct trace_entry ent; \
|
|
|
|
tstruct \
|
tracing/perf: Avoid -Warray-bounds warning for __rel_loc macro
As done for trace_events.h, also fix the __rel_loc macro in perf.h,
which silences the -Warray-bounds warning:
In file included from ./include/linux/string.h:253,
from ./include/linux/bitmap.h:11,
from ./include/linux/cpumask.h:12,
from ./include/linux/mm_types_task.h:14,
from ./include/linux/mm_types.h:5,
from ./include/linux/buildid.h:5,
from ./include/linux/module.h:14,
from samples/trace_events/trace-events-sample.c:2:
In function '__fortify_strcpy',
inlined from 'perf_trace_foo_rel_loc' at samples/trace_events/./trace-events-sample.h:519:1:
./include/linux/fortify-string.h:47:33: warning: '__builtin_strcpy' offset 12 is out of the bounds [
0, 4] [-Warray-bounds]
47 | #define __underlying_strcpy __builtin_strcpy
| ^
./include/linux/fortify-string.h:445:24: note: in expansion of macro '__underlying_strcpy'
445 | return __underlying_strcpy(p, q);
| ^~~~~~~~~~~~~~~~~~~
Also make __data struct member a proper flexible array to avoid future
problems.
Link: https://lkml.kernel.org/r/20220125220037.2738923-1-keescook@chromium.org
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 55de2c0b5610c ("tracing: Add '__rel_loc' using trace event macros")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-25 22:00:37 +00:00
|
|
|
char __data[]; \
|
2010-04-20 14:47:33 +00:00
|
|
|
}; \
|
|
|
|
\
|
2015-05-05 15:45:27 +00:00
|
|
|
static struct trace_event_class event_class_##name;
|
2010-04-20 14:47:33 +00:00
|
|
|
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
#undef DEFINE_EVENT
|
|
|
|
#define DEFINE_EVENT(template, name, proto, args) \
|
2015-05-05 15:45:27 +00:00
|
|
|
static struct trace_event_call __used \
|
2010-02-24 18:59:23 +00:00
|
|
|
__attribute__((__aligned__(4))) event_##name
|
2009-04-13 16:25:37 +00:00
|
|
|
|
2013-06-20 15:44:44 +00:00
|
|
|
#undef DEFINE_EVENT_FN
|
|
|
|
#define DEFINE_EVENT_FN(template, name, proto, args, reg, unreg) \
|
|
|
|
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
|
|
|
|
|
2009-11-19 01:36:26 +00:00
|
|
|
#undef DEFINE_EVENT_PRINT
|
|
|
|
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
|
|
|
|
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
|
|
|
|
|
2009-08-24 21:43:13 +00:00
|
|
|
/* Callbacks are meaningless to ftrace. */
|
|
|
|
#undef TRACE_EVENT_FN
|
tracing: Fix double CPP substitution in TRACE_EVENT_FN
TRACE_EVENT_FN relays on TRACE_EVENT by reprocessing its parameters
into the ftrace events CPP macro. This leads to a double substitution
in some cases.
For example, a bad consequence is a format always prefixed by
"%s, %s\n" for every TRACE_EVENT_FN based events.
Eg:
cat /debug/tracing/events/syscalls/sys_enter/format
[...]
print fmt: "%s, %s\n", "\"NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)\"",\
"REC->id, REC->args[0], REC->args[1], REC->args[2], REC->args[3],\
REC->args[4], REC->args[5]"
This creates a failure in post-processing tools such as perf trace or
trace-cmd.
Then drop this double substitution and replace it by a new __cpparg()
macro that relays CPP arguments containing commas.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Josh Stone <jistone@redhat.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Jason Baron <jbaron@redhat.com>
LKML-Reference: <1251413406-6704-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-08-27 22:50:06 +00:00
|
|
|
#define TRACE_EVENT_FN(name, proto, args, tstruct, \
|
|
|
|
assign, print, reg, unreg) \
|
2010-07-20 16:41:24 +00:00
|
|
|
TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
|
|
|
|
PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \
|
2015-12-14 20:18:05 +00:00
|
|
|
|
|
|
|
#undef TRACE_EVENT_FN_COND
|
|
|
|
#define TRACE_EVENT_FN_COND(name, proto, args, cond, tstruct, \
|
|
|
|
assign, print, reg, unreg) \
|
|
|
|
TRACE_EVENT_CONDITION(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \
|
|
|
|
PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \
|
2009-08-24 21:43:13 +00:00
|
|
|
|
2010-11-18 00:46:57 +00:00
|
|
|
#undef TRACE_EVENT_FLAGS
|
|
|
|
#define TRACE_EVENT_FLAGS(name, value) \
|
2010-11-18 01:11:42 +00:00
|
|
|
__TRACE_EVENT_FLAGS(name, value)
|
2010-11-18 00:46:57 +00:00
|
|
|
|
2013-11-14 15:23:04 +00:00
|
|
|
#undef TRACE_EVENT_PERF_PERM
|
|
|
|
#define TRACE_EVENT_PERF_PERM(name, expr...) \
|
|
|
|
__TRACE_EVENT_PERF_PERM(name, expr)
|
|
|
|
|
2009-04-13 16:25:37 +00:00
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Stage 2 of the trace events.
|
|
|
|
*
|
tracing/events: provide string with undefined size support
This patch provides the support for dynamic size strings on
event tracing.
The key concept is to use a structure with an ending char array field of
undefined size and use such ability to allocate the minimal size on the
ring buffer to make one or more string entries fit inside, as opposite
to a fixed length strings with upper bound.
The strings themselves are represented using fields which have an offset
value from the beginning of the entry.
This patch provides three new macros:
__string(item, src)
This one declares a string to the structure inside TP_STRUCT__entry.
You need to provide the name of the string field and the source that will
be copied inside.
This will also add the dynamic size of the string needed for the ring
buffer entry allocation.
A stack allocated structure is used to temporarily store the offset
of each strings, avoiding double calls to strlen() on each event
insertion.
__get_str(field)
This one will give you a pointer to the string you have created. This
is an abstract helper to resolve the absolute address given the field
name which is a relative address from the beginning of the trace_structure.
__assign_str(dst, src)
Use this macro to automatically perform the string copy from src to
dst. src must be a variable to assign and dst is the name of a __string
field.
Example on how to use it:
TRACE_EVENT(my_event,
TP_PROTO(char *src1, char *src2),
TP_ARGS(src1, src2),
TP_STRUCT__entry(
__string(str1, src1)
__string(str2, src2)
),
TP_fast_assign(
__assign_str(str1, src1);
__assign_str(str2, src2);
),
TP_printk("%s %s", __get_str(src1), __get_str(src2))
)
Of course you can mix-up any __field or __array inside this
TRACE_EVENT. The position of the __string or __assign_str
doesn't matter.
Changes in v2:
Address the suggestion of Steven Rostedt: drop the opening_string() macro
and redefine __ending_string() to get the size of the string to be copied
instead of overwritting the whole ring buffer allocation.
Changes in v3:
Address other suggestions of Steven Rostedt and Peter Zijlstra with
some changes: drop the __ending_string and the need to have only one
string field.
Use offsets instead of absolute addresses.
[ Impact: allow more compact memory usage for string tracing ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-04-19 02:51:29 +00:00
|
|
|
* Include the following:
|
|
|
|
*
|
2015-05-13 19:33:52 +00:00
|
|
|
* struct trace_event_data_offsets_<call> {
|
2009-07-16 02:54:02 +00:00
|
|
|
* u32 <item1>;
|
|
|
|
* u32 <item2>;
|
tracing/events: provide string with undefined size support
This patch provides the support for dynamic size strings on
event tracing.
The key concept is to use a structure with an ending char array field of
undefined size and use such ability to allocate the minimal size on the
ring buffer to make one or more string entries fit inside, as opposite
to a fixed length strings with upper bound.
The strings themselves are represented using fields which have an offset
value from the beginning of the entry.
This patch provides three new macros:
__string(item, src)
This one declares a string to the structure inside TP_STRUCT__entry.
You need to provide the name of the string field and the source that will
be copied inside.
This will also add the dynamic size of the string needed for the ring
buffer entry allocation.
A stack allocated structure is used to temporarily store the offset
of each strings, avoiding double calls to strlen() on each event
insertion.
__get_str(field)
This one will give you a pointer to the string you have created. This
is an abstract helper to resolve the absolute address given the field
name which is a relative address from the beginning of the trace_structure.
__assign_str(dst, src)
Use this macro to automatically perform the string copy from src to
dst. src must be a variable to assign and dst is the name of a __string
field.
Example on how to use it:
TRACE_EVENT(my_event,
TP_PROTO(char *src1, char *src2),
TP_ARGS(src1, src2),
TP_STRUCT__entry(
__string(str1, src1)
__string(str2, src2)
),
TP_fast_assign(
__assign_str(str1, src1);
__assign_str(str2, src2);
),
TP_printk("%s %s", __get_str(src1), __get_str(src2))
)
Of course you can mix-up any __field or __array inside this
TRACE_EVENT. The position of the __string or __assign_str
doesn't matter.
Changes in v2:
Address the suggestion of Steven Rostedt: drop the opening_string() macro
and redefine __ending_string() to get the size of the string to be copied
instead of overwritting the whole ring buffer allocation.
Changes in v3:
Address other suggestions of Steven Rostedt and Peter Zijlstra with
some changes: drop the __ending_string and the need to have only one
string field.
Use offsets instead of absolute addresses.
[ Impact: allow more compact memory usage for string tracing ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-04-19 02:51:29 +00:00
|
|
|
* [...]
|
|
|
|
* };
|
|
|
|
*
|
2009-07-16 02:54:02 +00:00
|
|
|
* The __dynamic_array() macro will create each u32 <item>, this is
|
tracing/events: introduce __dynamic_array()
__string() is limited:
- it's a char array, but we may want to define array with other types
- a source string should be available, but we may just know the string size
We introduce __dynamic_array() to break those limitations, and __string()
becomes a wrapper of it. As a side effect, now __get_str() can be used
in TP_fast_assign but not only TP_print.
Take XFS for example, we have the string length in the dirent, but the
string itself is not NULL-terminated, so __dynamic_array() can be used:
TRACE_EVENT(xfs_dir2,
TP_PROTO(struct xfs_da_args *args),
TP_ARGS(args),
TP_STRUCT__entry(
__field(int, namelen)
__dynamic_array(char, name, args->namelen + 1)
...
),
TP_fast_assign(
char *name = __get_str(name);
if (args->namelen)
memcpy(name, args->name, args->namelen);
name[args->namelen] = '\0';
__entry->namelen = args->namelen;
),
TP_printk("name %.*s namelen %d",
__entry->namelen ? __get_str(name) : NULL
__entry->namelen)
);
[ Impact: allow defining dynamic size arrays ]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A2384D2.3080403@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-06-01 07:35:46 +00:00
|
|
|
* to keep the offset of each array from the beginning of the event.
|
2009-07-16 02:54:02 +00:00
|
|
|
* The size of an array is also encoded, in the higher 16 bits of <item>.
|
tracing/events: provide string with undefined size support
This patch provides the support for dynamic size strings on
event tracing.
The key concept is to use a structure with an ending char array field of
undefined size and use such ability to allocate the minimal size on the
ring buffer to make one or more string entries fit inside, as opposite
to a fixed length strings with upper bound.
The strings themselves are represented using fields which have an offset
value from the beginning of the entry.
This patch provides three new macros:
__string(item, src)
This one declares a string to the structure inside TP_STRUCT__entry.
You need to provide the name of the string field and the source that will
be copied inside.
This will also add the dynamic size of the string needed for the ring
buffer entry allocation.
A stack allocated structure is used to temporarily store the offset
of each strings, avoiding double calls to strlen() on each event
insertion.
__get_str(field)
This one will give you a pointer to the string you have created. This
is an abstract helper to resolve the absolute address given the field
name which is a relative address from the beginning of the trace_structure.
__assign_str(dst, src)
Use this macro to automatically perform the string copy from src to
dst. src must be a variable to assign and dst is the name of a __string
field.
Example on how to use it:
TRACE_EVENT(my_event,
TP_PROTO(char *src1, char *src2),
TP_ARGS(src1, src2),
TP_STRUCT__entry(
__string(str1, src1)
__string(str2, src2)
),
TP_fast_assign(
__assign_str(str1, src1);
__assign_str(str2, src2);
),
TP_printk("%s %s", __get_str(src1), __get_str(src2))
)
Of course you can mix-up any __field or __array inside this
TRACE_EVENT. The position of the __string or __assign_str
doesn't matter.
Changes in v2:
Address the suggestion of Steven Rostedt: drop the opening_string() macro
and redefine __ending_string() to get the size of the string to be copied
instead of overwritting the whole ring buffer allocation.
Changes in v3:
Address other suggestions of Steven Rostedt and Peter Zijlstra with
some changes: drop the __ending_string and the need to have only one
string field.
Use offsets instead of absolute addresses.
[ Impact: allow more compact memory usage for string tracing ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-04-19 02:51:29 +00:00
|
|
|
*/
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage2_data_offsets.h"
|
tracing: Add __bitmask() macro to trace events to cpumasks and other bitmasks
Being able to show a cpumask of events can be useful as some events
may affect only some CPUs. There is no standard way to record the
cpumask and converting it to a string is rather expensive during
the trace as traces happen in hotpaths. It would be better to record
the raw event mask and be able to parse it at print time.
The following macros were added for use with the TRACE_EVENT() macro:
__bitmask()
__assign_bitmask()
__get_bitmask()
To test this, I added this to the sched_migrate_task event, which
looked like this:
TRACE_EVENT(sched_migrate_task,
TP_PROTO(struct task_struct *p, int dest_cpu, const struct cpumask *cpus),
TP_ARGS(p, dest_cpu, cpus),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, prio )
__field( int, orig_cpu )
__field( int, dest_cpu )
__bitmask( cpumask, num_possible_cpus() )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->prio = p->prio;
__entry->orig_cpu = task_cpu(p);
__entry->dest_cpu = dest_cpu;
__assign_bitmask(cpumask, cpumask_bits(cpus), num_possible_cpus());
),
TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d cpumask=%s",
__entry->comm, __entry->pid, __entry->prio,
__entry->orig_cpu, __entry->dest_cpu,
__get_bitmask(cpumask))
);
With the output of:
ksmtuned-3613 [003] d..2 485.220508: sched_migrate_task: comm=ksmtuned pid=3615 prio=120 orig_cpu=3 dest_cpu=2 cpumask=00000000,0000000f
migration/1-13 [001] d..5 485.221202: sched_migrate_task: comm=ksmtuned pid=3614 prio=120 orig_cpu=1 dest_cpu=0 cpumask=00000000,0000000f
awk-3615 [002] d.H5 485.221747: sched_migrate_task: comm=rcu_preempt pid=7 prio=120 orig_cpu=0 dest_cpu=1 cpumask=00000000,000000ff
migration/2-18 [002] d..5 485.222062: sched_migrate_task: comm=ksmtuned pid=3615 prio=120 orig_cpu=2 dest_cpu=3 cpumask=00000000,0000000f
Link: http://lkml.kernel.org/r/1399377998-14870-6-git-send-email-javi.merino@arm.com
Link: http://lkml.kernel.org/r/20140506132238.22e136d1@gandalf.local.home
Suggested-by: Javi Merino <javi.merino@arm.com>
Tested-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-05-06 17:10:24 +00:00
|
|
|
|
2009-11-26 08:04:55 +00:00
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
2015-05-13 19:33:52 +00:00
|
|
|
struct trace_event_data_offsets_##call { \
|
tracing/events: provide string with undefined size support
This patch provides the support for dynamic size strings on
event tracing.
The key concept is to use a structure with an ending char array field of
undefined size and use such ability to allocate the minimal size on the
ring buffer to make one or more string entries fit inside, as opposite
to a fixed length strings with upper bound.
The strings themselves are represented using fields which have an offset
value from the beginning of the entry.
This patch provides three new macros:
__string(item, src)
This one declares a string to the structure inside TP_STRUCT__entry.
You need to provide the name of the string field and the source that will
be copied inside.
This will also add the dynamic size of the string needed for the ring
buffer entry allocation.
A stack allocated structure is used to temporarily store the offset
of each strings, avoiding double calls to strlen() on each event
insertion.
__get_str(field)
This one will give you a pointer to the string you have created. This
is an abstract helper to resolve the absolute address given the field
name which is a relative address from the beginning of the trace_structure.
__assign_str(dst, src)
Use this macro to automatically perform the string copy from src to
dst. src must be a variable to assign and dst is the name of a __string
field.
Example on how to use it:
TRACE_EVENT(my_event,
TP_PROTO(char *src1, char *src2),
TP_ARGS(src1, src2),
TP_STRUCT__entry(
__string(str1, src1)
__string(str2, src2)
),
TP_fast_assign(
__assign_str(str1, src1);
__assign_str(str2, src2);
),
TP_printk("%s %s", __get_str(src1), __get_str(src2))
)
Of course you can mix-up any __field or __array inside this
TRACE_EVENT. The position of the __string or __assign_str
doesn't matter.
Changes in v2:
Address the suggestion of Steven Rostedt: drop the opening_string() macro
and redefine __ending_string() to get the size of the string to be copied
instead of overwritting the whole ring buffer allocation.
Changes in v3:
Address other suggestions of Steven Rostedt and Peter Zijlstra with
some changes: drop the __ending_string and the need to have only one
string field.
Use offsets instead of absolute addresses.
[ Impact: allow more compact memory usage for string tracing ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-04-19 02:51:29 +00:00
|
|
|
tstruct; \
|
|
|
|
};
|
|
|
|
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
#undef DEFINE_EVENT
|
|
|
|
#define DEFINE_EVENT(template, name, proto, args)
|
|
|
|
|
2009-11-19 01:36:26 +00:00
|
|
|
#undef DEFINE_EVENT_PRINT
|
2020-06-12 09:28:43 +00:00
|
|
|
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
|
2009-11-19 01:36:26 +00:00
|
|
|
|
2010-11-18 00:46:57 +00:00
|
|
|
#undef TRACE_EVENT_FLAGS
|
|
|
|
#define TRACE_EVENT_FLAGS(event, flag)
|
|
|
|
|
2013-11-14 15:23:04 +00:00
|
|
|
#undef TRACE_EVENT_PERF_PERM
|
|
|
|
#define TRACE_EVENT_PERF_PERM(event, expr...)
|
|
|
|
|
tracing/events: provide string with undefined size support
This patch provides the support for dynamic size strings on
event tracing.
The key concept is to use a structure with an ending char array field of
undefined size and use such ability to allocate the minimal size on the
ring buffer to make one or more string entries fit inside, as opposite
to a fixed length strings with upper bound.
The strings themselves are represented using fields which have an offset
value from the beginning of the entry.
This patch provides three new macros:
__string(item, src)
This one declares a string to the structure inside TP_STRUCT__entry.
You need to provide the name of the string field and the source that will
be copied inside.
This will also add the dynamic size of the string needed for the ring
buffer entry allocation.
A stack allocated structure is used to temporarily store the offset
of each strings, avoiding double calls to strlen() on each event
insertion.
__get_str(field)
This one will give you a pointer to the string you have created. This
is an abstract helper to resolve the absolute address given the field
name which is a relative address from the beginning of the trace_structure.
__assign_str(dst, src)
Use this macro to automatically perform the string copy from src to
dst. src must be a variable to assign and dst is the name of a __string
field.
Example on how to use it:
TRACE_EVENT(my_event,
TP_PROTO(char *src1, char *src2),
TP_ARGS(src1, src2),
TP_STRUCT__entry(
__string(str1, src1)
__string(str2, src2)
),
TP_fast_assign(
__assign_str(str1, src1);
__assign_str(str2, src2);
),
TP_printk("%s %s", __get_str(src1), __get_str(src2))
)
Of course you can mix-up any __field or __array inside this
TRACE_EVENT. The position of the __string or __assign_str
doesn't matter.
Changes in v2:
Address the suggestion of Steven Rostedt: drop the opening_string() macro
and redefine __ending_string() to get the size of the string to be copied
instead of overwritting the whole ring buffer allocation.
Changes in v3:
Address other suggestions of Steven Rostedt and Peter Zijlstra with
some changes: drop the __ending_string and the need to have only one
string field.
Use offsets instead of absolute addresses.
[ Impact: allow more compact memory usage for string tracing ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-04-19 02:51:29 +00:00
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Stage 3 of the trace events.
|
|
|
|
*
|
2015-03-03 21:48:18 +00:00
|
|
|
* Override the macros in the event tracepoint header <trace/events/XXX.h>
|
|
|
|
* to include the following:
|
2009-04-13 16:25:37 +00:00
|
|
|
*
|
|
|
|
* enum print_line_t
|
2015-05-05 18:18:11 +00:00
|
|
|
* trace_raw_output_<call>(struct trace_iterator *iter, int flags)
|
2009-04-13 16:25:37 +00:00
|
|
|
* {
|
|
|
|
* struct trace_seq *s = &iter->seq;
|
2015-05-13 19:27:47 +00:00
|
|
|
* struct trace_event_raw_<call> *field; <-- defined in stage 1
|
2010-06-03 10:26:24 +00:00
|
|
|
* struct trace_seq *p = &iter->tmp_seq;
|
2020-10-15 14:55:16 +00:00
|
|
|
*
|
|
|
|
* -------(for event)-------
|
|
|
|
*
|
|
|
|
* struct trace_entry *entry;
|
2009-04-13 16:25:37 +00:00
|
|
|
*
|
|
|
|
* entry = iter->ent;
|
|
|
|
*
|
2010-04-23 14:38:03 +00:00
|
|
|
* if (entry->type != event_<call>->event.type) {
|
2009-04-13 16:25:37 +00:00
|
|
|
* WARN_ON_ONCE(1);
|
|
|
|
* return TRACE_TYPE_UNHANDLED;
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* field = (typeof(field))entry;
|
|
|
|
*
|
2009-06-03 13:52:03 +00:00
|
|
|
* trace_seq_init(p);
|
2020-10-15 14:55:16 +00:00
|
|
|
* return trace_output_call(iter, <call>, <TP_printk> "\n");
|
|
|
|
*
|
|
|
|
* ------(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");
|
2009-04-13 16:25:37 +00:00
|
|
|
*
|
2020-10-15 14:55:16 +00:00
|
|
|
* return trace_handle_return(s);
|
|
|
|
* -------
|
|
|
|
* }
|
2009-04-13 16:25:37 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* in binary.
|
|
|
|
*/
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage3_trace_output.h"
|
trace: Add __print_ns_to_secs() and __print_ns_without_secs() helpers
To have nanosecond output displayed in a more human readable format, its
nicer to convert it to a seconds format (XXX.YYYYYYYYY). The problem is that
to do so, the numbers must be divided by NSEC_PER_SEC, and moded too. But as
these numbers are 64 bit, this can not be done simply with '/' and '%'
operators, but must use do_div() instead.
Instead of performing the expensive do_div() in the hot path of the
tracepoint, it is more efficient to perform it during the output phase. But
passing in do_div() can confuse the parser, and do_div() doesn't work
exactly like a normal C function. It modifies the number in place, and we
don't want to modify the actual values in the ring buffer.
Two helper functions are now created:
__print_ns_to_secs() and __print_ns_without_secs()
They both take a value of nanoseconds, and the former will return that
number divided by NSEC_PER_SEC, and the latter will mod it with NSEC_PER_SEC
giving a way to print a nice human readable format:
__print_fmt("time=%llu.%09u",
__print_ns_to_secs(REC->nsec_val),
__print_ns_without_secs(REC->nsec_val))
Link: https://lkml.kernel.org/r/e503b903045496c4ccde52843e1e318b422f7a56.1624372313.git.bristot@redhat.com
Cc: Phil Auld <pauld@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Kate Carcia <kcarcia@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexandre Chartre <alexandre.chartre@oracle.com>
Cc: Clark Willaims <williams@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2021-06-22 14:42:26 +00:00
|
|
|
|
2009-11-26 08:04:55 +00:00
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
2010-02-16 15:38:47 +00:00
|
|
|
static notrace enum print_line_t \
|
2015-05-05 18:18:11 +00:00
|
|
|
trace_raw_output_##call(struct trace_iterator *iter, int flags, \
|
|
|
|
struct trace_event *trace_event) \
|
2009-04-13 16:25:37 +00:00
|
|
|
{ \
|
|
|
|
struct trace_seq *s = &iter->seq; \
|
2013-02-21 02:32:38 +00:00
|
|
|
struct trace_seq __maybe_unused *p = &iter->tmp_seq; \
|
2015-05-13 19:27:47 +00:00
|
|
|
struct trace_event_raw_##call *field; \
|
2009-04-13 16:25:37 +00:00
|
|
|
int ret; \
|
|
|
|
\
|
2013-02-21 02:32:38 +00:00
|
|
|
field = (typeof(field))iter->ent; \
|
2010-04-23 14:00:22 +00:00
|
|
|
\
|
2015-05-05 18:18:11 +00:00
|
|
|
ret = trace_raw_output_prep(iter, trace_event); \
|
2014-11-14 16:42:06 +00:00
|
|
|
if (ret != TRACE_TYPE_HANDLED) \
|
2013-02-21 02:32:38 +00:00
|
|
|
return ret; \
|
|
|
|
\
|
2020-10-15 14:55:07 +00:00
|
|
|
trace_event_printf(iter, print); \
|
2009-04-13 16:25:37 +00:00
|
|
|
\
|
2014-11-12 15:29:54 +00:00
|
|
|
return trace_handle_return(s); \
|
2010-04-23 14:00:22 +00:00
|
|
|
} \
|
2015-05-13 19:35:44 +00:00
|
|
|
static struct trace_event_functions trace_event_type_funcs_##call = { \
|
2015-05-05 18:18:11 +00:00
|
|
|
.trace = trace_raw_output_##call, \
|
2010-04-23 14:00:22 +00:00
|
|
|
};
|
tracing: Create new TRACE_EVENT_TEMPLATE
There are some places in the kernel that define several tracepoints and
they are all identical besides the name. The code to enable, disable and
record is created for every trace point even if most of the code is
identical.
This patch adds TRACE_EVENT_TEMPLATE that lets the developer create
a template TRACE_EVENT and create trace points with DEFINE_EVENT, which
is based off of a given template. Each trace point used by this
will share most of the code, and bring down the size of the kernel
when there are several duplicate events.
Usage is:
TRACE_EVENT_TEMPLATE(name, proto, args, tstruct, assign, print);
Which would be the same as defining a normal TRACE_EVENT.
To create the trace events that the trace points will use:
DEFINE_EVENT(template, name, proto, args) is done. The template
is the name of the TRACE_EVENT_TEMPLATE to use. The name is the
name of the trace point. The parameters proto and args must be the same
as the proto and args of the template. If they are not the same,
then a compile error will result. I tried hard removing this duplication
but the C preprocessor is not powerful enough (or my CPP magic
experience points is not at a high enough level) to not need them.
A lot of trace events are coming in with new XFS development. Most of
the trace points are identical except for the name. The following shows
the advantage of having TRACE_EVENT_TEMPLATE:
$ size fs/xfs/xfs.o.*
text data bss dec hex filename
452114 2788 3520 458422 6feb6 fs/xfs/xfs.o.old
638482 38116 3744 680342 a6196 fs/xfs/xfs.o.template
996954 38116 4480 1039550 fdcbe fs/xfs/xfs.o.trace
xfs.o.old is without any tracepoints.
xfs.o.template uses the new TRACE_EVENT_TEMPLATE.
xfs.o.trace uses the current TRACE_EVENT macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-19 01:27:27 +00:00
|
|
|
|
2009-11-19 01:36:26 +00:00
|
|
|
#undef DEFINE_EVENT_PRINT
|
|
|
|
#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
|
2010-02-16 15:38:47 +00:00
|
|
|
static notrace enum print_line_t \
|
2015-05-05 18:18:11 +00:00
|
|
|
trace_raw_output_##call(struct trace_iterator *iter, int flags, \
|
2010-04-22 22:46:14 +00:00
|
|
|
struct trace_event *event) \
|
2009-11-19 01:36:26 +00:00
|
|
|
{ \
|
2015-05-13 19:27:47 +00:00
|
|
|
struct trace_event_raw_##template *field; \
|
2009-11-19 01:36:26 +00:00
|
|
|
struct trace_entry *entry; \
|
2010-06-03 10:26:24 +00:00
|
|
|
struct trace_seq *p = &iter->tmp_seq; \
|
2009-04-13 16:25:37 +00:00
|
|
|
\
|
|
|
|
entry = iter->ent; \
|
|
|
|
\
|
2010-04-23 14:38:03 +00:00
|
|
|
if (entry->type != event_##call.event.type) { \
|
2009-04-13 16:25:37 +00:00
|
|
|
WARN_ON_ONCE(1); \
|
|
|
|
return TRACE_TYPE_UNHANDLED; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
field = (typeof(field))entry; \
|
|
|
|
\
|
2009-06-03 13:52:03 +00:00
|
|
|
trace_seq_init(p); \
|
2015-05-05 18:18:11 +00:00
|
|
|
return trace_output_call(iter, #call, print); \
|
2010-04-23 14:00:22 +00:00
|
|
|
} \
|
2015-05-13 19:35:44 +00:00
|
|
|
static struct trace_event_functions trace_event_type_funcs_##call = { \
|
2015-05-05 18:18:11 +00:00
|
|
|
.trace = trace_raw_output_##call, \
|
2010-04-23 14:00:22 +00:00
|
|
|
};
|
2009-11-19 01:36:26 +00:00
|
|
|
|
2009-04-13 16:25:37 +00:00
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage4_event_fields.h"
|
2021-11-22 09:30:21 +00:00
|
|
|
|
2009-11-26 08:04:55 +00:00
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \
|
2019-10-24 20:26:59 +00:00
|
|
|
static struct trace_event_fields trace_event_fields_##call[] = { \
|
|
|
|
tstruct \
|
|
|
|
{} };
|
2009-04-13 16:25:37 +00:00
|
|
|
|
2009-11-19 01:36:26 +00:00
|
|
|
#undef DEFINE_EVENT_PRINT
|
2020-06-12 09:28:43 +00:00
|
|
|
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
|
2009-11-19 01:36:26 +00:00
|
|
|
|
2009-04-13 16:25:37 +00:00
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage5_get_offsets.h"
|
2021-11-22 09:30:21 +00:00
|
|
|
|
2009-11-26 08:04:55 +00:00
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
2015-05-13 19:40:23 +00:00
|
|
|
static inline notrace int trace_event_get_offsets_##call( \
|
2015-05-13 19:33:52 +00:00
|
|
|
struct trace_event_data_offsets_##call *__data_offsets, proto) \
|
tracing/events: introduce __dynamic_array()
__string() is limited:
- it's a char array, but we may want to define array with other types
- a source string should be available, but we may just know the string size
We introduce __dynamic_array() to break those limitations, and __string()
becomes a wrapper of it. As a side effect, now __get_str() can be used
in TP_fast_assign but not only TP_print.
Take XFS for example, we have the string length in the dirent, but the
string itself is not NULL-terminated, so __dynamic_array() can be used:
TRACE_EVENT(xfs_dir2,
TP_PROTO(struct xfs_da_args *args),
TP_ARGS(args),
TP_STRUCT__entry(
__field(int, namelen)
__dynamic_array(char, name, args->namelen + 1)
...
),
TP_fast_assign(
char *name = __get_str(name);
if (args->namelen)
memcpy(name, args->name, args->namelen);
name[args->namelen] = '\0';
__entry->namelen = args->namelen;
),
TP_printk("name %.*s namelen %d",
__entry->namelen ? __get_str(name) : NULL
__entry->namelen)
);
[ Impact: allow defining dynamic size arrays ]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A2384D2.3080403@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-06-01 07:35:46 +00:00
|
|
|
{ \
|
|
|
|
int __data_size = 0; \
|
2014-03-01 05:32:17 +00:00
|
|
|
int __maybe_unused __item_length; \
|
2015-05-13 19:27:47 +00:00
|
|
|
struct trace_event_raw_##call __maybe_unused *entry; \
|
tracing/events: introduce __dynamic_array()
__string() is limited:
- it's a char array, but we may want to define array with other types
- a source string should be available, but we may just know the string size
We introduce __dynamic_array() to break those limitations, and __string()
becomes a wrapper of it. As a side effect, now __get_str() can be used
in TP_fast_assign but not only TP_print.
Take XFS for example, we have the string length in the dirent, but the
string itself is not NULL-terminated, so __dynamic_array() can be used:
TRACE_EVENT(xfs_dir2,
TP_PROTO(struct xfs_da_args *args),
TP_ARGS(args),
TP_STRUCT__entry(
__field(int, namelen)
__dynamic_array(char, name, args->namelen + 1)
...
),
TP_fast_assign(
char *name = __get_str(name);
if (args->namelen)
memcpy(name, args->name, args->namelen);
name[args->namelen] = '\0';
__entry->namelen = args->namelen;
),
TP_printk("name %.*s namelen %d",
__entry->namelen ? __get_str(name) : NULL
__entry->namelen)
);
[ Impact: allow defining dynamic size arrays ]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A2384D2.3080403@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-06-01 07:35:46 +00:00
|
|
|
\
|
|
|
|
tstruct; \
|
|
|
|
\
|
|
|
|
return __data_size; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
2015-09-23 13:26:27 +00:00
|
|
|
/*
|
|
|
|
* Stage 4 of the trace events.
|
|
|
|
*
|
2015-03-03 21:48:18 +00:00
|
|
|
* Override the macros in the event tracepoint header <trace/events/XXX.h>
|
|
|
|
* to include the following:
|
2015-09-23 13:26:27 +00:00
|
|
|
*
|
|
|
|
* For those macros defined with TRACE_EVENT:
|
|
|
|
*
|
|
|
|
* static struct trace_event_call event_<call>;
|
|
|
|
*
|
|
|
|
* static void trace_event_raw_event_<call>(void *__data, proto)
|
|
|
|
* {
|
|
|
|
* struct trace_event_file *trace_file = __data;
|
|
|
|
* struct trace_event_call *event_call = trace_file->event_call;
|
|
|
|
* struct trace_event_data_offsets_<call> __maybe_unused __data_offsets;
|
|
|
|
* unsigned long eflags = trace_file->flags;
|
|
|
|
* enum event_trigger_type __tt = ETT_NONE;
|
|
|
|
* struct ring_buffer_event *event;
|
|
|
|
* struct trace_event_raw_<call> *entry; <-- defined in stage 1
|
2019-12-13 18:58:57 +00:00
|
|
|
* struct trace_buffer *buffer;
|
2015-09-23 13:26:27 +00:00
|
|
|
* unsigned long irq_flags;
|
|
|
|
* int __data_size;
|
|
|
|
* int pc;
|
|
|
|
*
|
|
|
|
* if (!(eflags & EVENT_FILE_FL_TRIGGER_COND)) {
|
|
|
|
* if (eflags & EVENT_FILE_FL_TRIGGER_MODE)
|
|
|
|
* event_triggers_call(trace_file, NULL);
|
|
|
|
* if (eflags & EVENT_FILE_FL_SOFT_DISABLED)
|
|
|
|
* return;
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* local_save_flags(irq_flags);
|
|
|
|
* pc = preempt_count();
|
|
|
|
*
|
|
|
|
* __data_size = trace_event_get_offsets_<call>(&__data_offsets, args);
|
|
|
|
*
|
|
|
|
* event = trace_event_buffer_lock_reserve(&buffer, trace_file,
|
|
|
|
* event_<call>->event.type,
|
|
|
|
* sizeof(*entry) + __data_size,
|
|
|
|
* irq_flags, pc);
|
|
|
|
* if (!event)
|
|
|
|
* return;
|
|
|
|
* entry = ring_buffer_event_data(event);
|
|
|
|
*
|
|
|
|
* { <assign>; } <-- Here we assign the entries by the __field and
|
|
|
|
* __array macros.
|
|
|
|
*
|
|
|
|
* if (eflags & EVENT_FILE_FL_TRIGGER_COND)
|
|
|
|
* __tt = event_triggers_call(trace_file, entry);
|
|
|
|
*
|
|
|
|
* if (test_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT,
|
|
|
|
* &trace_file->flags))
|
|
|
|
* ring_buffer_discard_commit(buffer, event);
|
|
|
|
* else if (!filter_check_discard(trace_file, entry, buffer, event))
|
|
|
|
* trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
|
|
|
|
*
|
|
|
|
* if (__tt)
|
|
|
|
* event_triggers_post_call(trace_file, __tt);
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* static struct trace_event ftrace_event_type_<call> = {
|
|
|
|
* .trace = trace_raw_output_<call>, <-- stage 2
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* static char print_fmt_<call>[] = <TP_printk>;
|
|
|
|
*
|
|
|
|
* static struct trace_event_class __used event_class_<template> = {
|
|
|
|
* .system = "<system>",
|
2019-10-24 20:26:59 +00:00
|
|
|
* .fields_array = trace_event_fields_<call>,
|
2015-09-23 13:26:27 +00:00
|
|
|
* .fields = LIST_HEAD_INIT(event_class_##call.fields),
|
|
|
|
* .raw_init = trace_event_raw_init,
|
|
|
|
* .probe = trace_event_raw_event_##call,
|
|
|
|
* .reg = trace_event_reg,
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* static struct trace_event_call event_<call> = {
|
|
|
|
* .class = event_class_<template>,
|
|
|
|
* {
|
|
|
|
* .tp = &__tracepoint_<call>,
|
|
|
|
* },
|
|
|
|
* .event = &ftrace_event_type_<call>,
|
|
|
|
* .print_fmt = print_fmt_<call>,
|
|
|
|
* .flags = TRACE_EVENT_FL_TRACEPOINT,
|
|
|
|
* };
|
|
|
|
* // its only safe to use pointers when doing linker tricks to
|
|
|
|
* // create an array.
|
|
|
|
* static struct trace_event_call __used
|
2020-10-22 02:36:07 +00:00
|
|
|
* __section("_ftrace_events") *__event_<call> = &event_<call>;
|
2015-09-23 13:26:27 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
|
|
|
|
|
|
|
#define _TRACE_PERF_PROTO(call, proto) \
|
|
|
|
static notrace void \
|
|
|
|
perf_trace_##call(void *__data, proto);
|
|
|
|
|
|
|
|
#define _TRACE_PERF_INIT(call) \
|
|
|
|
.perf_probe = perf_trace_##call,
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define _TRACE_PERF_PROTO(call, proto)
|
|
|
|
#define _TRACE_PERF_INIT(call)
|
|
|
|
#endif /* CONFIG_PERF_EVENTS */
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage6_event_callback.h"
|
2015-09-23 13:26:27 +00:00
|
|
|
|
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
|
|
|
\
|
|
|
|
static notrace void \
|
|
|
|
trace_event_raw_event_##call(void *__data, proto) \
|
|
|
|
{ \
|
|
|
|
struct trace_event_file *trace_file = __data; \
|
|
|
|
struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
|
|
|
|
struct trace_event_buffer fbuffer; \
|
|
|
|
struct trace_event_raw_##call *entry; \
|
|
|
|
int __data_size; \
|
|
|
|
\
|
|
|
|
if (trace_trigger_soft_disabled(trace_file)) \
|
|
|
|
return; \
|
|
|
|
\
|
|
|
|
__data_size = trace_event_get_offsets_##call(&__data_offsets, args); \
|
|
|
|
\
|
|
|
|
entry = trace_event_buffer_reserve(&fbuffer, trace_file, \
|
|
|
|
sizeof(*entry) + __data_size); \
|
|
|
|
\
|
|
|
|
if (!entry) \
|
|
|
|
return; \
|
|
|
|
\
|
|
|
|
tstruct \
|
|
|
|
\
|
|
|
|
{ assign; } \
|
|
|
|
\
|
|
|
|
trace_event_buffer_commit(&fbuffer); \
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* The ftrace_test_probe is compiled out, it is only here as a build time check
|
|
|
|
* to make sure that if the tracepoint handling changes, the ftrace probe will
|
|
|
|
* fail to compile unless it too is updated.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#undef DEFINE_EVENT
|
|
|
|
#define DEFINE_EVENT(template, call, proto, args) \
|
|
|
|
static inline void ftrace_test_probe_##call(void) \
|
|
|
|
{ \
|
|
|
|
check_trace_callback_type_##call(trace_event_raw_event_##template); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
|
|
|
|
2022-03-29 20:50:44 +00:00
|
|
|
#include "stages/stage7_class_define.h"
|
2015-09-23 13:26:27 +00:00
|
|
|
|
|
|
|
#undef DECLARE_EVENT_CLASS
|
|
|
|
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
|
|
|
_TRACE_PERF_PROTO(call, PARAMS(proto)); \
|
|
|
|
static char print_fmt_##call[] = print; \
|
|
|
|
static struct trace_event_class __used __refdata event_class_##call = { \
|
|
|
|
.system = TRACE_SYSTEM_STRING, \
|
2019-10-24 20:26:59 +00:00
|
|
|
.fields_array = trace_event_fields_##call, \
|
2015-09-23 13:26:27 +00:00
|
|
|
.fields = LIST_HEAD_INIT(event_class_##call.fields),\
|
|
|
|
.raw_init = trace_event_raw_init, \
|
|
|
|
.probe = trace_event_raw_event_##call, \
|
|
|
|
.reg = trace_event_reg, \
|
|
|
|
_TRACE_PERF_INIT(call) \
|
|
|
|
};
|
|
|
|
|
|
|
|
#undef DEFINE_EVENT
|
|
|
|
#define DEFINE_EVENT(template, call, proto, args) \
|
|
|
|
\
|
|
|
|
static struct trace_event_call __used event_##call = { \
|
|
|
|
.class = &event_class_##template, \
|
|
|
|
{ \
|
|
|
|
.tp = &__tracepoint_##call, \
|
|
|
|
}, \
|
|
|
|
.event.funcs = &trace_event_type_funcs_##template, \
|
|
|
|
.print_fmt = print_fmt_##template, \
|
|
|
|
.flags = TRACE_EVENT_FL_TRACEPOINT, \
|
|
|
|
}; \
|
|
|
|
static struct trace_event_call __used \
|
2020-10-22 02:36:07 +00:00
|
|
|
__section("_ftrace_events") *__event_##call = &event_##call
|
2015-09-23 13:26:27 +00:00
|
|
|
|
|
|
|
#undef DEFINE_EVENT_PRINT
|
|
|
|
#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
|
|
|
|
\
|
|
|
|
static char print_fmt_##call[] = print; \
|
|
|
|
\
|
|
|
|
static struct trace_event_call __used event_##call = { \
|
|
|
|
.class = &event_class_##template, \
|
|
|
|
{ \
|
|
|
|
.tp = &__tracepoint_##call, \
|
|
|
|
}, \
|
|
|
|
.event.funcs = &trace_event_type_funcs_##call, \
|
|
|
|
.print_fmt = print_fmt_##call, \
|
|
|
|
.flags = TRACE_EVENT_FL_TRACEPOINT, \
|
|
|
|
}; \
|
|
|
|
static struct trace_event_call __used \
|
2020-10-22 02:36:07 +00:00
|
|
|
__section("_ftrace_events") *__event_##call = &event_##call
|
2015-09-23 13:26:27 +00:00
|
|
|
|
|
|
|
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|