Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp50944img; Sun, 17 Mar 2019 20:04:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqztWkpBqQIHi7/7PwiK69a9Qqg1jjmKrCazJxl4U9pZQXPk5iHEDTQ+B8pPCIR91xcg5MdU X-Received: by 2002:a62:2008:: with SMTP id g8mr16690116pfg.121.1552878279691; Sun, 17 Mar 2019 20:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552878279; cv=none; d=google.com; s=arc-20160816; b=vYMAicoR+eI+m9al9VT6k1ubn0Ee0KhQFtPriHsaok1ndsGXx+6scqrPJvJSP5hpRx MXMzcEa6UBT5lOzwxjngvzj2To0eIJpm8Otffl+6GFr2WmBCGntOewES9DkwYonbzOTO QL0lHzJV+fgkrK70L9cpHH9xUbyi1DI84QpZgE4OjM0r/hvnlpscfidAQMzRLVO/DQrr QP508z7f/BvNX51/Q6XONlBtgeXj+vucrmWD8toPT9WKcsMWnMxo9UCT1Nw7/EbaqWUX 7Iw979Q1VZZwzx0IVCEvZ7skKLwec2kwB2DyJdocANbMFHdfadw39gmNdGHuDrO8uiLe fHug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TAiXdoCs8qghvuz4sYi+xTo3LDM0q7EKdHUQZzCQKD0=; b=OxGBvq/jBHE4w9E1bJifbKMr8W0OPWWUUtc6ViPr6stOOqk1O28USl2Ur7vbIPTTwa p3oM1HKarT3Ct6Yf6I6YfbnobUsw5apGk2bc/7qlX9vcmog7iYnLDz8mZbftgYgm1+17 Nv3B7AXQ9c+QcexCGJGhvrZh2bYFPs7LYVDf58s7STcIDbmOZfabsYF/5yidShgt/113 64zEsFAk/w9JTk2+ITaNyTBHvZ+a3XsJJGkA4U/tbliu8csv34Oq21L0JK8QKiq/0RwB QHYQF+0e7oHrW6FUHVC08kpmndGfaEqlxOEjI/q5dsxhjl21OE2MXiuOCKhrklnqjKvH parQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JOuFAqfr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59si8721338plb.405.2019.03.17.20.04.24; Sun, 17 Mar 2019 20:04:39 -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; dkim=pass header.i=@linaro.org header.s=google header.b=JOuFAqfr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbfCRDDk (ORCPT + 99 others); Sun, 17 Mar 2019 23:03:40 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37186 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfCRDDk (ORCPT ); Sun, 17 Mar 2019 23:03:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id v14so2602641wmf.2 for ; Sun, 17 Mar 2019 20:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TAiXdoCs8qghvuz4sYi+xTo3LDM0q7EKdHUQZzCQKD0=; b=JOuFAqfrtPgPb9upPW9fngQEknEHZVnQRB78OpDoL9QoiTCGal17v+iK/1dAaEgX64 BPbwTlpCIf5p4xDcJVETM0kF0npq4Woo9ECsWvk1roeLsaom9g4mTbhTjducQ5gbGt5Z 7ZOAaeKsPZLHPETkpZIX1OfCfGF0Vbrs3t1VkYNC/5i8Jx4XmcSyqttvIbWKTbYP9hlv VOtHIS17SxhEbA62J9aeE6N1pVMs5QxF1gY2VsYVy6yWEzirNQYiaTkE2GQLPKEsTun9 EQopOrLO2/zRMYZf/G3VamyJBKvsGiJ+BAPQRlhRXHe5qfbeaM+9ebgK/3FRK4DSm1+D 2XdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TAiXdoCs8qghvuz4sYi+xTo3LDM0q7EKdHUQZzCQKD0=; b=WEgAjb7FCo95E8SfFGh7oVnHjvglQWfeAaUvPu6GAOSkL23YS8zs8Vq5uuDhnNOTl6 y0KyE8XjfJCnrjSBiJmVhFCCrpwFVIQ6Jt00eXakR7zVm19IxMHJzFVMHjrXhTbzAC/D Ajw/xT0L9AyVCMvuyLTv7euqz95N7GycUHemOwcqGcEffvUDm6pNoZ8RYrVwyGNEJ+Rp KNQAtMSS0ltcKzJDtipschOo7WhfBU4vc95H3OP2jQ4Bl0QBcyOYRihKID6wrFkjxgpC anKlZQNylbVddlVxKz6HLc/eYxutp2GaV1t8bg9DNCiU7LgeGstjpWUmEMSjdpKnd+r5 gt0w== X-Gm-Message-State: APjAAAVCwC5miS5oxGs1L1b680yIyhpwVcZ4eGKkmp0Dbo/tFh2z6I3u BVwh2XS301ZfrkoYnjdj1/Tvtw== X-Received: by 2002:a1c:14e:: with SMTP id 75mr8989973wmb.48.1552878218630; Sun, 17 Mar 2019 20:03:38 -0700 (PDT) Received: from oak.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id 16sm32280508wrb.19.2019.03.17.20.03.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Mar 2019 20:03:37 -0700 (PDT) Date: Mon, 18 Mar 2019 03:03:36 +0000 From: Daniel Thompson To: Douglas Anderson Cc: Steven Rostedt , Ingo Molnar , Jason Wessel , kgdb-bugreport@lists.sourceforge.net, Brian Norris , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries Message-ID: <20190318030336.GE27232@oak.lan> References: <20190315230906.250598-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315230906.250598-1-dianders@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 04:09:04PM -0700, Douglas Anderson wrote: > The things skipped by kdb's "ftdump" command when you pass it a > parameter has always been entries, not lines. The difference usually > doesn't matter but when the trace buffer has multi-line entries (like > a stack dump) it can matter. > > Let's fix this both in the help text for ftdump and also in the local > variable names. > > Signed-off-by: Douglas Anderson Acked-by: Daniel Thompson > --- > > Changes in v4: > - skip_lines => skip_entries new for v4. > > Changes in v3: None > > kernel/trace/trace_kdb.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c > index 810d78a8d14c..4b666643d69f 100644 > --- a/kernel/trace/trace_kdb.c > +++ b/kernel/trace/trace_kdb.c > @@ -17,7 +17,7 @@ > #include "trace.h" > #include "trace_output.h" > > -static void ftrace_dump_buf(int skip_lines, long cpu_file) > +static void ftrace_dump_buf(int skip_entries, long cpu_file) > { > /* use static because iter can be a bit big for the stack */ > static struct trace_iterator iter; > @@ -70,11 +70,11 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file) > kdb_printf("---------------------------------\n"); > cnt++; > > - if (!skip_lines) { > + if (!skip_entries) { > print_trace_line(&iter); > trace_printk_seq(&iter.seq); > } else { > - skip_lines--; > + skip_entries--; > } > > if (KDB_FLAG(CMD_INTERRUPT)) > @@ -106,7 +106,7 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file) > */ > static int kdb_ftdump(int argc, const char **argv) > { > - int skip_lines = 0; > + int skip_entries = 0; > long cpu_file; > char *cp; > > @@ -114,9 +114,9 @@ static int kdb_ftdump(int argc, const char **argv) > return KDB_ARGCOUNT; > > if (argc) { > - skip_lines = simple_strtol(argv[1], &cp, 0); > + skip_entries = simple_strtol(argv[1], &cp, 0); > if (*cp) > - skip_lines = 0; > + skip_entries = 0; > } > > if (argc == 2) { > @@ -129,7 +129,7 @@ static int kdb_ftdump(int argc, const char **argv) > } > > kdb_trap_printk++; > - ftrace_dump_buf(skip_lines, cpu_file); > + ftrace_dump_buf(skip_entries, cpu_file); > kdb_trap_printk--; > > return 0; > @@ -137,7 +137,7 @@ static int kdb_ftdump(int argc, const char **argv) > > static __init int kdb_ftrace_register(void) > { > - kdb_register_flags("ftdump", kdb_ftdump, "[skip_#lines] [cpu]", > + kdb_register_flags("ftdump", kdb_ftdump, "[skip_#entries] [cpu]", > "Dump ftrace log", 0, KDB_ENABLE_ALWAYS_SAFE); > return 0; > } > -- > 2.21.0.360.g471c308f928-goog >