* [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 [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 [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 [flat|nested] 7+ messages in thread