summaryrefslogtreecommitdiffstats
path: root/samples/trace_events/trace-events-sample.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-11-22 10:30:30 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-12-06 21:37:22 +0100
commitb466b13321648d3bd7bfceb9afcba5302b585cf8 (patch)
tree6f5ef22ae41cd91c77ca54601d180a811a54c14f /samples/trace_events/trace-events-sample.c
parenttracing: Add '__rel_loc' using trace event macros (diff)
downloadlinux-b466b13321648d3bd7bfceb9afcba5302b585cf8.tar.xz
linux-b466b13321648d3bd7bfceb9afcba5302b585cf8.zip
samples/trace_event: Add '__rel_loc' using sample event
Add '__rel_loc' using sample event for testing. User can use this for testing purpose. There is no reason to use this macro from the kernel. Link: https://lkml.kernel.org/r/163757343050.510314.2876529802471645178.stgit@devnote2 Cc: Beau Belgrave <beaub@linux.microsoft.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'samples/trace_events/trace-events-sample.c')
-rw-r--r--samples/trace_events/trace-events-sample.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_events/trace-events-sample.c
index 1a72b7d95cdc..4d34dc0b0fee 100644
--- a/samples/trace_events/trace-events-sample.c
+++ b/samples/trace_events/trace-events-sample.c
@@ -21,6 +21,7 @@ static const char *random_strings[] = {
static void simple_thread_func(int cnt)
{
+ unsigned long bitmask[1] = {0xdeadbeefUL};
int array[6];
int len = cnt % 5;
int i;
@@ -43,6 +44,8 @@ static void simple_thread_func(int cnt)
trace_foo_with_template_cond("prints other times", cnt);
trace_foo_with_template_print("I have to be different", cnt);
+
+ trace_foo_rel_loc("Hello __rel_loc", cnt, bitmask);
}
static int simple_thread(void *arg)