All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jason Baron <jbaron@redhat.com>,
	mingo@elte.hu, rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] export softirq_to_name symbol
Date: Fri, 01 May 2009 14:25:09 -0700	[thread overview]
Message-ID: <49FB68B5.4090804@redhat.com> (raw)
In-Reply-To: <20090501202246.GA20056@infradead.org>

On 05/01/2009 01:22 PM, Christoph Hellwig wrote:
> On Fri, May 01, 2009 at 01:17:59PM -0700, Josh Stone wrote:
>> More precisely, it's the piece of code that copies the trace into an
>> __entry pointer.  In my case, __entry has nothing to do with the ring
>> buffer.
> 
> Well, it should be the ring buffer.  If you want to do something more
> fancy rewrite it in proper C code and submit a patch for discussion to
> lkml.

It's not that fancy -- this is basically it:

#define __field(type, item)         type item;
#define __array(type, item, len)    type item[len];
#define __string(item, src)         const char * __str_##item;
#define __assign_str(item, src)     __entry->__str_##item = src
#define __get_str(item)             __entry->__str_##item
#define TRACE_EVENT(name, proto, args, tstruct, assign, print)  \
  static inline int                                             \
  trace_snprintf_##name(char * __buf, size_t __size, proto) {   \
    struct { tstruct } __value, *__entry = &__value;            \
    assign;                                                     \
    return snprintf(__buf, __size, print);                      \
  }

I don't know if anyone would need this besides stap, but I can post it
as a patch if there's interest.

Josh

  reply	other threads:[~2009-05-01 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01 19:30 [PATCH] export softirq_to_name symbol Jason Baron
2009-05-01 19:50 ` Christoph Hellwig
2009-05-01 20:07   ` Josh Stone
2009-05-01 20:10     ` Christoph Hellwig
2009-05-01 20:17       ` Josh Stone
2009-05-01 20:22         ` Christoph Hellwig
2009-05-01 21:25           ` Josh Stone [this message]
2009-05-03 18:36       ` Frederic Weisbecker
2009-05-03  8:33 ` Ingo Molnar

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=49FB68B5.4090804@redhat.com \
    --to=jistone@redhat.com \
    --cc=hch@infradead.org \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.