All of lore.kernel.org
 help / color / mirror / Atom feed
* TRACE_EVENT without ARGS
@ 2012-09-21 15:35 Wolfgang Grandegger
  2012-09-21 16:14 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2012-09-21 15:35 UTC (permalink / raw)
  To: LKML; +Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar

Hello,

I would like to define trace events for functions without arguments,
e.g. my_yield(). But TRACE_EVENT requires at least one argument to be
defined and I also have not found an example in the kernel sources,
apart from:

  $ cat include/trace/events/xen.h
  ...
  TRACE_EVENT(xen_mmu_flush_tlb,
              TP_PROTO(int x),
              TP_ARGS(x),
              TP_STRUCT__entry(__array(char, x, 0)),
              TP_fast_assign((void)x),
              TP_printk("%s", "")
          );

It uses a dummy argument to work around the problem. Is that the
recommended way to handle such cases?

TIA,

Wolfgang

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-21 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 15:35 TRACE_EVENT without ARGS Wolfgang Grandegger
2012-09-21 16:14 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.