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 Drawing_t
*drawing
= control_flow_data
->drawing
;
91 unsigned int cell_height
=
92 get_cell_height(GTK_TREE_VIEW(control_flow_data
->process_list
->process_list_widget
));
94 switch(event
->direction
) {
96 gtk_adjustment_set_value(control_flow_data
->v_adjust
,
97 gtk_adjustment_get_value(control_flow_data
->v_adjust
) - cell_height
);
100 gtk_adjustment_set_value(control_flow_data
->v_adjust
,
101 gtk_adjustment_get_value(control_flow_data
->v_adjust
) + cell_height
);
104 g_error("should only scroll up and down.");
109 void expand_event(GtkTreeView
*treeview
, GtkTreeIter
*iter
, GtkTreePath
*arg2
, gpointer user_data
)
111 ControlFlowData
*resourceview_data
=
112 (ControlFlowData
*)g_object_get_data(
114 "resourceview_data");
115 ProcessList
*process_list
= (ProcessList
*) user_data
;
117 HashedResourceData
*hrd
;
123 /* Determine which trace has been expanded */
124 model
= gtk_tree_view_get_model(treeview
);
126 /* mark each of the trace's resources invisible */
127 result
= gtk_tree_model_iter_children(model
, &child
, iter
);
129 /* for each child of the collapsed row */
132 gtk_tree_model_get(model
, &child
, DATA_COLUMN
, &hrd
, -1);
136 result
= gtk_tree_model_iter_next(model
, &child
);
139 update_index_to_pixmap(process_list
);
141 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
144 void collapse_event(GtkTreeView
*treeview
, GtkTreeIter
*iter
, GtkTreePath
*arg2
, gpointer user_data
)
146 ControlFlowData
*resourceview_data
=
147 (ControlFlowData
*)g_object_get_data(
149 "resourceview_data");
150 ProcessList
*process_list
= (ProcessList
*) user_data
;
152 HashedResourceData
*hrd
;
158 /* Determine which trace has been expanded */
159 model
= gtk_tree_view_get_model(treeview
);
161 /* mark each of the trace's resources invisible */
162 result
= gtk_tree_model_iter_children(model
, &child
, iter
);
164 /* for each child of the collapsed row */
168 gtk_tree_model_get(model
, &child
, NAME_COLUMN
, &name
, DATA_COLUMN
, &hrd
, -1);
172 result
= gtk_tree_model_iter_next(model
, &child
);
175 update_index_to_pixmap(process_list
);
177 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
180 static gboolean
update_index_to_pixmap_each (GtkTreeModel
*model
, GtkTreePath
*path
, GtkTreeIter
*iter
, UpdateIndexPixmapArg
*arg
)
182 guint array_index
= arg
->count
;
183 HashedResourceData
*hdata
;
186 gtk_tree_model_get(model
, iter
, NAME_COLUMN
, &name
, DATA_COLUMN
, &hdata
, -1);
188 g_assert(array_index
< arg
->process_list
->index_to_pixmap
->len
);
190 if(hdata
->hidden
== 0) {
192 (GdkPixmap
**)&g_ptr_array_index(arg
->process_list
->index_to_pixmap
, array_index
);
193 *pixmap
= hdata
->pixmap
;
201 void update_index_to_pixmap(ProcessList
*process_list
)
204 UpdateIndexPixmapArg arg
;
206 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
207 items
+= g_hash_table_size(process_list
->restypes
[i
].hash_table
);
210 /* we don't know the exact number of items there will be,
211 * so set an upper bound */
212 g_ptr_array_set_size(process_list
->index_to_pixmap
, items
);
215 arg
.process_list
= process_list
;
217 /* If cell_height is still 0, the only element in the tree is a temporary
218 * element that has no pixmap, see also processlist_construct() */
219 if (process_list
->cell_height
!= 0) {
220 gtk_tree_model_foreach(GTK_TREE_MODEL(process_list
->list_store
),
221 (GtkTreeModelForeachFunc
)update_index_to_pixmap_each
, &arg
);
224 /* now that we know the exact number of items, set it */
225 g_ptr_array_set_size(process_list
->index_to_pixmap
, arg
.count
);
229 static void update_pixmap_size_each(void *key
,
230 HashedResourceData
*value
,
233 GdkPixmap
*old_pixmap
= value
->pixmap
;
236 gdk_pixmap_new(old_pixmap
,
241 gdk_pixmap_unref(old_pixmap
);
245 void update_pixmap_size(ProcessList
*process_list
, guint width
)
248 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
249 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
250 (GHFunc
)update_pixmap_size_each
,
256 typedef struct _CopyPixmap
{
260 gint xsrc
, ysrc
, xdest
, ydest
, width
, height
;
263 static void copy_pixmap_region_each(void *key
,
264 HashedResourceData
*value
,
267 GdkPixmap
*src
= cp
->src
;
268 GdkPixmap
*dest
= cp
->dest
;
271 dest
= value
->pixmap
;
275 gdk_draw_drawable (dest
,
279 cp
->xdest
, cp
->ydest
,
280 cp
->width
, cp
->height
);
283 void copy_pixmap_region(ProcessList
*process_list
, GdkDrawable
*dest
,
284 GdkGC
*gc
, GdkDrawable
*src
,
285 gint xsrc
, gint ysrc
,
286 gint xdest
, gint ydest
, gint width
, gint height
)
289 CopyPixmap cp
= { dest
, gc
, src
, xsrc
, ysrc
, xdest
, ydest
, width
, height
};
291 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
292 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
293 (GHFunc
)copy_pixmap_region_each
,
300 typedef struct _RectanglePixmap
{
302 gint x
, y
, width
, height
;
306 static void rectangle_pixmap_each(void *key
,
307 HashedResourceData
*value
,
311 rp
->height
= value
->height
;
313 gdk_draw_rectangle (value
->pixmap
,
317 rp
->width
, rp
->height
);
320 void rectangle_pixmap(ProcessList
*process_list
, GdkGC
*gc
,
321 gboolean filled
, gint x
, gint y
, gint width
, gint height
)
324 RectanglePixmap rp
= { filled
, x
, y
, width
, height
, gc
};
326 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
327 g_hash_table_foreach(process_list
->restypes
[i
].hash_table
,
328 (GHFunc
)rectangle_pixmap_each
,
333 /* Renders each pixmaps into on big drawable */
334 void copy_pixmap_to_screen(ProcessList
*process_list
,
338 gint width
, gint height
)
340 if(process_list
->index_to_pixmap
->len
== 0) return;
341 guint cell_height
= process_list
->cell_height
;
344 gint begin
= floor(y
/(double)cell_height
);
345 gint end
= MIN(ceil((y
+height
)/(double)cell_height
),
346 process_list
->index_to_pixmap
->len
);
349 for(i
=begin
; i
<end
; i
++) {
350 g_assert(i
<process_list
->index_to_pixmap
->len
);
351 /* Render the pixmap to the screen */
353 //(GdkPixmap*)g_ptr_array_index(process_list->index_to_pixmap, i);
354 GDK_PIXMAP(g_ptr_array_index(process_list
->index_to_pixmap
, i
));
356 gdk_draw_drawable (dest
,
366 ProcessList
*processlist_construct(void)
368 GtkTreeViewColumn
*column
;
369 GtkCellRenderer
*renderer
;
371 ProcessList
* process_list
= g_new(ProcessList
,1);
373 process_list
->number_of_process
= 0;
375 process_list
->current_hash_data
= NULL
;
377 /* Create the Process list */
378 process_list
->list_store
= gtk_tree_store_new ( N_COLUMNS
, G_TYPE_STRING
, G_TYPE_POINTER
);
380 process_list
->process_list_widget
=
381 gtk_tree_view_new_with_model
382 (GTK_TREE_MODEL (process_list
->list_store
));
383 g_object_set(process_list
->process_list_widget
, "enable-tree-lines", TRUE
, NULL
);
385 g_object_unref (G_OBJECT (process_list
->list_store
));
387 gtk_tree_sortable_set_default_sort_func(
388 GTK_TREE_SORTABLE(process_list
->list_store
),
394 gtk_tree_sortable_set_sort_column_id(
395 GTK_TREE_SORTABLE(process_list
->list_store
),
396 GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID
,
399 gtk_tree_view_set_headers_visible(
400 GTK_TREE_VIEW(process_list
->process_list_widget
), TRUE
);
402 /* Create a column, associating the "text" attribute of the
403 * cell_renderer to the first column of the model */
404 /* Columns alignment : 0.0 : Left 0.5 : Center 1.0 : Right */
405 renderer
= gtk_cell_renderer_text_new ();
406 process_list
->renderer
= renderer
;
408 g_signal_connect(process_list
->process_list_widget
, "row-expanded", G_CALLBACK(expand_event
), process_list
);
409 g_signal_connect(process_list
->process_list_widget
, "row-collapsed", G_CALLBACK(collapse_event
), process_list
);
411 /* Add a temporary row to the model to get the cell size when the first
412 * real process is added. */
415 path
= gtk_tree_path_new_first();
416 gtk_tree_model_get_iter (gtk_tree_view_get_model(GTK_TREE_VIEW(
417 process_list
->process_list_widget
)), &iter
, path
);
418 gtk_tree_store_append(process_list
->list_store
, &iter
, NULL
);
419 gtk_tree_path_free(path
);
421 process_list
->cell_height
= 0; // not ready to get size yet.
423 column
= gtk_tree_view_column_new_with_attributes ( "Resource",
428 gtk_tree_view_column_set_alignment (column
, 0.0);
429 gtk_tree_view_column_set_fixed_width (column
, 45);
430 gtk_tree_view_append_column (
431 GTK_TREE_VIEW (process_list
->process_list_widget
), column
);
433 process_list
->button
= column
->button
;
435 g_object_set_data_full(
436 G_OBJECT(process_list
->process_list_widget
),
439 (GDestroyNotify
)processlist_destroy
);
441 process_list
->index_to_pixmap
= g_ptr_array_sized_new(ALLOCATE_PROCESSES
);
443 process_list
->restypes
[RV_RESOURCE_MACHINE
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
444 process_list
->restypes
[RV_RESOURCE_CPU
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
445 process_list
->restypes
[RV_RESOURCE_IRQ
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
446 process_list
->restypes
[RV_RESOURCE_SOFT_IRQ
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
447 process_list
->restypes
[RV_RESOURCE_TRAP
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
448 process_list
->restypes
[RV_RESOURCE_BDEV
].hash_table
= g_hash_table_new(ru_numeric_hash_fct
, ru_numeric_equ_fct
);
453 void processlist_destroy(ProcessList
*process_list
)
457 g_debug("processlist_destroy %p", process_list
);
459 for(i
=0; i
<RV_RESOURCE_COUNT
; i
++) {
460 g_hash_table_destroy(process_list
->restypes
[i
].hash_table
);
461 process_list
->restypes
[i
].hash_table
= NULL
;
463 g_ptr_array_free(process_list
->index_to_pixmap
, TRUE
);
465 g_free(process_list
);
466 g_debug("processlist_destroy end");
469 static gboolean
remove_hash_item(void *key
,
470 HashedResourceData
*hashed_process_data
,
471 ProcessList
*process_list
)
475 iter
= hashed_process_data
->y_iter
;
477 gtk_tree_store_remove (process_list
->list_store
, &iter
);
478 gdk_pixmap_unref(hashed_process_data
->pixmap
);
480 // TODO pmf: check this; might be needed
481 // if(likely(process_list->current_hash_data != NULL)) {
482 // if(likely(hashed_process_data ==
483 // process_list->current_hash_data[process_info->trace_num][process_info->cpu]))
484 // process_list->current_hash_data[process_info->trace_num][process_info->cpu] = NULL;
486 return TRUE
; /* remove the element from the hash table */
489 void processlist_clear(ProcessList
*process_list
)
493 g_info("processlist_clear %p", process_list
);
495 for(i
=RV_RESOURCE_COUNT
-1; i
>=0; i
--) {
496 g_hash_table_foreach_remove(process_list
->restypes
[i
].hash_table
,
497 (GHRFunc
)remove_hash_item
,
498 (gpointer
)process_list
);
500 process_list
->number_of_process
= 0;
501 update_index_to_pixmap(process_list
);
505 GtkWidget
*processlist_get_widget(ProcessList
*process_list
)
507 return process_list
->process_list_widget
;
511 void destroy_hash_key(gpointer key
)
516 void destroy_hash_data(gpointer data
)
521 GQuark
make_cpu_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
526 str
= g_strdup_printf("CPU%u", id
);
527 name
= g_quark_from_string(str
);
533 GQuark
make_irq_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
538 str
= g_strdup_printf("IRQ %u", id
);
539 name
= g_quark_from_string(str
);
545 GQuark
make_soft_irq_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
550 str
= g_strdup_printf("SOFTIRQ %u", id
);
551 name
= g_quark_from_string(str
);
557 GQuark
make_trap_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
562 str
= g_strdup_printf("Trap %u", id
);
563 name
= g_quark_from_string(str
);
569 GQuark
make_bdev_name(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
574 str
= g_strdup_printf("Block (%u,%u)", MAJOR(id
), MINOR(id
));
575 name
= g_quark_from_string(str
);
581 HashedResourceData
*resourcelist_obtain_machine(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
583 ResourceUniqueNumeric
*ru
= g_new(ResourceUniqueNumeric
, 1);
584 HashedResourceData
*data
= g_new(HashedResourceData
, 1);
586 /* Prepare hash key */
587 ru
->trace_num
= trace_num
;
590 /* Search within hash table */
591 GHashTable
*ht
= resourceview_data
->process_list
->restypes
[RV_RESOURCE_MACHINE
].hash_table
;
592 data
= g_hash_table_lookup(ht
, ru
);
594 /* If not found in hash table, add it */
598 data
= g_malloc(sizeof(HashedResourceData
));
599 /* Prepare hashed data */
600 data
->type
= RV_RESOURCE_MACHINE
;
602 data
->x
.over_used
= FALSE
;
603 data
->x
.over_marked
= FALSE
;
604 data
->x
.middle
= 0; // last
605 data
->x
.middle_used
= FALSE
;
606 data
->x
.middle_marked
= FALSE
;
608 data
->x
.under_used
= FALSE
;
609 data
->x
.under_marked
= FALSE
;
610 data
->next_good_time
= ltt_time_zero
;
613 if (resourceview_data
->process_list
->cell_height
== 0) {
618 path
= gtk_tree_path_new_first();
619 gtk_tree_model_get_iter(gtk_tree_view_get_model(GTK_TREE_VIEW(
620 resourceview_data
->process_list
->process_list_widget
)),
622 gtk_tree_view_get_background_area(GTK_TREE_VIEW(
623 resourceview_data
->process_list
->process_list_widget
),
625 gtk_tree_store_remove(resourceview_data
->process_list
->list_store
,
627 gtk_tree_path_free(path
);
628 resourceview_data
->process_list
->cell_height
= rect
.height
;
631 data
->height
= resourceview_data
->process_list
->cell_height
;
633 gdk_pixmap_new(resourceview_data
->drawing
->drawing_area
->window
,
634 resourceview_data
->drawing
->alloc_width
,
637 g_assert(data
->pixmap
);
639 gdk_draw_rectangle (data
->pixmap
,
640 resourceview_data
->drawing
->drawing_area
->style
->black_gc
,
643 resourceview_data
->drawing
->alloc_width
,
646 /* add to hash table */
647 g_hash_table_insert(ht
, ru
, data
);
648 resourceview_data
->process_list
->number_of_process
++; // TODO: check
650 /* add to process list */
653 str
= g_strdup_printf("Trace %u", id
);
654 name
= g_quark_from_string(str
);
658 gtk_tree_store_append(resourceview_data
->process_list
->list_store
, &data
->y_iter
, NULL
);
659 gtk_tree_store_set(resourceview_data
->process_list
->list_store
, &data
->y_iter
,
660 NAME_COLUMN
, g_quark_to_string(name
), DATA_COLUMN
, data
,
663 update_index_to_pixmap(resourceview_data
->process_list
);
665 int heightall
= data
->height
* resourceview_data
->process_list
->number_of_process
;
667 gtk_widget_set_size_request(resourceview_data
->drawing
->drawing_area
,
671 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
674 /* expand the newly added machine */
676 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
));
678 path
= gtk_tree_model_get_path(model
, &data
->y_iter
);
680 gtk_tree_view_expand_row(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
), path
, FALSE
);
682 gtk_tree_path_free(path
);
688 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
))
690 ResourceUniqueNumeric
*ru
= g_new(ResourceUniqueNumeric
, 1);
691 HashedResourceData
*data
= g_new(HashedResourceData
, 1);
693 /* Prepare hash key */
694 ru
->ru
.type
= &(resourceview_data
->process_list
->restypes
[res_type
]);
695 ru
->trace_num
= trace_num
;
698 /* Search within hash table */
699 GHashTable
*ht
= resourceview_data
->process_list
->restypes
[res_type
].hash_table
;
700 data
= g_hash_table_lookup(ht
, ru
);
702 /* If not found in hash table, add it */
705 HashedResourceData
*parent
;
707 /* Find the parent machine */
708 parent
= resourcelist_obtain_machine(resourceview_data
, trace_num
, trace_num
);
710 /* Prepare hashed data */
711 data
= g_malloc(sizeof(HashedResourceData
));
713 data
->type
= res_type
;
715 data
->x
.over_used
= FALSE
;
716 data
->x
.over_marked
= FALSE
;
717 data
->x
.middle
= 0; // last
718 data
->x
.middle_used
= FALSE
;
719 data
->x
.middle_marked
= FALSE
;
721 data
->x
.under_used
= FALSE
;
722 data
->x
.under_marked
= FALSE
;
723 data
->next_good_time
= ltt_time_zero
;
725 if (resourceview_data
->process_list
->cell_height
== 0) {
730 path
= gtk_tree_path_new_first();
731 gtk_tree_model_get_iter(gtk_tree_view_get_model(GTK_TREE_VIEW(
732 resourceview_data
->process_list
->process_list_widget
)), &iter
,
734 gtk_tree_view_get_background_area(GTK_TREE_VIEW(
735 resourceview_data
->process_list
->process_list_widget
), path
,
737 gtk_tree_store_remove(resourceview_data
->process_list
->list_store
,
739 gtk_tree_path_free(path
);
740 resourceview_data
->process_list
->cell_height
= rect
.height
;
743 data
->height
= resourceview_data
->process_list
->cell_height
;
745 gdk_pixmap_new(resourceview_data
->drawing
->drawing_area
->window
,
746 resourceview_data
->drawing
->alloc_width
,
750 gdk_draw_rectangle (data
->pixmap
,
751 resourceview_data
->drawing
->drawing_area
->style
->black_gc
,
754 resourceview_data
->drawing
->alloc_width
,
757 /* add to hash table */
758 g_hash_table_insert(ht
, ru
, data
);
759 resourceview_data
->process_list
->number_of_process
++; // TODO: check
761 /* add to process list */
762 name
= make_name_func(resourceview_data
, trace_num
, id
);
764 gtk_tree_store_append(resourceview_data
->process_list
->list_store
, &data
->y_iter
, &parent
->y_iter
);
765 gtk_tree_store_set(resourceview_data
->process_list
->list_store
, &data
->y_iter
,
766 NAME_COLUMN
, g_quark_to_string(name
), DATA_COLUMN
, data
,
769 /* Determine if we should add it hidden or not */
772 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
));
773 GtkTreeIter parent_iter
;
775 result
= gtk_tree_model_iter_parent(model
, &parent_iter
, &data
->y_iter
);
776 GtkTreePath
*path
= gtk_tree_model_get_path(model
, &parent_iter
);
777 data
->hidden
= gtk_tree_view_row_expanded(GTK_TREE_VIEW(resourceview_data
->process_list
->process_list_widget
), path
)?0:1;
778 gtk_tree_path_free(path
);
782 update_index_to_pixmap(resourceview_data
->process_list
);
784 int heightall
= data
->height
* resourceview_data
->process_list
->number_of_process
;
786 gtk_widget_set_size_request(resourceview_data
->drawing
->drawing_area
,
790 gtk_widget_queue_draw(resourceview_data
->drawing
->drawing_area
);
796 HashedResourceData
*resourcelist_obtain_cpu(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
798 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_CPU
, trace_num
, id
, make_cpu_name
);
801 HashedResourceData
*resourcelist_obtain_irq(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
803 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_IRQ
, trace_num
, id
, make_irq_name
);
806 HashedResourceData
*resourcelist_obtain_soft_irq(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
808 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_SOFT_IRQ
, trace_num
, id
, make_soft_irq_name
);
811 HashedResourceData
*resourcelist_obtain_trap(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
813 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_TRAP
, trace_num
, id
, make_trap_name
);
816 HashedResourceData
*resourcelist_obtain_bdev(ControlFlowData
*resourceview_data
, guint trace_num
, guint id
)
818 return resourcelist_obtain_generic(resourceview_data
, RV_RESOURCE_BDEV
, trace_num
, id
, make_bdev_name
);