All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: TRACE_EVENT without ARGS
Date: Fri, 21 Sep 2012 17:35:19 +0200	[thread overview]
Message-ID: <505C8937.4040505@grandegger.com> (raw)

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

             reply	other threads:[~2012-09-21 16:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 15:35 Wolfgang Grandegger [this message]
2012-09-21 16:14 ` TRACE_EVENT without ARGS Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=505C8937.4040505@grandegger.com \
    --to=wg@grandegger.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.