All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Jason Wessel <jason.wessel@windriver.com>,
	kgdb-bugreport@lists.sourceforge.net,
	Brian Norris <briannorris@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries
Date: Mon, 18 Mar 2019 03:03:36 +0000	[thread overview]
Message-ID: <20190318030336.GE27232@oak.lan> (raw)
In-Reply-To: <20190315230906.250598-1-dianders@chromium.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 <dianders@chromium.org>

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>

> ---
> 
> 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
> 

      parent reply	other threads:[~2019-03-18  3:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 23:09 [PATCH v4 1/3] tracing: kdb: The skip_lines parameter should have been skip_entries Douglas Anderson
2019-03-15 23:09 ` [PATCH v4 2/3] tracing: Add trace_total_entries() / trace_total_entries_cpu() Douglas Anderson
2019-03-15 23:09 ` [PATCH v4 3/3] tracing: kdb: Allow ftdump to skip all but the last few entries Douglas Anderson
2019-03-18  3:02   ` Daniel Thompson
2019-03-18 13:54     ` Steven Rostedt
2019-03-18  3:03 ` Daniel Thompson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190318030336.GE27232@oak.lan \
    --to=daniel.thompson@linaro.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.