Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp452645img; Mon, 18 Mar 2019 06:55:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUKWSA3bIQxZTMSt9r6PrDAHqs0raryaVb1e1kFBPcSVoy2fLu1op+OFdLF+XsvBHkf4b7 X-Received: by 2002:a17:902:7e46:: with SMTP id a6mr20100661pln.150.1552917331236; Mon, 18 Mar 2019 06:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552917331; cv=none; d=google.com; s=arc-20160816; b=IAzrHJIV1t7nnfJmqYlaFVGw0JA7iYSvucXDW/So3wyHIkyxWeNNWNOMcP50Zs7BqS P7T8Co3i3WTNpBzgLEeclz/OzTjEE81e+MG8Q1n9djsI6KkilLYNXKvfKxWuVhDQjt1v m0+emhkd2uikVxSXSrNS65xD1VP+3YBRfOqBRtJEyWQq6t1tSMt4rlqfwNi1kL7ViMEG ddDQ44zLi0NAfFdhpWQNPEISIhlI8uZNn4TJzt8P1YIs8AWywOHODIAwhwZ2MT3DutWe dze7k0TTkdbB1l7t3uLCLHIzfJi0SF0t6993pLSZphZF/05sWibR2a114YVj+QbzdhQZ GuWw== 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=uArJNYGSg1Nqk2G3fhOqrQ6uYe21Va+zq02FId6xwq4=; b=PiQjegH0fuVVuquecH6F+ze720Km2ZWG5z5TCq6jHHkAMT41qb6XY6ptKUZ/7EE/c5 5O/NUGhI9TXWWpl2ORBAc9ZLcCk5mZzvt2LKCdoDZctN5dD3NjpLaiOQJChR6CN00vl3 s31FXni7z9vRpsA2cXdN9fAjSrGLg69CDlz+e3bGNtskyiONpGH43WNMUGsL8+Wb76nK YfYmsGRekanQmb4tJhHZAKE+YfpXQX6hk4YhSUXor+riWdwRkoNhCX8BJpzncDsXcKaU kXMb9T26nSaTtkfndAbPBTWZClAxuYZrNqFVcMlpxrl1mCm5ZGODPSPdBg5vaMbrLhBS DPyQ== 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 d132si8964645pgc.482.2019.03.18.06.55.14; Mon, 18 Mar 2019 06:55:31 -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 S1726926AbfCRNyj (ORCPT + 99 others); Mon, 18 Mar 2019 09:54:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:37644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbfCRNyj (ORCPT ); Mon, 18 Mar 2019 09:54:39 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 44D5B20857; Mon, 18 Mar 2019 13:54:38 +0000 (UTC) Date: Mon, 18 Mar 2019 09:54:36 -0400 From: Steven Rostedt To: Daniel Thompson Cc: Douglas Anderson , Ingo Molnar , Jason Wessel , kgdb-bugreport@lists.sourceforge.net, Brian Norris , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/3] tracing: kdb: Allow ftdump to skip all but the last few entries Message-ID: <20190318095436.7f09a371@gandalf.local.home> In-Reply-To: <20190318030238.GD27232@oak.lan> References: <20190315230906.250598-1-dianders@chromium.org> <20190315230906.250598-3-dianders@chromium.org> <20190318030238.GD27232@oak.lan> X-Mailer: Claws Mail 3.16.0 (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 Mon, 18 Mar 2019 03:02:38 +0000 Daniel Thompson wrote: > > diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c > > index 4b666643d69f..996e1e9cd9a6 100644 > > --- a/kernel/trace/trace_kdb.c > > +++ b/kernel/trace/trace_kdb.c > > @@ -39,7 +39,8 @@ static void ftrace_dump_buf(int skip_entries, long cpu_file) > > /* don't look at user memory in panic mode */ > > tr->trace_flags &= ~TRACE_ITER_SYM_USEROBJ; > > > > - kdb_printf("Dumping ftrace buffer:\n"); > > + kdb_printf("Dumping ftrace buffer (skipping %d entries):\n", > > + skip_entries); > > If someone *doesn't* need to skip any entries I'm not a fan of telling > them we are "skipping 0 entries"; it is more unnerving than helpful > ("huh? what does it need to tell me that no entried were skipped? > what makes the tracer skip entries?... Doh... I get it"). I agree. Probably best to have this: kdb_printf("Dumping ftrace buffer:\n"); if (skip_entries) kdb_printf("(skipping %d entries)\n", skip_entries); No reason to inject that skipping line in the first line. -- Steve