public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Shirish S <shirish.s@amd.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/debug: print column titles of show_state_filter()
Date: Thu, 12 Aug 2021 10:38:26 -0400	[thread overview]
Message-ID: <20210812103826.27dfad5f@oasis.local.home> (raw)
In-Reply-To: <20210812110534.82349-1-shirish.s@amd.com>

On Thu, 12 Aug 2021 16:35:34 +0530
Shirish S <shirish.s@amd.com> wrote:

> This addition in the debug output shall improve readablitly..
> Its not intuitive for users that the pid printed in last column
> is of parent process.
> 
> Without this patch:
> 	localhost ~ # dmesg -w &
> 	localhost ~ # echo w > /proc/sysrq-trigger
> 	[22148.730225] sysrq: Show Blocked State
> 	localhost ~ #
> 
> With this patch:
> 	localhost ~ # dmesg -w &
> 	localhost ~ # echo w > /proc/sysrq-trigger
> 	[   99.979365] sysrq: Show Blocked State
> -->	[   99.983471]   task                        PC stack   pid father  
> 	localhost ~ #
> 

It would had been more informative, if there were content to those lists.

Just a few lines would be good enough. But the above, just looks like
you are adding a useless header. :-/

In fact, I would argue that the title should not be displayed if the
content is empty.

Also, s/father/parent/  or s/father/ppid/

-- Steve



> v2: Dropped #ifdef logic
> v3: Sample output in commit message
> 
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  kernel/sched/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 20ffcc044134..1c7ea3ef5a9f 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8174,6 +8174,9 @@ void show_state_filter(unsigned int state_filter)
>  {
>  	struct task_struct *g, *p;
>  
> +	pr_info("  task%*s", BITS_PER_LONG == 32 ? 38 : 46,
> +		"PC stack   pid father\n");
> +
>  	rcu_read_lock();
>  	for_each_process_thread(g, p) {
>  		/*


  parent reply	other threads:[~2021-08-12 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 11:05 [PATCH] sched/debug: print column titles of show_state_filter() Shirish S
2021-08-12 14:04 ` Phil Auld
2021-08-12 14:38 ` Steven Rostedt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-12 14:09 Shirish S
2021-08-12 15:46 ` Phil Auld
2021-07-13 11:05 Shirish S
2021-07-13 15:59 ` Steven Rostedt

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=20210812103826.27dfad5f@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shirish.s@amd.com \
    --cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox