tracing: Update the TRACE_EVENT fields available in the sample code
[deliverable/linux.git] / samples / trace_events / trace-events-sample.c
index aabc4e97091126cbf51b43e0e7e47005ab99267b..16c15c08ed38936dc56c469a6fc623f3942f2c95 100644 (file)
 #define CREATE_TRACE_POINTS
 #include "trace-events-sample.h"
 
+static const char *random_strings[] = {
+       "Mother Goose",
+       "Snoopy",
+       "Gandalf",
+       "Frodo",
+       "One ring to rule them all"
+};
 
 static void simple_thread_func(int cnt)
 {
+       int array[6];
+       int len = cnt % 5;
+       int i;
+
        set_current_state(TASK_INTERRUPTIBLE);
        schedule_timeout(HZ);
-       trace_foo_bar("hello", cnt);
+
+       for (i = 0; i < len; i++)
+               array[i] = i + 1;
+       array[i] = 0;
+
+       trace_foo_bar("hello", cnt, array, random_strings[len],
+                     tsk_cpus_allowed(current));
 }
 
 static int simple_thread(void *arg)
This page took 0.023849 seconds and 5 git commands to generate.