diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-02-08 16:19:13 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-10 10:58:45 -0500 |
| commit | 09f0fff83bbe3fe5a8c6b256a9533c44e3d7f14e (patch) | |
| tree | 9ec35c013504214ca28d25ee9a1810c961c0658c | |
| parent | 73dcd1f86fceb6343958629800139f60c3ded267 (diff) | |
trace-graph: Rename cpu references to plot references
Theres still variables that reference "cpu" when now they are
referencing plot interfaces.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | trace-graph.c | 34 | ||||
| -rw-r--r-- | trace-graph.h | 12 |
2 files changed, 22 insertions, 24 deletions
diff --git a/trace-graph.c b/trace-graph.c index 27333d6..da095ae 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
| @@ -48,13 +48,13 @@ | |||
| 48 | #define PLOT_SIZE 10 | 48 | #define PLOT_SIZE 10 |
| 49 | #define PLOT_BOX_SIZE PLOT_SIZE | 49 | #define PLOT_BOX_SIZE PLOT_SIZE |
| 50 | #define PLOT_GIVE 2 | 50 | #define PLOT_GIVE 2 |
| 51 | #define PLOT_LINE(cpu) (80 * (cpu) + 80 + PLOT_SIZE) | 51 | #define PLOT_LINE(plot) (80 * (plot) + 80 + PLOT_SIZE) |
| 52 | #define PLOT_TOP(cpu) (PLOT_LINE(cpu) - PLOT_SIZE * 2) | 52 | #define PLOT_TOP(plot) (PLOT_LINE(plot) - PLOT_SIZE * 2) |
| 53 | #define PLOT_BOX_TOP(cpu) (PLOT_LINE(cpu) - PLOT_SIZE) | 53 | #define PLOT_BOX_TOP(plot) (PLOT_LINE(plot) - PLOT_SIZE) |
| 54 | #define PLOT_BOTTOM(cpu) (PLOT_LINE(cpu)-1) | 54 | #define PLOT_BOTTOM(plot) (PLOT_LINE(plot)-1) |
| 55 | #define PLOT_BOX_BOTTOM(cpu) (PLOT_LINE(cpu)) | 55 | #define PLOT_BOX_BOTTOM(plot) (PLOT_LINE(plot)) |
| 56 | #define PLOT_SPACE(cpus) (80 * (cpus) + 80) | 56 | #define PLOT_SPACE(plots) (80 * (plots) + 80) |
| 57 | #define PLOT_LABEL(cpu) (PLOT_TOP(cpu)) | 57 | #define PLOT_LABEL(plot) (PLOT_TOP(plot)) |
| 58 | #define PLOT_X 5 | 58 | #define PLOT_X 5 |
| 59 | 59 | ||
| 60 | static gint largest_plot_label = 0; | 60 | static gint largest_plot_label = 0; |
| @@ -648,8 +648,8 @@ info_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data | |||
| 648 | if (!ginfo->curr_pixmap) | 648 | if (!ginfo->curr_pixmap) |
| 649 | return FALSE; | 649 | return FALSE; |
| 650 | 650 | ||
| 651 | update_with_backend(ginfo, ginfo->cpu_data_x, ginfo->cpu_data_y, | 651 | update_with_backend(ginfo, ginfo->plot_data_x, ginfo->plot_data_y, |
| 652 | ginfo->cpu_data_w, ginfo->cpu_data_h); | 652 | ginfo->plot_data_w, ginfo->plot_data_h); |
| 653 | if (event->is_hint) | 653 | if (event->is_hint) |
| 654 | gdk_window_get_pointer(event->window, &x, &y, &state); | 654 | gdk_window_get_pointer(event->window, &x, &y, &state); |
| 655 | else { | 655 | else { |
| @@ -862,10 +862,10 @@ static void draw_plot_info(struct graph_info *ginfo, gint i, gint x, gint y) | |||
| 862 | if (y > view_start + height) | 862 | if (y > view_start + height) |
| 863 | y -= height; | 863 | y -= height; |
| 864 | 864 | ||
| 865 | ginfo->cpu_data_x = x; | 865 | ginfo->plot_data_x = x; |
| 866 | ginfo->cpu_data_y = y; | 866 | ginfo->plot_data_y = y; |
| 867 | ginfo->cpu_data_w = width; | 867 | ginfo->plot_data_w = width; |
| 868 | ginfo->cpu_data_h = height; | 868 | ginfo->plot_data_h = height; |
| 869 | 869 | ||
| 870 | pix = gdk_pixmap_new(ginfo->draw->window, | 870 | pix = gdk_pixmap_new(ginfo->draw->window, |
| 871 | width, | 871 | width, |
| @@ -905,8 +905,8 @@ motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data) | |||
| 905 | if (!ginfo->handle) | 905 | if (!ginfo->handle) |
| 906 | return FALSE; | 906 | return FALSE; |
| 907 | 907 | ||
| 908 | update_with_backend(ginfo, ginfo->cpu_data_x, ginfo->cpu_data_y, | 908 | update_with_backend(ginfo, ginfo->plot_data_x, ginfo->plot_data_y, |
| 909 | ginfo->cpu_data_w, ginfo->cpu_data_h); | 909 | ginfo->plot_data_w, ginfo->plot_data_h); |
| 910 | if (event->is_hint) | 910 | if (event->is_hint) |
| 911 | gdk_window_get_pointer(event->window, &x, &y, &state); | 911 | gdk_window_get_pointer(event->window, &x, &y, &state); |
| 912 | else { | 912 | else { |
| @@ -1225,8 +1225,8 @@ leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data) | |||
| 1225 | if (!ginfo->handle) | 1225 | if (!ginfo->handle) |
| 1226 | return FALSE; | 1226 | return FALSE; |
| 1227 | 1227 | ||
| 1228 | update_with_backend(ginfo, ginfo->cpu_data_x, ginfo->cpu_data_y, | 1228 | update_with_backend(ginfo, ginfo->plot_data_x, ginfo->plot_data_y, |
| 1229 | ginfo->cpu_data_w, ginfo->cpu_data_h); | 1229 | ginfo->plot_data_w, ginfo->plot_data_h); |
| 1230 | 1230 | ||
| 1231 | return FALSE; | 1231 | return FALSE; |
| 1232 | } | 1232 | } |
diff --git a/trace-graph.h b/trace-graph.h index 7e4c789..22ae29b 100644 --- a/trace-graph.h +++ b/trace-graph.h | |||
| @@ -159,13 +159,11 @@ struct graph_info { | |||
| 159 | 159 | ||
| 160 | struct filter_task *hide_tasks; | 160 | struct filter_task *hide_tasks; |
| 161 | 161 | ||
| 162 | /* Box info for CPU data info window */ | 162 | /* Box info for plot data info window */ |
| 163 | gint cpu_data_x; | 163 | gint plot_data_x; |
| 164 | gint cpu_data_y; | 164 | gint plot_data_y; |
| 165 | gint cpu_data_w; | 165 | gint plot_data_w; |
| 166 | gint cpu_data_h; | 166 | gint plot_data_h; |
| 167 | |||
| 168 | gint cpu_x; /* x coord where CPU numbers are drawn */ | ||
| 169 | }; | 167 | }; |
| 170 | 168 | ||
| 171 | 169 | ||
