aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-12-15 22:58:16 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-12-17 22:50:41 -0500
commit97495e5a901ab993ff84998ad07ad23bd103c89a (patch)
tree27b319534dbc80e1465b4f989af650461fb7b392
parentbedeaf452495fcbccb82f23ecf81aa4c41e4f3ab (diff)
trace-graph: Add space to hold all CPUS
In case we have a lot of CPUS, make sure the drawing area has enough room to display them. The scroll window will take care of the viewable area. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-graph.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/trace-graph.c b/trace-graph.c
index 54ea341..7b7fcda 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -40,6 +40,7 @@
40#define CPU_MIDDLE(cpu) (80 * (cpu) + 80) 40#define CPU_MIDDLE(cpu) (80 * (cpu) + 80)
41#define CPU_TOP(cpu) (CPU_MIDDLE(cpu) - 10) 41#define CPU_TOP(cpu) (CPU_MIDDLE(cpu) - 10)
42#define CPU_BOTTOM(cpu) (CPU_MIDDLE(cpu) + 10) 42#define CPU_BOTTOM(cpu) (CPU_MIDDLE(cpu) + 10)
43#define CPU_SPACE(cpus) (80 * (cpus) + 80)
43 44
44static gint ftrace_sched_switch_id = -1; 45static gint ftrace_sched_switch_id = -1;
45static gint event_sched_switch_id = -1; 46static gint event_sched_switch_id = -1;
@@ -634,6 +635,10 @@ configure_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
634 old_w = ginfo->max_width; 635 old_w = ginfo->max_width;
635 old_h = ginfo->max_height; 636 old_h = ginfo->max_height;
636 637
638
639 gtk_widget_set_size_request(widget, 0, CPU_SPACE(ginfo->cpus));
640
641
637 if (widget->allocation.width > ginfo->max_width) 642 if (widget->allocation.width > ginfo->max_width)
638 ginfo->max_width = widget->allocation.width; 643 ginfo->max_width = widget->allocation.width;
639 644