aboutsummaryrefslogtreecommitdiffstats
path: root/kernel-shark.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel-shark.c')
-rw-r--r--kernel-shark.c44
1 files changed, 41 insertions, 3 deletions
diff --git a/kernel-shark.c b/kernel-shark.c
index 0c89e00..e0c123a 100644
--- a/kernel-shark.c
+++ b/kernel-shark.c
@@ -969,7 +969,7 @@ __list_tasks_clicked (struct shark_info *info,
969 969
970 store = TRACE_VIEW_STORE(model); 970 store = TRACE_VIEW_STORE(model);
971 971
972 tasks = trace_graph_task_list(ginfo); 972 tasks = task_list_pids(ginfo->tasks);
973 selected = filter_task_pids(task_filter); 973 selected = filter_task_pids(task_filter);
974 974
975 trace_task_dialog(info->handle, tasks, selected, func, info); 975 trace_task_dialog(info->handle, tasks, selected, func, info);
@@ -1068,7 +1068,7 @@ __graph_tasks_clicked (struct shark_info *info,
1068 if (!ginfo->handle) 1068 if (!ginfo->handle)
1069 return; 1069 return;
1070 1070
1071 tasks = trace_graph_task_list(ginfo); 1071 tasks = task_list_pids(ginfo->tasks);
1072 selected = filter_task_pids(task_filter); 1072 selected = filter_task_pids(task_filter);
1073 1073
1074 trace_task_dialog(ginfo->handle, tasks, selected, func, info); 1074 trace_task_dialog(ginfo->handle, tasks, selected, func, info);
@@ -1268,7 +1268,7 @@ plot_tasks_clicked (gpointer data)
1268 if (!ginfo->handle) 1268 if (!ginfo->handle)
1269 return; 1269 return;
1270 1270
1271 tasks = trace_graph_task_list(ginfo); 1271 tasks = task_list_pids(ginfo->tasks);
1272 graph_plot_task_plotted(ginfo, &selected); 1272 graph_plot_task_plotted(ginfo, &selected);
1273 1273
1274 trace_task_dialog(ginfo->handle, tasks, selected, 1274 trace_task_dialog(ginfo->handle, tasks, selected,
@@ -1277,6 +1277,29 @@ plot_tasks_clicked (gpointer data)
1277 free(selected); 1277 free(selected);
1278} 1278}
1279 1279
1280/* Callback for the clicked signal of the plot real-time tasks button */
1281static void
1282plot_rt_tasks_clicked (gpointer data)
1283{
1284 struct shark_info *info = data;
1285 struct graph_info *ginfo = info->ginfo;
1286 struct rt_graph_info *rtinfo;
1287 gint *selected;
1288 gint *tasks;
1289
1290 if (!ginfo->handle)
1291 return;
1292
1293 rtinfo = &ginfo->rtinfo;
1294 tasks = task_list_pids(rtinfo->tasks);
1295 rt_plot_task_plotted(rtinfo, &selected);
1296
1297 trace_task_dialog(ginfo->handle, tasks, selected,
1298 rt_plot_task_update_callback, rtinfo);
1299 free(tasks);
1300 free(selected);
1301}
1302
1280/* Callback for the clicked signal of the help contents button */ 1303/* Callback for the clicked signal of the help contents button */
1281static void 1304static void
1282help_content_clicked (gpointer data) 1305help_content_clicked (gpointer data)
@@ -2184,6 +2207,21 @@ void kernel_shark(int argc, char **argv)
2184 /* We do need to show menu items */ 2207 /* We do need to show menu items */
2185 gtk_widget_show(sub_item); 2208 gtk_widget_show(sub_item);
2186 2209
2210 /* --- Plot - RT Tasks Option --- */
2211
2212 sub_item = gtk_menu_item_new_with_label("Real-Time Tasks");
2213
2214 /* Add them to the menu */
2215 gtk_menu_shell_append(GTK_MENU_SHELL (menu), sub_item);
2216
2217 /* We can attach the Quit menu item to our exit function */
2218 g_signal_connect_swapped (G_OBJECT (sub_item), "activate",
2219 G_CALLBACK (plot_rt_tasks_clicked),
2220 (gpointer) info);
2221
2222 /* We do need to show menu items */
2223 gtk_widget_show(sub_item);
2224
2187 2225
2188 /* --- End Plot Options --- */ 2226 /* --- End Plot Options --- */
2189 gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu); 2227 gtk_menu_item_set_submenu(GTK_MENU_ITEM (menu_item), menu);