lkml.org 
[lkml]   [2012]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter
Date
From: Vaibhav Nagarnaik <vnagarnaik@google.com>

The button "All CPUs" in CPU filter dialog allows setting of all CPUs
but doesn't clear CPUs when it is unchecked. Make sure that when the
"All CPUs" button is unchecked, all the CPUs get unchecked.

Tested: In kernelshark, go to Filter->list CPUs and uncheck "All CPUs"
button. All the CPUs should be unchecked at that point.

Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Signed-off-by: David Sharp <dhsharp@google.com>
---
trace-filter.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/trace-filter.c b/trace-filter.c
index c657a18..89cf032 100644
--- a/trace-filter.c
+++ b/trace-filter.c
@@ -1723,12 +1723,10 @@ void cpu_toggle(gpointer data, GtkWidget *widget)

if (strcmp(label, CPU_ALL_CPUS_STR) == 0) {
cpu_helper->allcpus = active;
- if (active) {
- /* enable all toggles */
- for (cpu = 0; cpu < cpu_helper->cpus; cpu++)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cpu_helper->buttons[cpu]),
- TRUE);
- }
+ /* enable/disable all toggles */
+ for (cpu = 0; cpu < cpu_helper->cpus; cpu++)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cpu_helper->buttons[cpu]),
+ active ? TRUE : FALSE);
return;
}

--
1.7.7.3


\
 
 \ /
  Last update: 2012-11-15 03:21    [W:0.095 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site