Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1265323imm; Wed, 11 Jul 2018 21:44:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdkwlbxjrxGEG0KMPZk2DkcI6DM+DJ89/qUSZs76CPVAPF5F8935G3oO6QAd+JGvQPE6hW0 X-Received: by 2002:a63:aa44:: with SMTP id x4-v6mr702742pgo.120.1531370664479; Wed, 11 Jul 2018 21:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531370664; cv=none; d=google.com; s=arc-20160816; b=P1I7f63XTVEhkXxgoJ7ZA1O/GIsmfOkCL3LVXoXq6c+XnKLB27e3YEcA80Jk1FZEid ESGHW9cHUFoe3Ina60HXWBw0Vc4FpXw7PgTd8kR2RlwB6ZGTsc11xb64Z/etRyjYKck0 jn7+QJD5kY2VIpXnE+eFTEruY7JEN7DOVWbT6PqLOTOuseTU+pvFuNkQIzhDbWSUiTkg 8nthbZVGfWUtWfH8+77Xy1ltnI2iZ/EsDX9BmJpq0axXHgKRTRjHc9Iw52LPupsq5s5z G915uyfpS0N3PE3QBozyC7gJpzHprfCa3/FOFa2r7HsxN65ysA/1blvAQdSX72HhLxBZ GqJA== 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:date:cc:to:from:subject:message-id :arc-authentication-results; bh=YMfnmt3La6xDOg//9rMQ6Vr6l+HTzyxZbMNeZHarQf8=; b=n+0fcXdKamsGgVyzJ1y9z0sKHawut4ceomMVs7HUaOp9kQFd62p9EAwaoCXXy505+m O6tQHviYa7I5PKUSy3U/obK+oBfzqTPKCcYY9jFSC/3TmRQwdk7QC4vIir+C8jCNpt+E KtYdBQ0Ke2N3ynOK9GmwoMi1PJw7JCfFk9qV6BA/pnJz6+c9CyKUVpy3oqq1dlr5n4uy acnyXfvhqEse+O0n3ZkJFEkAIyS9lSa95A6SJ4IW0c4LDc2fzFKkCc2AfAVA33eutf0v Fq2HNIVBqY6Q4FF4usYYJEHGiEOyqIbMaXioLqmoxwMd5SAWWjQzgWnGV3fKngAWUTK3 U53w== 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 t128-v6si22133389pfc.194.2018.07.11.21.44.09; Wed, 11 Jul 2018 21:44:24 -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 S1726041AbeGLEum (ORCPT + 99 others); Thu, 12 Jul 2018 00:50:42 -0400 Received: from smtprelay0215.hostedemail.com ([216.40.44.215]:35656 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725766AbeGLEum (ORCPT ); Thu, 12 Jul 2018 00:50:42 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id A54A718000BE7; Thu, 12 Jul 2018 04:42:55 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3873:4321:4605:5007:7875:7903:8603:10004:10400:10848:10967:11026:11232:11473:11658:11914:12296:12555:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:14777:21067:21080:21433:21627:30022:30054:30070:30083:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: pail81_53a39c761f709 X-Filterd-Recvd-Size: 2964 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Thu, 12 Jul 2018 04:42:54 +0000 (UTC) Message-ID: <86e887cec9ce67b4ea55eec7ffca4cd902a84068.camel@perches.com> Subject: Re: [PATCH] ring_buffer: Update logging to use single line output From: Joe Perches To: Steven Rostedt Cc: Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org Date: Wed, 11 Jul 2018 21:42:53 -0700 In-Reply-To: <20180711225745.6e66c10f@vmware.local.home> References: <20180510122843.0b69b41a@gandalf.local.home> <24f146a8726f391736bc79306e64b204435eb4ec.camel@perches.com> <20180711225745.6e66c10f@vmware.local.home> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-07-11 at 22:57 -0400, Steven Rostedt wrote: > On Fri, 11 May 2018 14:39:18 -0700 > Joe Perches wrote: > > > With a possible change to pr_fmt coming, the logging output can > > become unbalanced when an initial line has a prefix and subsequent > > lines do not when a multiple line pr_ is emitted. > > > > Fix it by emitting a single line. > > > > Miscellanea: > > > > o Convert consecutive tests of total_lost and !total_lost to if/else > > I just noticed this patch. Please don't send patches Cc'd to other > threads. They need to start a new thread, otherwise, like this one, it > will most likely be lost. > > If you want this applied still, please resend it properly. An email sent directly to you should not be lost by you. > -- Steve > > > > > Signed-off-by: Joe Perches > > --- > > kernel/trace/ring_buffer.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c > > index c9cb9767d49b..ee74494a2da3 100644 > > --- a/kernel/trace/ring_buffer.c > > +++ b/kernel/trace/ring_buffer.c > > @@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void) > > pr_info(" total events: %ld\n", total_lost + total_read); > > pr_info(" recorded len bytes: %ld\n", total_len); > > pr_info(" recorded size bytes: %ld\n", total_size); > > - if (total_lost) > > - pr_info(" With dropped events, record len and size may not match\n" > > - " alloced and written from above\n"); > > - if (!total_lost) { > > + if (total_lost) { > > + pr_info(" With dropped events, record len and size may not match alloced and written from above\n"); > > + } else { > > if (RB_WARN_ON(buffer, total_len != total_alloc || > > total_size != total_written)) > > break; > >