From: David Sharp <dhsharp@google.com>
To: Steven Rostedt <rostedt@goodmis.net>, linux-kernel@vger.kernel.org
Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>,
David Sharp <dhsharp@google.com>
Subject: [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter
Date: Wed, 14 Nov 2012 17:48:06 -0800 [thread overview]
Message-ID: <1352944088-21333-2-git-send-email-dhsharp@google.com> (raw)
In-Reply-To: <1352944088-21333-1-git-send-email-dhsharp@google.com>
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
next prev parent reply other threads:[~2012-11-15 1:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 1:48 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15 1:48 ` David Sharp [this message]
2012-11-15 1:48 ` [PATCH 3/4] kernel-shark: Don't check for system name for sched events David Sharp
2012-11-15 1:48 ` [PATCH 4/4] kernelshark: Full-height cursor and mark lines David Sharp
-- strict thread matches above, loose matches on Subject: below --
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
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=1352944088-21333-2-git-send-email-dhsharp@google.com \
--to=dhsharp@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.net \
--cc=vnagarnaik@google.com \
/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;
as well as URLs for NNTP newsgroup(s).