Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1211223imm; Wed, 11 Jul 2018 20:15:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpehruYjU9R3k3JO7DvD7fmfkgKz9P9tNfXKS+awgRiVlee+oTUY+yvTPIInyFFVF1on2RJE X-Received: by 2002:a62:2119:: with SMTP id h25-v6mr534780pfh.112.1531365334055; Wed, 11 Jul 2018 20:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531365334; cv=none; d=google.com; s=arc-20160816; b=F3bJYmXRVrMAfL9I29d70hf5cTkbxUtYDS6mIRWmM6863lctS5mCa4Uyf2zDJesxrT 4fALfdlNvlGZOViP4DL/84tQ0SqCBH/azSNwamV4VpjyHD5/KATObvuccfKqPyTRKX2E 1+V6L3s7tE85Rq9xaSJVvLvO4bu9YcL3+qXBPgOjLlRj5SEgtADwj1gR1gffD7JzCDLZ s5Sm2l653eGfFNO3oQdigJUFn+lZ9Kr50qSLTsoYFSeO6U3gyMOrrFYQv5VPHVirnUhq oIMVvR4Muu7RGvwCJsc8g4rdWXQFjbpYAo4pcgs4OTEwXo1Pjws5Szm0dkl7v8qn92XC EgLg== 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 :arc-authentication-results; bh=vlVvPmNrQEFeOZRHUKfiKb3dO/vuQjcVLAjCNmqliB8=; b=ELod4dUnZzPMrCbNmnGJV0J/nWgispovorO2DeiVDsuU3aU/kZ62q57cYivdmSFoyb iV/CnMAwR7onwxAlIH8Q+b81Lt1GuzhoSnDO5cq7WDKiv7aIIMtfLx/tQRRJgDOyhgyh BWXRKieyeoxVbUmPH9GqTMI8CtvDzSBLgZyDOPmmWzgwpaUIJnpoE7zLnV6bll4Lflxh PFZwalP1U/UIFADSBWe1w1wijJ12694dYt/TiX56Gr9s1L35kY7X3gMhUfZvVGshgjfu 87Iz2yEw/7p5D3iMeh3v4j6N3ZASQXJzqDmwO3LjUpep6z3fDDpUcuTL/YZEI4fYFj2y RWCg== 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 12-v6si21412943pft.235.2018.07.11.20.15.18; Wed, 11 Jul 2018 20:15:34 -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 S1732392AbeGLDFK (ORCPT + 99 others); Wed, 11 Jul 2018 23:05:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:40430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbeGLDFK (ORCPT ); Wed, 11 Jul 2018 23:05:10 -0400 Received: from vmware.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 4BC8F20652; Thu, 12 Jul 2018 02:57:48 +0000 (UTC) Date: Wed, 11 Jul 2018 22:57:45 -0400 From: Steven Rostedt To: Joe Perches Cc: Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ring_buffer: Update logging to use single line output Message-ID: <20180711225745.6e66c10f@vmware.local.home> In-Reply-To: <24f146a8726f391736bc79306e64b204435eb4ec.camel@perches.com> References: <20180510122843.0b69b41a@gandalf.local.home> <24f146a8726f391736bc79306e64b204435eb4ec.camel@perches.com> X-Mailer: Claws Mail 3.15.1 (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, 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. -- 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;