Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1560869img; Tue, 19 Mar 2019 10:14:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcXrSYGUuMm5QBWaVrseiKDInp0DigkpmQSLXffX0yN0DZybsbUsTGFtXRANHnPZk/fHEN X-Received: by 2002:a17:902:968a:: with SMTP id n10mr3188582plp.283.1553015658851; Tue, 19 Mar 2019 10:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553015658; cv=none; d=google.com; s=arc-20160816; b=L98XdwMShmgNcbJ02DPU8unyj1uRqpIzhaxg2uk3qGOMuD5NyZ+4faZ/1wxKhp7MbS oZ97/FsKHj/QrJBSfaUybCB+XmoiYlTDgLWyYPIs23esJMSDzPCj1h4+bhtHnwSO1q85 MNAuyyw1QeQks0BE3O453/OmcOUepSuQDH0mq6aYGyl2I2mNZrBag8rspiowgfH/XOuA M9n5CVl+OIndgWlCENGegursd5ZPSxqnQ/Dt0Pl3n+0tlNU/Tm0UjuwGWz7IgZWFHVul K6CMc0modnAQV2BQ52rY8CmRNboGa5xcwuMne7zcJyhdrbB9Nv/MTdcmbELEfta03Rvx Hllg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2EVCGjLunh4Ujsx7thL4ucW6QhsgQL44dQaD0UOsMh8=; b=K4r6mCHsnf3lgPb3JVSs5RyslPpPdTuIxKeZ+o2QgUYC53TZUmfZgqhWjWaj1lulxu ypb/XAzCgQJhBZ9/eEFu32+FZ5gTQflNQ68uYlgAZGamH/3yXW3h3Npwf/TrCPZ9z8cP RmsWZHkz1peutrjc+73gUTSV30TVgRS2hR0ha9SLAmymyVNWH90X1B9joMK4P2mKvfiO oouEkPvYoDcR4sj4rpAWEEAMleIb6qwj3CC0DX3DS3neeJDqrTZKS7jKxTA+bW9s/ksU 2H+qH6/jI+1ET6RC8npWv8a7AN+fuUy1tkhN4+l58GwkblGjIRHXe1Lnrh88/t4xdzxF Xswg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Aj4nFUHx; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si11891217plt.215.2019.03.19.10.14.03; Tue, 19 Mar 2019 10:14:18 -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=@chromium.org header.s=google header.b=Aj4nFUHx; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbfCSRMe (ORCPT + 99 others); Tue, 19 Mar 2019 13:12:34 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37499 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbfCSRMe (ORCPT ); Tue, 19 Mar 2019 13:12:34 -0400 Received: by mail-pg1-f194.google.com with SMTP id q206so14295332pgq.4 for ; Tue, 19 Mar 2019 10:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2EVCGjLunh4Ujsx7thL4ucW6QhsgQL44dQaD0UOsMh8=; b=Aj4nFUHxcdHBnl2CjbhSkp7Qwf4+8ku6Rj2imsoIByydzqUfXX6dS4GryRQiacX7Xt 2gBwYtn2b4zigkUxhfiAAdmOXHB/UAEl6iwfPQGt19DUIYIL1PKw9U9L3e/yfOTFhQgV QN+66id6eyz3zl239x31hQ6SlrB3nwMfGgXZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2EVCGjLunh4Ujsx7thL4ucW6QhsgQL44dQaD0UOsMh8=; b=ibOrpliTc/0+5yzKFEANZU2uiDITRVcYEWHQRbE//nP0NFlthQ4veIHNCuPP+hg2ZD YOwDveyCg9wrCf5/h5s7vRMRYJkm8xeLqNwfaiwrjj6hQ8zcLPTuhnp/r1hdnaHFTcKg lFMAJMPxudBHBHlI4IhOcWy8f1Dupco/d3XZY486kuDmXecXmxJTNzAah2Xuwuk1qvYf WUysFIEmTXk9gSuVYPYY0Ct/bY4Ayn1XDaIfxN2A0eN0vj9hA+9+Q1ey14aQGo3XoRI2 V9vRNbRQ7rg3pJusKBjVPAtfbJL21u6Ps5EKZCj3o7Nj9/MaWO0pNufiG3DwGOLtmK5y ltlQ== X-Gm-Message-State: APjAAAVt89lRCeOYV+arsius0h/nX9+A6eSjLdQleMLd3JK4+V/Zqcyg kBBtXGo0YlfKJwwg+N+5kIgSVQ== X-Received: by 2002:a17:902:801:: with SMTP id 1mr3049391plk.299.1553015553163; Tue, 19 Mar 2019 10:12:33 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id g6sm18293918pgq.54.2019.03.19.10.12.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 10:12:32 -0700 (PDT) From: Douglas Anderson To: Steven Rostedt , Ingo Molnar , Jason Wessel , Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net, Brian Norris , Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH v6 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries Date: Tue, 19 Mar 2019 10:12:04 -0700 Message-Id: <20190319171206.97107-1-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.225.g810b269d1ac-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v6: None Changes in v5: - Add Daniel Thompson Ack. 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.225.g810b269d1ac-goog