* [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
` (2 more replies)
0 siblings, 3 replies; 7+ 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] 7+ messages in thread
* [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter
2012-11-15 1:48 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
@ 2012-11-15 1:48 ` David Sharp
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
2 siblings, 0 replies; 7+ messages in thread
From: David Sharp @ 2012-11-15 1:48 UTC (permalink / raw)
To: Steven Rostedt, linux-kernel; +Cc: Vaibhav Nagarnaik, David Sharp
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] kernel-shark: Don't check for system name for sched events
2012-11-15 1:48 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15 1:48 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
@ 2012-11-15 1:48 ` David Sharp
2012-11-15 1:48 ` [PATCH 4/4] kernelshark: Full-height cursor and mark lines David Sharp
2 siblings, 0 replies; 7+ messages in thread
From: David Sharp @ 2012-11-15 1:48 UTC (permalink / raw)
To: Steven Rostedt, linux-kernel; +Cc: Vaibhav Nagarnaik, David Sharp
From: Vaibhav Nagarnaik <vnagarnaik@google.com>
The sched tracepoint names are unique and so there is no need to check
for the subsystem name while looking up the event ID.
This helps kernel shark display the graphs correctly for trace.dat files
generated from trace collection mechanisms that don't record the subsystem.
Google-Bug-Id: 6333917
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Signed-off-by: David Sharp <dhsharp@google.com>
---
trace-graph.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/trace-graph.c b/trace-graph.c
index 4d81219..6f72350 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -1016,7 +1016,7 @@ int trace_graph_check_sched_wakeup(struct graph_info *ginfo,
found = FALSE;
event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_wakeup");
+ NULL, "sched_wakeup");
if (event) {
found = TRUE;
ginfo->event_wakeup_id = event->id;
@@ -1026,7 +1026,7 @@ int trace_graph_check_sched_wakeup(struct graph_info *ginfo,
event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_wakeup_new");
+ NULL, "sched_wakeup_new");
if (event) {
found = TRUE;
ginfo->event_wakeup_new_id = event->id;
@@ -1086,7 +1086,7 @@ int trace_graph_check_sched_switch(struct graph_info *ginfo,
if (ginfo->event_sched_switch_id < 0) {
event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_switch");
+ NULL, "sched_switch");
if (!event)
return 0;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] kernelshark: Full-height cursor and mark lines
2012-11-15 1:48 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15 1:48 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
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 ` David Sharp
2 siblings, 0 replies; 7+ messages in thread
From: David Sharp @ 2012-11-15 1:48 UTC (permalink / raw)
To: Steven Rostedt, linux-kernel; +Cc: David Sharp
"width" and "height" were swapped, causing the vertical marker and cursor lines
to be drawn with the wrong height.
Signed-off-by: David Sharp <dhsharp@google.com>
---
trace-graph.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/trace-graph.c b/trace-graph.c
index 6f72350..60e5241 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -380,7 +380,7 @@ static void draw_cursor(struct graph_info *ginfo)
x = convert_time_to_x(ginfo, ginfo->cursor);
gdk_draw_line(ginfo->draw->window, ginfo->draw->style->mid_gc[3],
- x, 0, x, ginfo->draw->allocation.width);
+ x, 0, x, ginfo->draw->allocation.height);
}
static void draw_marka(struct graph_info *ginfo)
@@ -392,7 +392,7 @@ static void draw_marka(struct graph_info *ginfo)
x = convert_time_to_x(ginfo, ginfo->marka_time);
gdk_draw_line(ginfo->draw->window, green,
- x, 0, x, ginfo->draw->allocation.width);
+ x, 0, x, ginfo->draw->allocation.height);
}
static void draw_markb(struct graph_info *ginfo)
@@ -404,7 +404,7 @@ static void draw_markb(struct graph_info *ginfo)
x = convert_time_to_x(ginfo, ginfo->markb_time);
gdk_draw_line(ginfo->draw->window, red,
- x, 0, x, ginfo->draw->allocation.width);
+ x, 0, x, ginfo->draw->allocation.height);
}
static void update_with_backend(struct graph_info *ginfo,
@@ -434,7 +434,7 @@ static void
draw_line(GtkWidget *widget, gdouble x, struct graph_info *ginfo)
{
gdk_draw_line(widget->window, widget->style->black_gc,
- x, 0, x, widget->allocation.width);
+ x, 0, x, widget->allocation.height);
}
static void clear_line(struct graph_info *ginfo, gint x)
--
1.7.7.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering
@ 2012-11-15 1:51 David Sharp
2012-11-15 1:52 ` David Sharp
0 siblings, 1 reply; 7+ 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] 7+ messages in thread
* Re: [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering
2012-11-15 1:51 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
@ 2012-11-15 1:52 ` David Sharp
2012-11-15 2:31 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: David Sharp @ 2012-11-15 1:52 UTC (permalink / raw)
To: Steven Rostedt, linux-kernel; +Cc: Venkatesh Pallipadi, David Sharp
sorry for the dups... typoed Steve's domain.
On Wed, Nov 14, 2012 at 5:51 PM, David Sharp <dhsharp@google.com> wrote:
> 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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering
2012-11-15 1:52 ` David Sharp
@ 2012-11-15 2:31 ` Steven Rostedt
0 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2012-11-15 2:31 UTC (permalink / raw)
To: David Sharp; +Cc: linux-kernel, Venkatesh Pallipadi
On Wed, 2012-11-14 at 17:52 -0800, David Sharp wrote:
> sorry for the dups... typoed Steve's domain.
>
I applied and pushed out patches 1,3 and 4. I already commented on why I
neglected patch 2.
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-15 2:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 1:48 [PATCH 1/4] kernelshark: Fix bug with Plot CPU filtering David Sharp
2012-11-15 1:48 ` [PATCH 2/4] kernel-shark: Allow unsetting of all CPUs in filter David Sharp
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:52 ` David Sharp
2012-11-15 2:31 ` Steven Rostedt
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).