diff options
Diffstat (limited to 'kernel-shark.c')
-rw-r--r-- | kernel-shark.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/kernel-shark.c b/kernel-shark.c index 1aaf149..ca1fcb8 100644 --- a/kernel-shark.c +++ b/kernel-shark.c | |||
@@ -1245,6 +1245,25 @@ plot_cpu_clicked (gpointer data) | |||
1245 | g_free(cpu_mask); | 1245 | g_free(cpu_mask); |
1246 | } | 1246 | } |
1247 | 1247 | ||
1248 | /* Callback for the clicked signal of the plot CPUs button */ | ||
1249 | static void | ||
1250 | plot_rt_cpu_clicked (gpointer data) | ||
1251 | { | ||
1252 | struct shark_info *info = data; | ||
1253 | struct graph_info *ginfo = info->ginfo; | ||
1254 | gboolean all_cpus; | ||
1255 | guint64 *cpu_mask; | ||
1256 | |||
1257 | if (!ginfo->handle) | ||
1258 | return; | ||
1259 | |||
1260 | rt_plot_cpus_plotted(ginfo, &all_cpus, &cpu_mask); | ||
1261 | |||
1262 | trace_filter_cpu_dialog(all_cpus, cpu_mask, ginfo->cpus, | ||
1263 | rt_plot_cpus_update_callback, ginfo); | ||
1264 | g_free(cpu_mask); | ||
1265 | } | ||
1266 | |||
1248 | /* Callback for the clicked signal of the plot tasks button */ | 1267 | /* Callback for the clicked signal of the plot tasks button */ |
1249 | static void | 1268 | static void |
1250 | plot_tasks_clicked (gpointer data) | 1269 | plot_tasks_clicked (gpointer data) |
@@ -1289,6 +1308,7 @@ plot_rt_tasks_clicked (gpointer data) | |||
1289 | free(selected); | 1308 | free(selected); |
1290 | } | 1309 | } |
1291 | 1310 | ||
1311 | |||
1292 | /* Callback for the clicked signal of the help contents button */ | 1312 | /* Callback for the clicked signal of the help contents button */ |
1293 | static void | 1313 | static void |
1294 | help_content_clicked (gpointer data) | 1314 | help_content_clicked (gpointer data) |
@@ -2211,6 +2231,21 @@ void kernel_shark(int argc, char **argv) | |||
2211 | /* We do need to show menu items */ | 2231 | /* We do need to show menu items */ |
2212 | gtk_widget_show(sub_item); | 2232 | gtk_widget_show(sub_item); |
2213 | 2233 | ||
2234 | /* --- Plot - RT CPUs Option --- */ | ||
2235 | |||
2236 | sub_item = gtk_menu_item_new_with_label("Real-Time CPUs"); | ||
2237 | |||
2238 | /* Add them to the menu */ | ||
2239 | gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item); | ||
2240 | |||
2241 | /* We can attach the Quit menu item to our exit function */ | ||
2242 | g_signal_connect_swapped (G_OBJECT (sub_item), "activate", | ||
2243 | G_CALLBACK (plot_rt_cpu_clicked), | ||
2244 | (gpointer) info); | ||
2245 | |||
2246 | /* We do need to show menu items */ | ||
2247 | gtk_widget_show(sub_item); | ||
2248 | |||
2214 | 2249 | ||
2215 | /* --- End Plot Options --- */ | 2250 | /* --- End Plot Options --- */ |
2216 | gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu); | 2251 | gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu); |