linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering
@ 2012-11-15  1:51 David Sharp
  2012-11-15  1:51 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: David Sharp @ 2012-11-15  1:51 UTC (permalink / raw)
  To: Steven Rostedt, linux-kernel; +Cc: Venkatesh Pallipadi, David Sharp

From: Venkatesh Pallipadi <venki@google.com>

Plot CPU filtering in kernelshark has the following bug:
1) Deselect CPU A from Plot CPU list
2) Plot gets updated with no CPU A
3) Deselect CPU B
4) Plot continues to have CPU B

This is due to a bug in graph_plot_cpus_update_callback(),
which seems to be checking old_all_cpus != new_all_cpus before doing any
update. This condition is true on 1, but false on 2.
Removing that check fixes the problem.

Tested:
Above sequence now does expected filtering.

Google-bug-id: 4258610
Signed-off-by: Venkatesh Pallipadi <venki@google.com>
Signed-off-by: David Sharp <dhsharp@google.com>
---
 trace-plot-cpu.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c
index 630d6c2..bb767d3 100644
--- a/trace-plot-cpu.c
+++ b/trace-plot-cpu.c
@@ -498,9 +498,8 @@ void graph_plot_cpus_update_callback(gboolean accept,
 	/* Get the current status */
 	graph_plot_cpus_plotted(ginfo, &old_all_cpus, &old_cpu_mask);
 
-	if (old_all_cpus == all_cpus ||
-	    (selected_cpu_mask &&
-	     cpus_equal(old_cpu_mask, selected_cpu_mask, ginfo->cpus))) {
+	if (selected_cpu_mask &&
+	     cpus_equal(old_cpu_mask, selected_cpu_mask, ginfo->cpus)) {
 		/* Nothing to do */
 		g_free(old_cpu_mask);
 		return;
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering
@ 2012-11-15  1:48 David Sharp
  2012-11-15  1:48 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
  0 siblings, 1 reply; 10+ messages in thread
From: David Sharp @ 2012-11-15  1:48 UTC (permalink / raw)
  To: Steven Rostedt, linux-kernel; +Cc: Venkatesh Pallipadi, David Sharp

From: Venkatesh Pallipadi <venki@google.com>

Plot CPU filtering in kernelshark has the following bug:
1) Deselect CPU A from Plot CPU list
2) Plot gets updated with no CPU A
3) Deselect CPU B
4) Plot continues to have CPU B

This is due to a bug in graph_plot_cpus_update_callback(),
which seems to be checking old_all_cpus != new_all_cpus before doing any
update. This condition is true on 1, but false on 2.
Removing that check fixes the problem.

Tested:
Above sequence now does expected filtering.

Google-bug-id: 4258610
Signed-off-by: Venkatesh Pallipadi <venki@google.com>
Signed-off-by: David Sharp <dhsharp@google.com>
---
 trace-plot-cpu.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c
index 630d6c2..bb767d3 100644
--- a/trace-plot-cpu.c
+++ b/trace-plot-cpu.c
@@ -498,9 +498,8 @@ void graph_plot_cpus_update_callback(gboolean accept,
 	/* Get the current status */
 	graph_plot_cpus_plotted(ginfo, &old_all_cpus, &old_cpu_mask);
 
-	if (old_all_cpus == all_cpus ||
-	    (selected_cpu_mask &&
-	     cpus_equal(old_cpu_mask, selected_cpu_mask, ginfo->cpus))) {
+	if (selected_cpu_mask &&
+	     cpus_equal(old_cpu_mask, selected_cpu_mask, ginfo->cpus)) {
 		/* Nothing to do */
 		g_free(old_cpu_mask);
 		return;
-- 
1.7.7.3


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

end of thread, other threads:[~2012-11-15 19:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15  1:51 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15  1:51 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
2012-11-15  2:20   ` Steven Rostedt
2012-11-15  1:51 ` [PATCH 3/4] kernel-shark: Don't check for system name for sched events David Sharp
2012-11-15  1:51 ` [PATCH 4/4] kernelshark: Full-height cursor and mark lines David Sharp
2012-11-15  2:27   ` Steven Rostedt
2012-11-15 19:55     ` David Sharp
2012-11-15  1:52 ` [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15  2:31   ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2012-11-15  1:48 David Sharp
2012-11-15  1:48 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).