1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2003-2004 Mathieu Desnoyers
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
30 #include "processlist.h"
34 #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
35 //#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
37 /* Preallocated Size of the index_to_pixmap array */
38 #define ALLOCATE_PROCESSES 1000
40 /*****************************************************************************
41 * Methods to synchronize process list *
42 *****************************************************************************/
45 gint
resource_sort_func ( GtkTreeModel
*model
,
53 gtk_tree_model_get(model
, it_a
, NAME_COLUMN
, &a_name
, -1);
55 gtk_tree_model_get(model
, it_b
, NAME_COLUMN
, &b_name
, -1);
57 return strcmp(a_name
, b_name
);
60 static guint
ru_numeric_hash_fct(gconstpointer key
)
62 ResourceUniqueNumeric
*ru
= (ResourceUniqueNumeric
*)key
;
63 int tmp
= (ru
->trace_num
<< 8) ^ ru
->id
;
65 return g_int_hash(&tmp
);
68 static gboolean
ru_numeric_equ_fct(gconstpointer a
, gconstpointer b
)
70 const ResourceUniqueNumeric
*pa
= (const ResourceUniqueNumeric
*)a
;
71 const ResourceUniqueNumeric
*pb
= (const ResourceUniqueNumeric
*)b
;
73 if(pa
->id
== pb
->id
&& pa
->trace_num
== pb
->trace_num
)
79 void destroy_hash_key(gpointer key
);
81 void destroy_hash_data(gpointer data
);
84 gboolean
scroll_event(GtkWidget
*widget
, GdkEventScroll
*event
, gpointer data
)
86 ControlFlowData
*control_flow_data
=
87 (ControlFlowData
*)g_object_get_data(
90 unsigned int cell_height
=
91 get_cell_height(GTK_TREE_VIEW(control_flow_data
->process_list
->process_list_widget
));
93 switch(event
->direction
) {
95 gtk_adjustment_set_value(control_flow_data
->v_adjust
,
96 gtk_adjustment_get_value(control_flow_data
->v_adjust
) - cell_height
);
99 gtk_adjustment_set_value(control_flow_data
->v_adjust
,
100 gtk_adjustment_get_value(control_flow_data
->v_adjust
) + cell_height
);
103 g_error("should only scroll up and down.");
108 void expand_event(GtkTreeView
*treeview
, GtkTreeIter
*iter
, GtkTreePath
*arg2
, gpointer user_data
)
110 ControlFlowData
*resourceview_data
=
111 (ControlFlowData
*)g_object_get_data(
113 "resourceview_data");
114 ProcessList
*process_list
= (ProcessList
*) user_data
;
115 HashedResourceData
*hrd
;
121 /* Determine which trace has been expanded */
122 model
= gtk_tree_view_get_model(treeview
);
124 /* mark each of the trace's resources invisible */
125 result
= gtk_tree_model_iter_children(model
, &child
, iter
);
127 /* for each child of the collapsed row */
130 gtk_tree_model_get(model
, &child
, DATA_COLUMN
, &hrd
, -1);
134 result
= gtk_tree_model_iter_next(model
, &child
);
137 update_index_to_pixmap(process_list
);
139 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
142 void collapse_event(GtkTreeView
*treeview
, GtkTreeIter
*iter
, GtkTreePath
*arg2
, gpointer user_data
)
144 ControlFlowData
*resourceview_data
=
145 (ControlFlowData
*)g_object_get_data(
147 "resourceview_data");
148 ProcessList
*process_list
= (ProcessList
*) user_data
;
149 HashedResourceData
*hrd
;
155 /* Determine which trace has been expanded */
156 model
= gtk_tree_view_get_model(treeview
);
158 /* mark each of the trace's resources invisible */
159 result
= gtk_tree_model_iter_children(model
, &child
, iter
);
161 /* for each child of the collapsed row */
165 gtk_tree_model_get(model
, &child
, NAME_COLUMN
, &name
, DATA_COLUMN
, &hrd
, -1);
169 result
= gtk_tree_model_iter_next(model
, &child
);
172 update_index_to_pixmap(process_list
);
174 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
177 static gboolean
update_index_to_pixmap_each (GtkTreeModel
*model
, GtkTreePath
*path
, GtkTreeIter
*iter
, UpdateIndexPixmapArg
*arg
)
179 guint array_index
= arg
->count
;
180 HashedResourceData
*hdata
;
183 gtk_tree_model_get(model
, iter
, NAME_COLUMN
, &name
, DATA_COLUMN
, &hdata
, -1);
185 g_assert(array_index
< arg
->process_list
->index_to_pixmap
->len
);
187 if(hdata
->hidden
== 0) {
189 (GdkPixmap
**)&g_ptr_array_index(arg
->process_list
->index_to_pixmap
, array_index
);
190 *pixmap
= hdata
->pixmap
;
198 void update_index_to_pixmap(ProcessList
*process_list
)
201 UpdateIndexPixmapArg arg
;
203 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
204 items
+= g_hash_table_size(process_list
->restypes
[i
].hash_table
);
207 /* we don't know the exact number of items there will be,
208 * so set an upper bound */
209 g_ptr_array_set_size(process_list
->index_to_pixmap
, items
);
212 arg
.process_list
= process_list
;
214 /* If cell_height is still 0, the only element in the tree is a temporary
215 * element that has no pixmap, see also processlist_construct() */
216 if (process_list
->cell_height
!= 0) {
217 gtk_tree_model_foreach(GTK_TREE_MODEL(process_list
->list_store
),
218 (GtkTreeModelForeachFunc
)update_index_to_pixmap_each
, &arg
);
221 /* now that we know the exact number of items, set it */
222 g_ptr_array_set_size(process_list
->index_to_pixmap
, arg
.count
);
226 static void update_pixmap_size_each(void *key
,
227 HashedResourceData
*value
,
230 GdkPixmap
*old_pixmap
= value
->pixmap
;
233 gdk_pixmap_new(old_pixmap
,
238 gdk_pixmap_unref(old_pixmap
);
242 void update_pixmap_size(ProcessList
*process_list
, guint width
)
245 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
246 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
247 (GHFunc
)update_pixmap_size_each
,
248 GUINT_TO_POINTER(width
));
253 typedef struct _CopyPixmap
{
257 gint xsrc
, ysrc
, xdest
, ydest
, width
, height
;
260 static void copy_pixmap_region_each(void *key
,
261 HashedResourceData
*value
,
264 GdkPixmap
*src
= cp
->src
;
265 GdkPixmap
*dest
= cp
->dest
;
268 dest
= value
->pixmap
;
272 gdk_draw_drawable (dest
,
276 cp
->xdest
, cp
->ydest
,
277 cp
->width
, cp
->height
);
280 void copy_pixmap_region(ProcessList
*process_list
, GdkDrawable
*dest
,
281 GdkGC
*gc
, GdkDrawable
*src
,
282 gint xsrc
, gint ysrc
,
283 gint xdest
, gint ydest
, gint width
, gint height
)
286 CopyPixmap cp
= { dest
, gc
, src
, xsrc
, ysrc
, xdest
, ydest
, width
, height
};
288 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
289 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
290 (GHFunc
)copy_pixmap_region_each
,
297 typedef struct _RectanglePixmap
{
299 gint x
, y
, width
, height
;
303 static void rectangle_pixmap_each(void *key
,
304 HashedResourceData
*value
,
308 rp
->height
= value
->height
;
310 gdk_draw_rectangle (value
->pixmap
,
314 rp
->width
, rp
->height
);
317 void rectangle_pixmap(ProcessList
*process_list
, GdkGC
*gc
,
318 gboolean filled
, gint x
, gint y
, gint width
, gint height
)
321 RectanglePixmap rp
= { filled
, x
, y
, width
, height
, gc
};
323 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
324 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
325 (GHFunc
)rectangle_pixmap_each
,
330 /* Renders each pixmaps into on big drawable */
331 void copy_pixmap_to_screen(ProcessList
*process_list
,
335 gint width
, gint height
)
337 if(process_list
->index_to_pixmap
->len
== 0) return;
338 guint cell_height
= process_list
->cell_height
;
341 gint begin
= floor(y
/(double)cell_height
);
342 gint end
= MIN(ceil((y
+height
)/(double)cell_height
),
343 process_list
->index_to_pixmap
->len
);
346 for(i
=begin
; i
<end
; i
++) {
347 g_assert(i
<process_list
->index_to_pixmap
->len
);
348 /* Render the pixmap to the screen */
350 //(GdkPixmap*)g_ptr_array_index(process_list->index_to_pixmap, i);
351 GDK_PIXMAP(g_ptr_array_index(process_list
->index_to_pixmap
, i
));
353 gdk_draw_drawable (dest
,
363 ProcessList
*processlist_construct(void)
365 GtkTreeViewColumn
*column
;
366 GtkCellRenderer
*renderer
;
368 ProcessList
* process_list
= g_new(ProcessList
,1);
370 process_list
->number_of_process
= 0;
372 process_list
->current_hash_data
= NULL
;
374 /* Create the Process list */
375 process_list
->list_store
= gtk_tree_store_new ( N_COLUMNS
, G_TYPE_STRING
, G_TYPE_POINTER
);
377 process_list
->process_list_widget
=
378 gtk_tree_view_new_with_model
379 (GTK_TREE_MODEL (process_list
->list_store
));
380 g_object_set(process_list
->process_list_widget
, "enable-tree-lines", TRUE
, NULL
);
382 g_object_unref (G_OBJECT (process_list
->list_store
));
384 gtk_tree_sortable_set_default_sort_func(
385 GTK_TREE_SORTABLE(process_list
->list_store
),
391 gtk_tree_sortable_set_sort_column_id(
392 GTK_TREE_SORTABLE(process_list
->list_store
),
393 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID
,
396 gtk_tree_view_set_headers_visible(
397 GTK_TREE_VIEW(process_list
->process_list_widget
), TRUE
);
399 /* Create a column, associating the "text" attribute of the
400 * cell_renderer to the first column of the model */
401 /* Columns alignment : 0.0 : Left 0.5 : Center 1.0 : Right */
402 renderer
= gtk_cell_renderer_text_new ();
403 process_list
->renderer
= renderer
;
405 g_signal_connect(process_list
->process_list_widget
, "row-expanded", G_CALLBACK(expand_event
), process_list
);
406 g_signal_connect(process_list
->process_list_widget
, "row-collapsed", G_CALLBACK(collapse_event
), process_list
);
408 /* Add a temporary row to the model to get the cell size when the first
409 * real process is added. */
412 path
= gtk_tree_path_new_first();
413 gtk_tree_model_get_iter (gtk_tree_view_get_model(GTK_TREE_VIEW(
414 process_list
->process_list_widget
)), &iter
, path
);
415 gtk_tree_store_append(process_list
->list_store
, &iter
, NULL
);
416 gtk_tree_path_free(path
);
418 process_list
->cell_height
= 0; // not ready to get size yet.
420 column
= gtk_tree_view_column_new_with_attributes ( "Resource",
425 gtk_tree_view_column_set_alignment (column
, 0.0);
426 gtk_tree_view_column_set_fixed_width (column
, 45);
427 gtk_tree_view_append_column (
428 GTK_TREE_VIEW (process_list
->process_list_widget
), column
);
430 process_list
->button
= column
->button
;
432 g_object_set_data_full(
433 G_OBJECT(process_list
->process_list_widget
),
436 (GDestroyNotify
)processlist_destroy
);
438 process_list
->index_to_pixmap
= g_ptr_array_sized_new(ALLOCATE_PROCESSES
);
440 process_list
->restypes
[RV_RESOURCE_MACHINE
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
441 process_list
->restypes
[RV_RESOURCE_CPU
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
442 process_list
->restypes
[RV_RESOURCE_IRQ
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
443 process_list
->restypes
[RV_RESOURCE_SOFT_IRQ
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
444 process_list
->restypes
[RV_RESOURCE_TRAP
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
445 process_list
->restypes
[RV_RESOURCE_BDEV
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
450 void processlist_destroy(ProcessList
*process_list
)
454 g_debug("processlist_destroy %p", process_list
);
456 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
457 g_hash_table_destroy(process_list
->restypes
[i
].hash_table
);
458 process_list
->restypes
[i
].hash_table
= NULL
;
460 g_ptr_array_free(process_list
->index_to_pixmap
, TRUE
);
462 g_free(process_list
);
463 g_debug("processlist_destroy end");
466 static gboolean
remove_hash_item(void *key
,
467 HashedResourceData
*hashed_process_data
,
468 ProcessList
*process_list
)
472 iter
= hashed_process_data
->y_iter
;
474 gtk_tree_store_remove (process_list
->list_store
, &iter
);
475 gdk_pixmap_unref(hashed_process_data
->pixmap
);
477 // TODO pmf: check this; might be needed
478 // if(likely(process_list->current_hash_data != NULL)) {
479 // if(likely(hashed_process_data ==
480 // process_list->current_hash_data[process_info->trace_num][process_info->cpu]))
481 // process_list->current_hash_data[process_info->trace_num][process_info->cpu] = NULL;
483 return TRUE
; /* remove the element from the hash table */
486 void processlist_clear(ProcessList
*process_list
)
490 g_info("processlist_clear %p", process_list
);
492 for(i
=RV_RESOURCE_COUNT
-1; i
>=0; i
--) {
493 g_hash_table_foreach_remove(process_list
->restypes
[i
].hash_table
,
494 (GHRFunc
)remove_hash_item
,
495 (gpointer
)process_list
);
497 process_list
->number_of_process
= 0;
498 update_index_to_pixmap(process_list
);
502 GtkWidget
*processlist_get_widget(ProcessList
*process_list
)
504 return process_list
->process_list_widget
;
508 void destroy_hash_key(gpointer key
)
513 void destroy_hash_data(gpointer data
)
518 GQuark
make_cpu_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
523 str
= g_strdup_printf("CPU%u", id
);
524 name
= g_quark_from_string(str
);
530 GQuark
make_irq_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
535 str
= g_strdup_printf("IRQ %u", id
);
536 name
= g_quark_from_string(str
);
542 GQuark
make_soft_irq_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
547 str
= g_strdup_printf("SOFTIRQ %u", id
);
548 name
= g_quark_from_string(str
);
554 GQuark
make_trap_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
559 str
= g_strdup_printf("Trap %u", id
);
560 name
= g_quark_from_string(str
);
566 GQuark
make_bdev_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
571 str
= g_strdup_printf("Block (%u,%u)", MAJOR(id
), MINOR(id
));
572 name
= g_quark_from_string(str
);
578 HashedResourceData
*resourcelist_obtain_machine(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
580 ResourceUniqueNumeric
*ru
= g_new(ResourceUniqueNumeric
, 1);
581 HashedResourceData
*data
= g_new(HashedResourceData
, 1);
583 /* Prepare hash key */
584 ru
->trace_num
= trace_num
;
587 /* Search within hash table */
588 GHashTable
*ht
= resourceview_data
->process_list
->restypes
[RV_RESOURCE_MACHINE
].hash_table
;
589 data
= g_hash_table_lookup(ht
, ru
);
591 /* If not found in hash table, add it */
595 data
= g_malloc(sizeof(HashedResourceData
));
596 /* Prepare hashed data */
597 data
->type
= RV_RESOURCE_MACHINE
;
599 data
->x
.over_used
= FALSE
;
600 data
->x
.over_marked
= FALSE
;
601 data
->x
.middle
= 0; // last
602 data
->x
.middle_used
= FALSE
;
603 data
->x
.middle_marked
= FALSE
;
605 data
->x
.under_used
= FALSE
;
606 data
->x
.under_marked
= FALSE
;
607 data
->next_good_time
= ltt_time_zero
;
610 if (resourceview_data
->process_list
->cell_height
== 0) {
615 path
= gtk_tree_path_new_first();
616 gtk_tree_model_get_iter(gtk_tree_view_get_model(GTK_TREE_VIEW(
617 resourceview_data
->process_list
->process_list_widget
)),
619 gtk_tree_view_get_background_area(GTK_TREE_VIEW(
620 resourceview_data
->process_list
->process_list_widget
),
622 gtk_tree_store_remove(resourceview_data
->process_list
->list_store
,
624 gtk_tree_path_free(path
);
625 resourceview_data
->process_list
->cell_height
= rect
.height
;
628 data
->height
= resourceview_data
->process_list
->cell_height
;
630 gdk_pixmap_new(resourceview_data
->drawing
->drawing_area
->window
,
631 resourceview_data
->drawing
->alloc_width
,
634 g_assert(data
->pixmap
);
636 gdk_draw_rectangle (data
->pixmap
,
637 resourceview_data
->drawing
->drawing_area
->style
->black_gc
,
640 resourceview_data
->drawing
->alloc_width
,
643 /* add to hash table */
644 g_hash_table_insert(ht
, ru
, data
);
645 resourceview_data
->process_list
->number_of_process
++; // TODO: check
647 /* add to process list */
650 str
= g_strdup_printf("Trace %u", id
);
651 name
= g_quark_from_string(str
);
655 gtk_tree_store_append(resourceview_data
->process_list
->list_store
, &data
->y_iter
, NULL
);
656 gtk_tree_store_set(resourceview_data
->process_list
->list_store
, &data
->y_iter
,
657 NAME_COLUMN
, g_quark_to_string(name
), DATA_COLUMN
, data
,
660 update_index_to_pixmap(resourceview_data
->process_list
);
662 int heightall
= data
->height
* resourceview_data
->process_list
->number_of_process
;
664 gtk_widget_set_size_request(resourceview_data
->drawing
->drawing_area
,
668 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
671 /* expand the newly added machine */
673 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
));
675 path
= gtk_tree_model_get_path(model
, &data
->y_iter
);
677 gtk_tree_view_expand_row(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
), path
, FALSE
);
679 gtk_tree_path_free(path
);
685 HashedResourceData
*resourcelist_obtain_generic(ControlFlowData
*resourceview_data
, gint res_type
, guint trace_num
, guint id
, GQuark (*make_name_func
)(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
))
687 ResourceUniqueNumeric
*ru
= g_new(ResourceUniqueNumeric
, 1);
688 HashedResourceData
*data
= g_new(HashedResourceData
, 1);
690 /* Prepare hash key */
691 ru
->ru
.type
= &(resourceview_data
->process_list
->restypes
[res_type
]);
692 ru
->trace_num
= trace_num
;
696 /* Search within hash table */
697 GHashTable
*ht
= resourceview_data
->process_list
->restypes
[res_type
].hash_table
;
698 data
= g_hash_table_lookup(ht
, ru
);
700 /* If not found in hash table, add it */
703 HashedResourceData
*parent
;
705 /* Find the parent machine */
706 parent
= resourcelist_obtain_machine(resourceview_data
, trace_num
, trace_num
);
708 /* Prepare hashed data */
709 data
= g_malloc(sizeof(HashedResourceData
));
711 data
->type
= res_type
;
713 data
->x
.over_used
= FALSE
;
714 data
->x
.over_marked
= FALSE
;
715 data
->x
.middle
= 0; // last
716 data
->x
.middle_used
= FALSE
;
717 data
->x
.middle_marked
= FALSE
;
719 data
->x
.under_used
= FALSE
;
720 data
->x
.under_marked
= FALSE
;
721 data
->next_good_time
= ltt_time_zero
;
723 if (resourceview_data
->process_list
->cell_height
== 0) {
728 path
= gtk_tree_path_new_first();
729 gtk_tree_model_get_iter(gtk_tree_view_get_model(GTK_TREE_VIEW(
730 resourceview_data
->process_list
->process_list_widget
)), &iter
,
732 gtk_tree_view_get_background_area(GTK_TREE_VIEW(
733 resourceview_data
->process_list
->process_list_widget
), path
,
735 gtk_tree_store_remove(resourceview_data
->process_list
->list_store
,
737 gtk_tree_path_free(path
);
738 resourceview_data
->process_list
->cell_height
= rect
.height
;
741 data
->height
= resourceview_data
->process_list
->cell_height
;
743 gdk_pixmap_new(resourceview_data
->drawing
->drawing_area
->window
,
744 resourceview_data
->drawing
->alloc_width
,
748 gdk_draw_rectangle (data
->pixmap
,
749 resourceview_data
->drawing
->drawing_area
->style
->black_gc
,
752 resourceview_data
->drawing
->alloc_width
,
755 /* add to hash table */
756 g_hash_table_insert(ht
, ru
, data
);
757 resourceview_data
->process_list
->number_of_process
++; // TODO: check
759 /* add to process list */
760 name
= make_name_func(resourceview_data
, trace_num
, id
);
762 gtk_tree_store_append(resourceview_data
->process_list
->list_store
, &data
->y_iter
, &parent
->y_iter
);
763 gtk_tree_store_set(resourceview_data
->process_list
->list_store
, &data
->y_iter
,
764 NAME_COLUMN
, g_quark_to_string(name
), DATA_COLUMN
, data
,
767 /* Determine if we should add it hidden or not */
769 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
));
770 GtkTreeIter parent_iter
;
772 gtk_tree_model_iter_parent(model
, &parent_iter
, &data
->y_iter
);
773 GtkTreePath
*path
= gtk_tree_model_get_path(model
, &parent_iter
);
774 data
->hidden
= gtk_tree_view_row_expanded(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
), path
)?0:1;
775 gtk_tree_path_free(path
);
779 update_index_to_pixmap(resourceview_data
->process_list
);
781 int heightall
= data
->height
* resourceview_data
->process_list
->number_of_process
;
783 gtk_widget_set_size_request(resourceview_data
->drawing
->drawing_area
,
787 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
793 HashedResourceData
*resourcelist_obtain_cpu(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
795 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_CPU
, trace_num
, id
, make_cpu_name
);
798 HashedResourceData
*resourcelist_obtain_irq(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
800 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_IRQ
, trace_num
, id
, make_irq_name
);
803 HashedResourceData
*resourcelist_obtain_soft_irq(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
805 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_SOFT_IRQ
, trace_num
, id
, make_soft_irq_name
);
808 HashedResourceData
*resourcelist_obtain_trap(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
810 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_TRAP
, trace_num
, id
, make_trap_name
);
813 HashedResourceData
*resourcelist_obtain_bdev(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
815 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_BDEV
, trace_num
, id
, make_bdev_name
);