Lines Matching +full:foo +full:- +full:bar

1 /* SPDX-License-Identifier: GPL-2.0 */
8 * In this case, it would look for sample-trace.h
14 * This file is called trace-events-sample.h but we want the system
15 * to be called "sample-trace". Therefore we must define the name of this
18 * #define TRACE_INCLUDE_FILE trace-events-sample
26 #define TRACE_SYSTEM sample-trace
29 * TRACE_SYSTEM is expected to be a C valid variable (alpha-numeric
36 * But the above is only needed if TRACE_SYSTEM is not alpha-numeric
38 * TRACE_SYSTEM. As TRACE_SYSTEM_VAR must be alpha-numeric, if
40 * only alpha-numeric and underscores.
70 * Here it is trace_foo_bar(char *foo, int bar).
73 * Here it is simply "foo, bar".
85 * __field(int, foo)
87 * __entry->foo = 5;
94 * __field_struct(struct bar, foo)
96 * __entry->bar.x = y;
102 * __array( char, foo, 10) is the same as saying: char foo[10];
106 * __entry->foo[0] = 'a';
108 * memcpy(__entry->foo, bar, 10);
119 * __dynamic_array( int, foo, bar) is similar to: int foo[bar];
124 * memcpy(__get_dynamic_array(foo), bar, 10);
135 * __string(foo, bar) is similar to: strcpy(foo, bar)
139 * __assign_str(foo);
143 * saved string into the "foo" field.
155 * __vstring(foo, fmt, va) is similar to: vsnprintf(foo, fmt, va)
159 * __assign_vstr(foo, fmt, va);
175 * __string_len(foo, bar, len)
181 * __assign_str(foo);
186 * memcpy(__get_str(foo), bar, len);
187 * __get_str(foo)[len] = 0;
191 * for the '\0' terminating byte, and __get_str(foo) can be used
203 * __assign_bitmask(target_cpus, cpumask_bits(bar), nr_cpumask_bits);
214 * __assign_cpumask(target_cpus, cpumask_bits(bar));
230 * For __dynamic_array(int, foo, bar) use __get_dynamic_array(foo)
231 * Use __get_dynamic_array_len(foo) to get the length of the array
237 * For __string(foo, bar) use __get_str(foo)
293 TP_PROTO(const char *foo, int bar, const int *lst,
297 TP_ARGS(foo, bar, lst, string, mask, fmt, va),
300 __array( char, foo, 10 )
301 __field( int, bar )
307 __string_len( lstr, foo, bar / 2 < strlen(foo) ? bar / 2 : strlen(foo) )
311 strscpy(__entry->foo, foo, 10);
312 __entry->bar = bar;
322 TP_printk("foo %s %d %s %s %s %s %s %s (%s) (%s) %s [%d] %*pbl",
323 __entry->foo, __entry->bar,
333 * version of the number (if __entry->bar == 7 then "7" is returned).
335 __print_symbolic(__entry->bar,
353 __print_flags(__entry->bar, "|",
419 TP_PROTO(const char *foo, int bar),
421 TP_ARGS(foo, bar),
423 TP_CONDITION(!(bar % 10)),
426 __string( foo, foo )
427 __field( int, bar )
431 __assign_str(foo);
432 __entry->bar = bar;
435 TP_printk("foo %s %d", __get_str(foo), __entry->bar)
462 TP_PROTO(const char *foo, int bar),
464 TP_ARGS(foo, bar),
467 __string( foo, foo )
468 __field( int, bar )
472 __assign_str(foo);
473 __entry->bar = bar;
476 TP_printk("foo %s %d", __get_str(foo), __entry->bar),
509 TP_PROTO(const char *foo, int bar),
511 TP_ARGS(foo, bar),
514 __string( foo, foo )
515 __field( int, bar )
519 __assign_str(foo);
520 __entry->bar = bar;
523 TP_printk("foo %s %d", __get_str(foo), __entry->bar)
531 TP_PROTO(const char *foo, int bar),
532 TP_ARGS(foo, bar));
535 TP_PROTO(const char *foo, int bar),
536 TP_ARGS(foo, bar),
537 TP_CONDITION(!(bar % 8)));
541 TP_PROTO(const char *foo, int bar),
542 TP_ARGS(foo, bar),
558 TP_PROTO(const char *foo, int bar),
559 TP_ARGS(foo, bar),
560 TP_printk("bar %s %d", __get_str(foo), __entry->bar));
567 * different. This is expected to be used with user-space event,
574 TP_PROTO(const char *foo, int bar, unsigned long *mask, const cpumask_t *cpus),
576 TP_ARGS(foo, bar, mask, cpus),
579 __rel_string( foo, foo )
580 __field( int, bar )
587 __assign_rel_str(foo);
588 __entry->bar = bar;
594 TP_printk("foo_rel_loc %s, %d, %s, %s", __get_rel_str(foo), __entry->bar,
616 * CFLAGS_trace-events-sample.o := -I$(src)
623 * CFLAGS_trace-events-sample.o := -I$(PWD)
639 #define TRACE_INCLUDE_FILE trace-events-sample