mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Joe Perches <joe@perches.com>
Cc: "Wanpeng Li" <kernellwp@gmail.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Theodore Tso" <tytso@mit.edu>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH v2 2/2] KVM: LAPIC: remove the trailing newline used in the fmt parameter of TP_printk
Date: Sat, 8 Jun 2019 17:27:08 -0400	[thread overview]
Message-ID: <20190608172708.172594be@oasis.local.home> (raw)
In-Reply-To: <53e1591ef288135f1dd803c15e971c96d06f54ba.camel@perches.com>

On Fri, 31 May 2019 11:57:04 -0700
Joe Perches <joe@perches.com> wrote:

> On Fri, 2019-05-31 at 14:40 +0800, Wanpeng Li wrote:
> > The trailing newlines will lead to extra newlines in the trace file  
> []
> > diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h  
> []
> > @@ -1365,7 +1365,7 @@ TRACE_EVENT(kvm_hv_timer_state,
> >  			__entry->vcpu_id = vcpu_id;
> >  			__entry->hv_timer_in_use = hv_timer_in_use;
> >  			),
> > -		TP_printk("vcpu_id %x hv_timer %x\n",
> > +		TP_printk("vcpu_id %x hv_timer %x",
> >  			__entry->vcpu_id,
> >  			__entry->hv_timer_in_use)
> >  );  
> 
> Not about the kvm subsystem, but generically there are
> many of these that could be removed.
> 
> $ git grep -w TP_printk | grep '\\n' | wc -l
> 45
> 
> Also, aren't all TP_printk formats supposed to be single line?

Yeah they should be, otherwise it makes the trace look funny. We do
have some legitimate ones (stack traces for example), but really,
unless there's a good reason, it shouldn't have them.

> 
> If not, these are odd as well.
> 
> $ git grep -w TP_printk | grep '\\n[^"]'
> include/trace/events/9p.h:	    TP_printk("clnt %lu %s(tag = %d)\n%.3x: %16ph\n%.3x: %16ph\n",
> net/tipc/trace.h:	TP_printk("%s\n%s", __get_str(header), __get_str(buf))
> net/tipc/trace.h:	TP_printk("%s\n%s", __get_str(header), __get_str(buf))
> net/tipc/trace.h:	TP_printk("<%u> %s\n%s%s", __entry->portid, __get_str(header),
> net/tipc/trace.h:	TP_printk("<%s> %s\n%s", __entry->name, __get_str(header),
> net/tipc/trace.h:	TP_printk("<%x> %s\n%s", __entry->addr, __get_str(header),
> 
> Perhaps the documentation files around these formats
> 	Documentation/trace/events.rst
> 	Documentation/trace/tracepoints.rst
> could be improved as well.
> 

Sure, like most documentation ;-)

-- Steve

  reply	other threads:[~2019-06-08 21:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  6:40 [PATCH v2 1/2] KVM: LAPIC: Optimize timer latency consider world switch time Wanpeng Li
2019-05-31  6:40 ` [PATCH v2 2/2] KVM: LAPIC: remove the trailing newline used in the fmt parameter of TP_printk Wanpeng Li
2019-05-31 18:57   ` Joe Perches
2019-06-08 21:27     ` Steven Rostedt [this message]
2019-06-11  1:21 ` [PATCH v2 1/2] KVM: LAPIC: Optimize timer latency consider world switch time Sean Christopherson
2019-06-11  1:38   ` Wanpeng Li
2019-06-11 15:10     ` Sean Christopherson
2019-06-12  9:27   ` Wanpeng Li

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=20190608172708.172594be@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=joe@perches.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®