1 /* service_response_time_table.c
2 * service_response_time_table 2003 Ronnie Sahlberg
3 * Helper routines common to all service response time statistics
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include "epan/packet_info.h"
36 #include "../simple_dialog.h"
38 #include "gtk/service_response_time_table.h"
39 #include "gtk/filter_utils.h"
40 #include "gtk/gui_utils.h"
41 #include "gtk/utf8_entities.h"
43 #define NANOSECS_PER_SEC 1000000000
58 srt_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data, guint callback_action)
60 srt_stat_table *rst = (srt_stat_table *)callback_data;
64 GtkTreeSelection *sel;
67 if(rst->filter_string==NULL){
71 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(rst->table));
73 if (!gtk_tree_selection_get_selected(sel, &model, &iter))
76 gtk_tree_model_get (model, &iter, INDEX_COLUMN, &selection, -1);
77 if(selection>=(int)rst->num_procs){
78 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No procedure selected");
82 str = g_strdup_printf("%s==%d", rst->filter_string, selection);
84 apply_selected_filter (callback_action, str);
90 srt_show_popup_menu_cb(void *widg _U_, GdkEvent *event, srt_stat_table *rst)
92 GdkEventButton *bevent = (GdkEventButton *)event;
94 if(event->type==GDK_BUTTON_PRESS && bevent->button==3){
95 gtk_menu_popup(GTK_MENU(rst->menu), NULL, NULL, NULL, NULL,
96 bevent->button, bevent->time);
103 /* Action callbacks */
105 apply_as_selected_cb(GtkWidget *widget, gpointer user_data)
107 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_SELECTED, 0));
110 apply_as_not_selected_cb(GtkWidget *widget, gpointer user_data)
112 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_NOT_SELECTED, 0));
115 apply_as_and_selected_cb(GtkWidget *widget, gpointer user_data)
117 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_AND_SELECTED, 0));
120 apply_as_or_selected_cb(GtkWidget *widget, gpointer user_data)
122 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_OR_SELECTED, 0));
125 apply_as_and_not_selected_cb(GtkWidget *widget, gpointer user_data)
127 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_AND_NOT_SELECTED, 0));
130 apply_as_or_not_selected_cb(GtkWidget *widget, gpointer user_data)
132 srt_select_filter_cb( widget , user_data, CALLBACK_MATCH(ACTYPE_OR_NOT_SELECTED, 0));
136 prep_as_selected_cb(GtkWidget *widget, gpointer user_data)
138 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_SELECTED, 0));
141 prep_as_not_selected_cb(GtkWidget *widget, gpointer user_data)
143 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_NOT_SELECTED, 0));
146 prep_as_and_selected_cb(GtkWidget *widget, gpointer user_data)
148 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_AND_SELECTED, 0));
151 prep_as_or_selected_cb(GtkWidget *widget, gpointer user_data)
153 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_OR_SELECTED, 0));
156 prep_as_and_not_selected_cb(GtkWidget *widget, gpointer user_data)
158 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_AND_NOT_SELECTED, 0));
161 prep_as_or_not_selected_cb(GtkWidget *widget, gpointer user_data)
163 srt_select_filter_cb( widget , user_data, CALLBACK_PREPARE(ACTYPE_OR_NOT_SELECTED, 0));
167 find_selected_cb(GtkWidget *widget, gpointer user_data)
169 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_FRAME(ACTYPE_SELECTED, 0));
172 find_not_selected_cb(GtkWidget *widget, gpointer user_data)
174 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_FRAME(ACTYPE_NOT_SELECTED, 0));
177 find_prev_selected_cb(GtkWidget *widget, gpointer user_data)
179 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_PREVIOUS(ACTYPE_SELECTED, 0));
182 find_prev_not_selected_cb(GtkWidget *widget, gpointer user_data)
184 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_PREVIOUS(ACTYPE_NOT_SELECTED, 0));
187 find_next_selected_cb(GtkWidget *widget, gpointer user_data)
189 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_NEXT(ACTYPE_SELECTED, 0));
192 find_next_not_selected_cb(GtkWidget *widget, gpointer user_data)
194 srt_select_filter_cb( widget , user_data, CALLBACK_FIND_NEXT(ACTYPE_NOT_SELECTED, 0));
197 color_selected_cb(GtkWidget *widget, gpointer user_data)
199 srt_select_filter_cb( widget , user_data, CALLBACK_COLORIZE(ACTYPE_SELECTED, 0));
202 color_not_selected_cb(GtkWidget *widget, gpointer user_data)
204 srt_select_filter_cb( widget , user_data, CALLBACK_COLORIZE(ACTYPE_SELECTED, 0));
207 static const char *ui_desc_service_resp_t_filter_popup =
209 " <popup name='ServiceRespTFilterPopup'>\n"
210 " <menu action='/Apply as Filter'>\n"
211 " <menuitem action='/Apply as Filter/Selected'/>\n"
212 " <menuitem action='/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " not Selected'/>\n"
213 " <menuitem action='/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " and Selected'/>\n"
214 " <menuitem action='/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " or Selected'/>\n"
215 " <menuitem action='/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " and not Selected'/>\n"
216 " <menuitem action='/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " or not Selected'/>\n"
218 " <menu action='/Prepare a Filter'>\n"
219 " <menuitem action='/Prepare a Filter/Selected'/>\n"
220 " <menuitem action='/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " not Selected'/>\n"
221 " <menuitem action='/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " and Selected'/>\n"
222 " <menuitem action='/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " or Selected'/>\n"
223 " <menuitem action='/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " and not Selected'/>\n"
224 " <menuitem action='/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " or not Selected'/>\n"
226 " <menu action='/Find Frame'>\n"
227 " <menu action='/Find Frame/Find Frame'>\n"
228 " <menuitem action='/Find Frame/Selected'/>\n"
229 " <menuitem action='/Find Frame/Not Selected'/>\n"
231 " <menu action='/Find Frame/Find Next'>\n"
232 " <menuitem action='/Find Next/Selected'/>\n"
233 " <menuitem action='/Find Next/Not Selected'/>\n"
235 " <menu action='/Find Frame/Find Previous'>\n"
236 " <menuitem action='/Find Previous/Selected'/>\n"
237 " <menuitem action='/Find Previous/Not Selected'/>\n"
240 " <menu action='/Colorize Procedure'>\n"
241 " <menuitem action='/Colorize Procedure/Selected'/>\n"
242 " <menuitem action='/Colorize Procedure/Not Selected'/>\n"
251 * const gchar *stock_id;
252 * const gchar *label;
253 * const gchar *accelerator;
254 * const gchar *tooltip;
255 * GCallback callback;
257 * const gchar *name; The name of the action.
258 * const gchar *stock_id; The stock id for the action, or the name of an icon from the icon theme.
259 * const gchar *label; The label for the action. This field should typically be marked for translation,
260 * see gtk_action_group_set_translation_domain().
261 * If label is NULL, the label of the stock item with id stock_id is used.
262 * const gchar *accelerator; The accelerator for the action, in the format understood by gtk_accelerator_parse().
263 * const gchar *tooltip; The tooltip for the action. This field should typically be marked for translation,
264 * see gtk_action_group_set_translation_domain().
265 * GCallback callback; The function to call when the action is activated.
268 static const GtkActionEntry service_resp_t__popup_entries[] = {
269 { "/Apply as Filter", NULL, "Apply as Filter", NULL, NULL, NULL },
270 { "/Prepare a Filter", NULL, "Prepare a Filter", NULL, NULL, NULL },
271 { "/Find Frame", NULL, "Find Frame", NULL, NULL, NULL },
272 { "/Find Frame/Find Frame", NULL, "Find Frame", NULL, NULL, NULL },
273 { "/Find Frame/Find Next", NULL, "Find Next" , NULL, NULL, NULL },
274 { "/Find Frame/Find Previous", NULL, "Find Previous", NULL, NULL, NULL },
275 { "/Colorize Procedure", NULL, "Colorize Procedure", NULL, NULL, NULL },
276 { "/Apply as Filter/Selected", NULL, "Selected", NULL, "Selected", G_CALLBACK(apply_as_selected_cb) },
277 { "/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " not Selected", G_CALLBACK(apply_as_not_selected_cb) },
278 { "/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " and Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and Selected", G_CALLBACK(apply_as_and_selected_cb) },
279 { "/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " or Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or Selected", G_CALLBACK(apply_as_or_selected_cb) },
280 { "/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " and not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and not Selected", G_CALLBACK(apply_as_and_not_selected_cb) },
281 { "/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " or not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or not Selected", G_CALLBACK(apply_as_or_not_selected_cb) },
282 { "/Prepare a Filter/Selected", NULL, "Selected", NULL, "selcted", G_CALLBACK(prep_as_selected_cb) },
283 { "/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " not Selected", G_CALLBACK(prep_as_not_selected_cb) },
284 { "/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " and Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and Selected", G_CALLBACK(prep_as_and_selected_cb) },
285 { "/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " or Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or Selected", G_CALLBACK(prep_as_or_selected_cb) },
286 { "/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " and not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " and not Selected", G_CALLBACK(prep_as_and_not_selected_cb) },
287 { "/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " or not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or not Selected", NULL, UTF8_HORIZONTAL_ELLIPSIS " or not Selected", G_CALLBACK(prep_as_or_not_selected_cb) },
288 { "/Find Frame/Selected", NULL, "Selected", NULL, "Selected", G_CALLBACK(find_selected_cb) },
289 { "/Find Frame/Not Selected", NULL, "Not Selected", NULL, "Not Selected", G_CALLBACK(find_not_selected_cb) },
290 { "/Find Previous/Selected", NULL, "Selected", NULL, "Selected", G_CALLBACK(find_prev_selected_cb) },
291 { "/Find Previous/Not Selected", NULL, "Not Selected", NULL, "Not Selected", G_CALLBACK(find_prev_not_selected_cb) },
292 { "/Find Next/Selected", NULL, "Selected", NULL, "Selected", G_CALLBACK(find_next_selected_cb) },
293 { "/Find Next/Not Selected", NULL, "Not Selected", NULL, "Not Selected", G_CALLBACK(find_next_not_selected_cb) },
294 { "/Colorize Procedure/Selected", NULL, "Selected", NULL, "Selected", G_CALLBACK(color_selected_cb) },
295 { "/Colorize Procedure/Not Selected", NULL, "Not Selected", NULL, "Not Selected", G_CALLBACK(color_not_selected_cb) },
299 srt_create_popup_menu(srt_stat_table *rst)
301 GtkUIManager *ui_manager;
302 GtkActionGroup *action_group;
303 GError *error = NULL;
305 action_group = gtk_action_group_new ("ServiceRespTFilterPopupActionGroup");
306 gtk_action_group_add_actions (action_group, /* the action group */
307 service_resp_t__popup_entries, /* an array of action descriptions */
308 G_N_ELEMENTS(service_resp_t__popup_entries), /* the number of entries */
309 rst); /* data to pass to the action callbacks */
311 ui_manager = gtk_ui_manager_new ();
312 gtk_ui_manager_insert_action_group (ui_manager,
314 0); /* the position at which the group will be inserted */
315 gtk_ui_manager_add_ui_from_string (ui_manager,ui_desc_service_resp_t_filter_popup, -1, &error);
318 fprintf (stderr, "Warning: building service response time filter popup failed: %s\n",
320 g_error_free (error);
323 rst->menu = gtk_ui_manager_get_widget(ui_manager, "/ServiceRespTFilterPopup");
324 g_signal_connect(rst->table, "button_press_event", G_CALLBACK(srt_show_popup_menu_cb), rst);
328 /* ---------------- */
330 srt_time_func (GtkTreeViewColumn *column _U_,
331 GtkCellRenderer *renderer,
339 /* The col to get data from is in userdata */
340 gint data_column = GPOINTER_TO_INT(user_data);
342 gtk_tree_model_get(model, iter, data_column, &data, -1);
344 g_object_set(renderer, "text", "", NULL);
347 str = g_strdup_printf("%3d.%06d", (int)data->secs, (data->nsecs+500)/1000);
348 g_object_set(renderer, "text", str, NULL);
353 srt_avg_func (GtkTreeViewColumn *column _U_,
354 GtkCellRenderer *renderer,
361 gint data_column = GPOINTER_TO_INT(user_data);
363 gtk_tree_model_get(model, iter, data_column, &td, -1);
364 str=g_strdup_printf("%3d.%06d",
365 (int)(td/1000000), (int)(td%1000000));
366 g_object_set(renderer, "text", str, NULL);
371 srt_time_sort_func(GtkTreeModel *model,
379 gint data_column = GPOINTER_TO_INT(user_data);
381 gtk_tree_model_get(model, a, data_column, &ns_a, -1);
382 gtk_tree_model_get(model, b, data_column, &ns_b, -1);
387 else if (ns_a == NULL || ns_b == NULL) {
388 ret = (ns_a == NULL) ? -1 : 1;
391 ret = nstime_cmp(ns_a,ns_b);
397 XXX Resizable columns are ugly when there's more than on table cf. SMB
400 init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, const char *filter_string)
405 GtkTreeViewColumn *column;
406 GtkCellRenderer *renderer;
407 GtkTreeSortable *sortable;
408 GtkTreeSelection *sel;
410 const char *default_titles[] = { "Index", "Procedure", "Calls", "Min SRT", "Max SRT", "Avg SRT" };
412 /* Create the store */
413 store = gtk_list_store_new (N_COLUMNS, /* Total number of columns */
414 G_TYPE_INT, /* Index */
415 G_TYPE_STRING, /* Procedure */
416 G_TYPE_UINT, /* Calls */
417 G_TYPE_POINTER, /* Min SRT */
418 G_TYPE_POINTER, /* Max SRT */
419 G_TYPE_UINT64); /* Avg SRT */
422 tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
423 rst->table = GTK_TREE_VIEW(tree);
424 sortable = GTK_TREE_SORTABLE(store);
426 /* The view now holds a reference. We can get rid of our own reference */
427 g_object_unref (G_OBJECT (store));
430 rst->filter_string=g_strdup(filter_string);
432 rst->filter_string=NULL;
434 for (i = 0; i < N_COLUMNS; i++) {
435 renderer = gtk_cell_renderer_text_new ();
436 if (i != PROCEDURE_COLUMN) {
437 /* right align numbers */
438 g_object_set(G_OBJECT(renderer), "xalign", 1.0, NULL);
440 g_object_set(renderer, "ypad", 0, NULL);
444 column = gtk_tree_view_column_new_with_attributes (default_titles[i], renderer, NULL);
445 gtk_tree_view_column_set_cell_data_func(column, renderer, srt_time_func, GINT_TO_POINTER(i), NULL);
446 gtk_tree_sortable_set_sort_func(sortable, i, srt_time_sort_func, GINT_TO_POINTER(i), NULL);
449 column = gtk_tree_view_column_new_with_attributes (default_titles[i], renderer, NULL);
450 gtk_tree_view_column_set_cell_data_func(column, renderer, srt_avg_func, GINT_TO_POINTER(i), NULL);
453 column = gtk_tree_view_column_new_with_attributes (default_titles[i], renderer, "text",
458 gtk_tree_view_column_set_sort_column_id(column, i);
459 gtk_tree_view_column_set_resizable(column, TRUE);
460 gtk_tree_view_append_column (rst->table, column);
461 if (i == CALLS_COLUMN) {
462 /* XXX revert order sort */
463 gtk_tree_view_column_clicked(column);
464 gtk_tree_view_column_clicked(column);
468 rst->scrolled_window=scrolled_window_new(NULL, NULL);
469 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(rst->scrolled_window),
471 gtk_container_add(GTK_CONTAINER(rst->scrolled_window), GTK_WIDGET (rst->table));
472 gtk_box_pack_start(GTK_BOX(vbox), rst->scrolled_window, TRUE, TRUE, 0);
474 gtk_tree_view_set_reorderable (rst->table, FALSE);
475 /* Now enable the sorting of each column */
476 gtk_tree_view_set_rules_hint(rst->table, TRUE);
477 gtk_tree_view_set_headers_clickable(rst->table, TRUE);
479 gtk_widget_show(rst->scrolled_window);
481 rst->num_procs=num_procs;
482 rst->procedures=g_malloc(sizeof(srt_procedure_t)*num_procs);
483 for(i=0;i<num_procs;i++){
484 time_stat_init(&rst->procedures[i].stats);
485 rst->procedures[i].index = 0;
486 rst->procedures[i].procedure = NULL;
489 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(rst->table));
490 gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
491 /* create popup menu for this table */
492 if(rst->filter_string){
493 srt_create_popup_menu(rst);
498 init_srt_table_row(srt_stat_table *rst, int index, const char *procedure)
500 /* we have discovered a new procedure. Extend the table accordingly */
501 if(index>=rst->num_procs){
502 int old_num_procs=rst->num_procs;
505 rst->num_procs=index+1;
506 rst->procedures=g_realloc(rst->procedures, sizeof(srt_procedure_t)*(rst->num_procs));
507 for(i=old_num_procs;i<rst->num_procs;i++){
508 time_stat_init(&rst->procedures[i].stats);
509 rst->procedures[i].index = i;
510 rst->procedures[i].procedure=NULL;
513 rst->procedures[index].index = index;
514 rst->procedures[index].procedure=g_strdup(procedure);
518 add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo)
523 g_assert(index >= 0 && index < rst->num_procs);
524 rp=&rst->procedures[index];
527 * If the count of calls for this procedure is currently zero, it's
528 * going to become non-zero, so add a row for it (we don't want
529 * rows for procedures that have no calls - especially if the
530 * procedure has no calls because the index doesn't correspond
531 * to a procedure, but is an unused/reserved value).
533 * (Yes, this means that the rows aren't in order by anything
534 * interesting. That's why we have the table sorted by a column.)
537 if (rp->stats.num==0){
538 GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(rst->table));
539 gtk_list_store_append(store, &rp->iter);
540 gtk_list_store_set(store, &rp->iter,
541 INDEX_COLUMN, rp->index,
542 PROCEDURE_COLUMN, rp->procedure,
543 CALLS_COLUMN, rp->stats.num,
544 MIN_SRT_COLUMN, NULL,
545 MAX_SRT_COLUMN, NULL,
546 AVG_SRT_COLUMN, (guint64)0,
550 /* calculate time delta between request and reply */
552 nstime_delta(&delta, &t, req_time);
554 time_stat_update(&rp->stats, &delta, pinfo);
558 draw_srt_table_data(srt_stat_table *rst)
562 GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(rst->table));
564 for(i=0;i<rst->num_procs;i++){
565 /* ignore procedures with no calls (they don't have rows) */
566 if(rst->procedures[i].stats.num==0){
569 /* Scale the average SRT in units of 1us and round to the nearest us.
570 tot.secs is a time_t which may be 32 or 64 bits (or even floating)
571 depending uon the platform. After casting tot.secs to 64 bits, it
572 would take a capture with a duration of over 136 *years* to
573 overflow the secs portion of td. */
574 td = ((guint64)(rst->procedures[i].stats.tot.secs))*NANOSECS_PER_SEC + rst->procedures[i].stats.tot.nsecs;
575 td = ((td / rst->procedures[i].stats.num) + 500) / 1000;
577 gtk_list_store_set(store, &rst->procedures[i].iter,
578 CALLS_COLUMN, rst->procedures[i].stats.num,
579 MIN_SRT_COLUMN, &rst->procedures[i].stats.min,
580 MAX_SRT_COLUMN, &rst->procedures[i].stats.max,
588 reset_srt_table_data(srt_stat_table *rst)
593 for(i=0;i<rst->num_procs;i++){
594 time_stat_init(&rst->procedures[i].stats);
596 store = GTK_LIST_STORE(gtk_tree_view_get_model(rst->table));
597 gtk_list_store_clear(store);
601 free_srt_table_data(srt_stat_table *rst)
605 for(i=0;i<rst->num_procs;i++){
606 g_free(rst->procedures[i].procedure);
607 rst->procedures[i].procedure=NULL;
609 g_free(rst->filter_string);
610 rst->filter_string=NULL;
611 g_free(rst->procedures);
612 rst->procedures=NULL;