All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: rostedt@goodmis.org
Cc: Li Zefan <lizf@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Eric Biederman <ebiederm@xmission.com>
Subject: Re: [PATCH 2/2] tracing/events: Add kexec tracepoints
Date: Wed, 09 Sep 2009 08:58:41 -0700	[thread overview]
Message-ID: <1252511921.14793.122.camel@desktop> (raw)
In-Reply-To: <1252509551.27001.21.camel@gandalf.stny.rr.com>

On Wed, 2009-09-09 at 11:19 -0400, Steven Rostedt wrote:
> On Wed, 2009-09-09 at 07:12 -0700, Daniel Walker wrote:
> > On Wed, 2009-09-09 at 07:46 -0400, Steven Rostedt wrote:
> > > On Tue, 2009-09-08 at 21:59 -0700, Daniel Walker wrote:
> > > > On Wed, 2009-09-09 at 09:26 +0800, Li Zefan wrote:
> > > > > Daniel Walker wrote:
> > > > > > On Wed, 2009-09-09 at 09:15 +0800, Li Zefan wrote:
> > > > > >> +       TP_STRUCT__entry(
> > > > > >> +               __string(       msg,    msg     )
> > > > > >> +       ),
> > > > > > 
> > > > > > Why the funny spacing here?
> > > > > > 
> > > > > 
> > > > > To make the code better-looking.
> > > > > 
> > > > > This is the coding-style we use for the code in
> > > > > include/trace/events/*.
> > > > 
> > > > It's part of Linux right? We already have a coding style ..
> > > 
> > > It's a special macro. What are you now, part of the style police?
> > 
> > I'm just like everyone else, someone who asks questions and makes
> > comments .. By using a different style than what the rest of Linux uses
> > your putting yourself at a disadvantage since you can't easily use
> > checkpatch on that code (even the stuff that is compliant) ..
> 
> I'm fine with questions, but yours sounded a bit more cynical

I'm never cynical (not on purpose anyway). I was just saying it like it
is .. 

> And here's that same code with normal Linux style:
> 
> TRACE_EVENT(sched_wait_task,
> 	TP_PROTO(struct rq *rq, struct task_struct *p),
> 	TP_ARGS(rq, p),
> 	TP_STRUCT__entry(__array(char, comm, TASK_COMM_LEN)
> 		__field(pid_t, pid)
> 		__field(int, prio)),
> 	TP_fast_assign(memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
> 		__entry->pid	= p->pid;
> 		__entry->prio	= p->prio;
> 	),
> 	TP_printk("task %s:%d [%d]",
> 		  __entry->comm, __entry->pid, __entry->prio));


The below is checkpatch clean ..

TRACE_EVENT(sched_wait_task,

        TP_PROTO(struct rq *rq, struct task_struct *p),

        TP_ARGS(rq, p),

        TP_STRUCT__entry(
                __array(char,   comm,   TASK_COMM_LEN)
                __field(pid_t,  pid)
                __field(int,    prio)
        ),

        TP_fast_assign(
                memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
                __entry->pid    = p->pid;
                __entry->prio   = p->prio;
        ),

        TP_printk("task %s:%d [%d]",
                  __entry->comm, __entry->pid, __entry->prio)
);


That's not radically different from what you currently have .. You could
still align the fields with tabs. You just have to remove the
starting/ending tabs..

Daniel


  reply	other threads:[~2009-09-09 15:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09  1:15 [PATCH 1/2] tracing: Add sysctl to enable/disable tracing on oops Li Zefan
2009-09-09  1:15 ` [PATCH 2/2] tracing/events: Add kexec tracepoints Li Zefan
2009-09-09  1:20   ` Daniel Walker
2009-09-09  1:26     ` Li Zefan
2009-09-09  4:59       ` Daniel Walker
2009-09-09 11:46         ` Steven Rostedt
2009-09-09 14:12           ` Daniel Walker
2009-09-09 15:19             ` Steven Rostedt
2009-09-09 15:58               ` Daniel Walker [this message]
2009-09-09  1:27   ` Eric W. Biederman
2009-09-09  1:39     ` Steven Rostedt
2009-09-09  2:02       ` Eric W. Biederman
2009-09-09  1:34 ` [PATCH 1/2] tracing: Add sysctl to enable/disable tracing on oops Steven Rostedt
2009-09-09  1:37   ` Li Zefan
2009-09-09  1:42     ` Steven Rostedt
2009-09-09  1:47       ` Li Zefan
2009-09-09  2:04         ` Steven Rostedt
2009-09-09  2:33           ` KOSAKI Motohiro
2009-09-09  2:40             ` Li Zefan
2009-09-09  2:53               ` Steven Rostedt
2009-09-09  4:19                 ` KOSAKI Motohiro
2009-09-09 11:48                   ` Steven Rostedt
2009-09-09  3:01               ` KOSAKI Motohiro

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=1252511921.14793.122.camel@desktop \
    --to=dwalker@fifo99.com \
    --cc=ebiederm@xmission.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --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.