All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-07-13 11:05 Shirish S
  2021-07-13 15:59 ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Shirish S @ 2021-07-13 11:05 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira
  Cc: linux-kernel, Shirish S

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.

Signed-off-by: Shirish S <shirish.s@amd.com>
---
 kernel/sched/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d9ff40f4661..d95d46a89e7e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8194,6 +8194,11 @@ void show_state_filter(unsigned int state_filter)
 {
 	struct task_struct *g, *p;
 
+#if BITS_PER_LONG == 32
+	pr_info("  task                PC stack   pid father\n");
+#else
+	pr_info("  task                        PC stack   pid father\n");
+#endif
 	rcu_read_lock();
 	for_each_process_thread(g, p) {
 		/*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-08-12 11:05 Shirish S
  2021-08-12 14:04 ` Phil Auld
  2021-08-12 14:38 ` Steven Rostedt
  0 siblings, 2 replies; 7+ messages in thread
From: Shirish S @ 2021-08-12 11:05 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira
  Cc: linux-kernel, Shirish S

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

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) {
 		/*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] sched/debug: print column titles of show_state_filter()
@ 2021-08-12 14:09 Shirish S
  2021-08-12 15:46 ` Phil Auld
  0 siblings, 1 reply; 7+ messages in thread
From: Shirish S @ 2021-08-12 14:09 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira
  Cc: linux-kernel, Shirish S

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

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..d9c7014870d5 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   ppid\n");
+
 	rcu_read_lock();
 	for_each_process_thread(g, p) {
 		/*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-12 15:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 11:05 [PATCH] sched/debug: print column titles of show_state_filter() Shirish S
2021-07-13 15:59 ` Steven Rostedt
2021-08-12 11:05 Shirish S
2021-08-12 14:04 ` Phil Auld
2021-08-12 14:38 ` Steven Rostedt
2021-08-12 14:09 Shirish S
2021-08-12 15:46 ` Phil Auld

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.