Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1628237ybi; Sat, 8 Jun 2019 14:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmerRK71THNiLP5gZ3Plan642+fxGwNorbsANz2UhO0YLLy5TmHdBhXgL14Wpkse8WNcT9 X-Received: by 2002:a62:834d:: with SMTP id h74mr20786337pfe.254.1560029321319; Sat, 08 Jun 2019 14:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560029321; cv=none; d=google.com; s=arc-20160816; b=zKGh26yEa6kQMhfWQjL6WqrSBqW+n87sCszEbKfQ++e7N5nyhkEu7DjQIr1N78AlWa oDhfY/asW72m+jopJd5k/fNjQNge3hRjdWrJtN1lFmAW2P9SPsLCKFRNj7BKj7cdNZhr X5CMeFEX3m+SV9kh1EOR8tmxfWuGoF3H1hoyoSgAzitwZFHbjz54O5lIOhl+gjLHZVNr c7wdClC0Kzvhbb8pgrwA1L9O5On2XAg9c+AE+OHydliz/r6gxwPhD7hNHNYQ7hQLJ+JR bXV5lyC+z+fCKnVa7WIVqpAqSYLyovxzkNUAAh3+Fa7KenuJY+yqdgFiL2gSPaYGmyl0 7cVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=QX76Aj8B22utekWkZZJ6qggAxl1+bxIOq2DAHtvGdH4=; b=dx5oCIf8K4BJ0bpSfBADbrJqWPTrHXnBoJnA48FlExMxJXjxIZAQ1OqWVFKhnrYHvo AJOlIDW7Q/1gimTNek13NlqywVNK4FQuV7UsGfNL3UNPcHs8K/PFtkqXam/oO+yoHNnG 8MvjKeSMzWGMgqozRWNv+0OSf4GwP5kjDKY4H2f/pJWRzIbDCyfIFYUmxfH2vZNilu5+ o50bW80YHnuGeC+Qpvwa8RsVnBixLKaM6lDFmYClC320EYESS9Gh43ylCfFPs2TGqGAq iApmVxyN3Wd9OsrvY9Ddj5AItfFjq5zC/vjrELbiJlODQuuE/6dK++vxh4kFGHpLYxrn ozXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si5477177pfi.184.2019.06.08.14.28.22; Sat, 08 Jun 2019 14:28:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727674AbfFHV1M (ORCPT + 99 others); Sat, 8 Jun 2019 17:27:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:50376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727456AbfFHV1M (ORCPT ); Sat, 8 Jun 2019 17:27:12 -0400 Received: from oasis.local.home (unknown [12.156.218.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC1EB208E3; Sat, 8 Jun 2019 21:27:10 +0000 (UTC) Date: Sat, 8 Jun 2019 17:27:08 -0400 From: Steven Rostedt To: Joe Perches Cc: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= , Theodore Tso , Mathieu Desnoyers Subject: Re: [PATCH v2 2/2] KVM: LAPIC: remove the trailing newline used in the fmt parameter of TP_printk Message-ID: <20190608172708.172594be@oasis.local.home> In-Reply-To: <53e1591ef288135f1dd803c15e971c96d06f54ba.camel@perches.com> References: <1559284814-20378-1-git-send-email-wanpengli@tencent.com> <1559284814-20378-2-git-send-email-wanpengli@tencent.com> <53e1591ef288135f1dd803c15e971c96d06f54ba.camel@perches.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 May 2019 11:57:04 -0700 Joe Perches 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