* information. Happens when two viewers ask for it before servicing
* starts.
*/
- lttvwindowtraces_background_request_remove(trace, "stats");
- lttvwindowtraces_background_request_queue(trace,
- "stats");
+ if(!lttvwindowtraces_background_request_find(trace, "stats"))
+ lttvwindowtraces_background_request_queue(
+ main_window_get_widget(svd->tab), trace, "stats");
lttvwindowtraces_background_notify_queue(svd,
trace,
ltt_time_infinite,
lttvwindow_register_traceset_notify(statistic_viewer_data->tab,
statistic_traceset_changed,
statistic_viewer_data);
- request_background_data(statistic_viewer_data);
-
+
statistic_viewer_data->statistic_hash = g_hash_table_new_full(g_str_hash,
g_str_equal,
statistic_destroy_hash_key,
gtk_container_add (GTK_CONTAINER (statistic_viewer_data->scroll_win_text), statistic_viewer_data->text_v);
gtk_paned_pack2(GTK_PANED(statistic_viewer_data->hpaned_v), statistic_viewer_data->scroll_win_text, TRUE, FALSE);
+ gtk_container_set_border_width(
+ GTK_CONTAINER(statistic_viewer_data->hpaned_v), 1);
+
gtk_widget_show(statistic_viewer_data->scroll_win_tree);
gtk_widget_show(statistic_viewer_data->scroll_win_text);
gtk_widget_show(statistic_viewer_data->tree_v);
g_statistic_viewer_data_list,
statistic_viewer_data);
+ request_background_data(statistic_viewer_data);
+
return statistic_viewer_data;
}
//show stats for all traces
for(i = 0 ; i < nb ; i++) {
tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]);
+#if 0 //FIXME
desc = ltt_trace_system_description(tcs->parent.parent.t);
LttTime start_time = ltt_trace_system_description_trace_start_time(desc);
sprintf(trace_str, "Trace on system %s at time %lu.%09lu",
ltt_trace_system_description_node_name(desc),
start_time.tv_sec,
start_time.tv_nsec);
-
+#endif //0
+ sprintf(trace_str, g_quark_to_string(ltt_trace_name(tcs->parent.parent.t)));
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter,NAME_COLUMN,trace_str,-1);
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
LttvAttributeName name;
LttvAttributeValue value;
LttvAttributeType type;
+ gboolean is_named;
gchar * str, dir_str[PATH_LENGTH];
GtkTreePath * path;
GtkTreeIter iter;
nb = lttv_attribute_get_number(stats);
for(i = 0 ; i < nb ; i++) {
- type = lttv_attribute_get(stats, i, &name, &value);
+ type = lttv_attribute_get(stats, i, &name, &value, &is_named);
switch(type) {
case LTTV_GOBJECT:
if(LTTV_IS_ATTRIBUTE(*(value.v_gobject))) {
- sprintf(dir_str, "%s", g_quark_to_string(name));
subtree = (LttvAttribute *)*(value.v_gobject);
+ if(is_named)
+ sprintf(dir_str, "%s", g_quark_to_string(name));
+ else
+ sprintf(dir_str, "%lu", name);
gtk_tree_store_append (store, &iter, parent);
gtk_tree_store_set (store, &iter,NAME_COLUMN,dir_str,-1);
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
LttvAttributeName name;
LttvAttributeValue value;
LttvAttributeType type;
+ gboolean is_named;
gchar type_name[PATH_LENGTH], type_value[PATH_LENGTH];
GtkTextIter text_iter;
flag = 0;
nb = lttv_attribute_get_number(stats);
for(i = 0 ; i < nb ; i++) {
- type = lttv_attribute_get(stats, i, &name, &value);
- sprintf(type_name,"%s", g_quark_to_string(name));
+ type = lttv_attribute_get(stats, i, &name, &value, &is_named);
+ if(is_named)
+ sprintf(type_name,"%s", g_quark_to_string(name));
+ else
+ sprintf(type_name,"%lu", name);
type_value[0] = '\0';
switch(type) {
case LTTV_INT: