From 0305fe774206ec12a98378be3cf891446b1b901c Mon Sep 17 00:00:00 2001 From: pmf Date: Tue, 27 Nov 2007 16:42:47 +0000 Subject: [PATCH] resourceview: add softirq resource git-svn-id: http://ltt.polymtl.ca/svn@2762 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/state.c | 76 +++++++- ltt/branches/poly/lttv/lttv/state.h | 8 +- .../lttv/modules/gui/resourceview/drawing.c | 42 +++-- .../lttv/modules/gui/resourceview/drawing.h | 8 + .../modules/gui/resourceview/eventhooks.c | 178 ++++++++++++++++++ .../modules/gui/resourceview/processlist.c | 18 ++ .../modules/gui/resourceview/processlist.h | 5 +- 7 files changed, 307 insertions(+), 28 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 7835b708..5bdfcebf 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -170,6 +170,7 @@ static GQuark LTTV_STATE_RESOURCE_CPUS, LTTV_STATE_RESOURCE_CPUS_COUNT, LTTV_STATE_RESOURCE_IRQS, + LTTV_STATE_RESOURCE_SOFT_IRQS, LTTV_STATE_RESOURCE_BLKDEVS; static void create_max_time(LttvTraceState *tcs); @@ -261,7 +262,7 @@ gboolean rettrue(gpointer key, gpointer value, gpointer user_data) static void restore_init_state(LttvTraceState *self) { - guint i, nb_cpus, nb_irqs; + guint i, nb_cpus, nb_irqs, nb_soft_irqs; //LttvTracefileState *tfcs; @@ -287,6 +288,7 @@ restore_init_state(LttvTraceState *self) nb_cpus = ltt_trace_get_num_cpu(self->parent.t); nb_irqs = self->nb_irqs; + nb_soft_irqs = self->nb_soft_irqs; /* Put the per cpu running_process to beginning state : process 0. */ for(i=0; i< nb_cpus; i++) { @@ -317,6 +319,11 @@ restore_init_state(LttvTraceState *self) g_array_remove_range(self->irq_states[i].mode_stack, 0, self->irq_states[i].mode_stack->len); } + /* reset softirq states */ + for(i=0; isoft_irq_states[i].running = 0; + } + /* reset bdev states */ g_hash_table_foreach(self->bdev_states, bdevstate_free_cb, NULL); //g_hash_table_steal_all(self->bdev_states); @@ -486,6 +493,10 @@ init(LttvTracesetState *self, LttvTraceset *ts) g_assert(tcs->irq_states[j].mode_stack != NULL); } + /* init soft irq stuff */ + /* the kernel has a statically fixed max of 32 softirqs */ + tcs->soft_irq_states = g_new(LttvSoftIRQState, tcs->nb_soft_irqs); + /* init bdev resource stuff */ tcs->bdev_states = g_hash_table_new(g_int_hash, g_int_equal); @@ -1194,6 +1205,25 @@ static void lttv_state_free_irq_states(LttvIRQState *states, guint n) g_free(states); } +static LttvSoftIRQState *lttv_state_copy_soft_irq_states(LttvSoftIRQState *states, guint n) +{ + guint i,j; + LttvSoftIRQState *retval; + + retval = g_malloc(n*sizeof(LttvSoftIRQState)); + + for(i=0; iirq_states, nb_irqs); } + /* save the soft irq state */ + nb_irqs = self->nb_irqs; + { + value = lttv_attribute_add(container, LTTV_STATE_RESOURCE_SOFT_IRQS, + LTTV_POINTER); + *(value.v_pointer) = lttv_state_copy_soft_irq_states(self->soft_irq_states, nb_irqs); + } + /* save the blkdev states */ value = lttv_attribute_add(container, LTTV_STATE_RESOURCE_BLKDEVS, LTTV_POINTER); @@ -1382,7 +1420,7 @@ static void state_save(LttvTraceState *self, LttvAttribute *container) static void state_restore(LttvTraceState *self, LttvAttribute *container) { - guint i, nb_tracefile, pid, nb_cpus, nb_irqs; + guint i, nb_tracefile, pid, nb_cpus, nb_irqs, nb_soft_irqs; LttvTracefileState *tfcs; @@ -1441,6 +1479,13 @@ static void state_restore(LttvTraceState *self, LttvAttribute *container) lttv_state_free_irq_states(self->irq_states, nb_irqs); self->irq_states = lttv_state_copy_irq_states(*(value.v_pointer), nb_irqs); + /* restore soft irq resource states */ + nb_soft_irqs = self->nb_soft_irqs; + type = lttv_attribute_get_by_name(container, LTTV_STATE_RESOURCE_SOFT_IRQS, &value); + g_assert(type == LTTV_POINTER); + lttv_state_free_soft_irq_states(self->soft_irq_states, nb_soft_irqs); + self->soft_irq_states = lttv_state_copy_soft_irq_states(*(value.v_pointer), nb_soft_irqs); + /* restore the blkdev states */ type = lttv_attribute_get_by_name(container, LTTV_STATE_RESOURCE_BLKDEVS, &value); g_assert(type == LTTV_POINTER); @@ -1755,9 +1800,10 @@ create_name_tables(LttvTraceState *tcs) } */ - name_tables->nb_softirqs = 256; - name_tables->soft_irq_names = g_new(GQuark, 256); - for(i = 0 ; i < 256 ; i++) { + /* the kernel is limited to 32 statically defined softirqs */ + name_tables->nb_softirqs = 32; + name_tables->soft_irq_names = g_new(GQuark, name_tables->nb_softirqs); + for(i = 0 ; i < name_tables->nb_softirqs ; i++) { g_string_printf(fe_name, "softirq %d", i); name_tables->soft_irq_names[i] = g_quark_from_string(fe_name->str); } @@ -1786,7 +1832,7 @@ get_name_tables(LttvTraceState *tcs) tcs->irq_names = name_tables->irq_names; tcs->soft_irq_names = name_tables->soft_irq_names; tcs->nb_irqs = name_tables->nb_irqs; - tcs->nb_softirqs = name_tables->nb_softirqs; + tcs->nb_soft_irqs = name_tables->nb_softirqs; } @@ -2301,12 +2347,17 @@ static gboolean irq_entry(void *hook_data, void *call_data) static gboolean soft_irq_exit(void *hook_data, void *call_data) { LttvTracefileState *s = (LttvTracefileState *)call_data; + LttvTraceState *ts = (LttvTraceState *)s->parent.t_context; + guint softirq = s->cpu_state->last_soft_irq; pop_state(s, LTTV_STATE_SOFT_IRQ); - return FALSE; -} + /* update softirq status */ + if(ts->soft_irq_states[softirq].running) + ts->soft_irq_states[softirq].running--; + return FALSE; +} static gboolean irq_exit(void *hook_data, void *call_data) { @@ -2327,6 +2378,7 @@ static gboolean irq_exit(void *hook_data, void *call_data) static gboolean soft_irq_entry(void *hook_data, void *call_data) { LttvTracefileState *s = (LttvTracefileState *)call_data; + LttvTraceState *ts = (LttvTraceState *)s->parent.t_context; LttEvent *e = ltt_tracefile_get_event(s->parent.tf); //guint8 ev_id = ltt_event_eventtype_id(e); LttvTraceHook *th = (LttvTraceHook *)hook_data; @@ -2334,7 +2386,7 @@ static gboolean soft_irq_entry(void *hook_data, void *call_data) LttvExecutionSubmode submode; guint64 softirq = ltt_event_get_long_unsigned(e, f); - guint64 nb_softirqs = ((LttvTraceState *)(s->parent.t_context))->nb_softirqs; + guint64 nb_softirqs = ((LttvTraceState *)(s->parent.t_context))->nb_soft_irqs; if(softirq < nb_softirqs) { submode = ((LttvTraceState *)(s->parent.t_context))->soft_irq_names[softirq]; @@ -2348,6 +2400,11 @@ static gboolean soft_irq_entry(void *hook_data, void *call_data) /* Do something with the info about being in user or system mode when int? */ push_state(s, LTTV_STATE_SOFT_IRQ, submode); + + /* update softirq status */ + s->cpu_state->last_soft_irq = softirq; + ts->soft_irq_states[softirq].running++; + return FALSE; } @@ -3864,6 +3921,7 @@ static void module_init() LTTV_STATE_RESOURCE_CPUS = g_quark_from_string("cpu resource states"); LTTV_STATE_RESOURCE_CPUS = g_quark_from_string("cpu count"); LTTV_STATE_RESOURCE_IRQS = g_quark_from_string("irq resource states"); + LTTV_STATE_RESOURCE_SOFT_IRQS = g_quark_from_string("soft irq resource states"); LTTV_STATE_RESOURCE_BLKDEVS = g_quark_from_string("blkdevs resource states"); diff --git a/ltt/branches/poly/lttv/lttv/state.h b/ltt/branches/poly/lttv/lttv/state.h index c3bdf138..c71049a8 100644 --- a/ltt/branches/poly/lttv/lttv/state.h +++ b/ltt/branches/poly/lttv/lttv/state.h @@ -309,12 +309,17 @@ GType lttv_traceset_state_get_type (void); typedef struct _LttvCPUState { GArray *mode_stack; guint last_irq; + guint last_soft_irq; } LttvCPUState; typedef struct _LttvIRQState { GArray *mode_stack; } LttvIRQState; +typedef struct _LttvSoftIRQState { + guint running; /* number of times it is currently running (on different processors) */ +} LttvSoftIRQState; + typedef struct _LttvBdevState { GArray *mode_stack; } LttvBdevState; @@ -334,7 +339,7 @@ struct _LttvTraceState { GQuark *trap_names; guint nb_traps; guint nb_irqs; - guint nb_softirqs; + guint nb_soft_irqs; GQuark *irq_names; GQuark *soft_irq_names; LttTime *max_time_state_recomputed_in_seek; @@ -344,6 +349,7 @@ struct _LttvTraceState { gboolean has_precomputed_states; LttvCPUState *cpu_states; /* state of each cpu */ LttvIRQState *irq_states; /* state of each irq handler */ + LttvSoftIRQState *soft_irq_states; /* state of each softirq */ GHashTable *bdev_states; /* state of the block devices */ }; diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c index d6a87e40..48e0fcfb 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.c @@ -99,6 +99,13 @@ GdkColor drawing_colors_irq[NUM_COLORS_IRQ] = { 0, 0xFFFF, 0x5E00, 0x0000 }, /* COL_IRQ_BUSY */ }; +GdkColor drawing_colors_soft_irq[NUM_COLORS_SOFT_IRQ] = +{ /* Pixel, R, G, B */ + { 0, 0x0000, 0x0000, 0x0000 }, /* COL_SOFT_IRQ_UNKNOWN */ + { 0, 0x0000, 0x0000, 0x0000 }, /* COL_SOFT_IRQ_IDLE */ + { 0, 0xFFFF, 0x9400, 0x9600 }, /* COL_SOFT_IRQ_BUSY */ +}; + GdkColor drawing_colors_bdev[NUM_COLORS_BDEV] = { /* Pixel, R, G, B */ { 0, 0x0000, 0x0000, 0x0000 }, /* COL_BDEV_UNKNOWN */ @@ -277,22 +284,22 @@ void drawing_data_request(Drawing_t *drawing, before_execmode_hook, events_request, &hooks); -// -// lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, -// LTT_EVENT_SOFT_IRQ_ENTRY, -// FIELD_ARRAY(LTT_FIELD_SOFT_IRQ_ID), -// before_execmode_hook, -// events_request, -// &hooks); -// -// lttv_trace_find_hook(ts->parent.t, -// LTT_FACILITY_KERNEL, -// LTT_EVENT_SOFT_IRQ_EXIT, -// NULL, -// before_execmode_hook, -// events_request, -// &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_FACILITY_KERNEL, + LTT_EVENT_SOFT_IRQ_ENTRY, + FIELD_ARRAY(LTT_FIELD_SOFT_IRQ_ID), + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_FACILITY_KERNEL, + LTT_EVENT_SOFT_IRQ_EXIT, + NULL, + before_execmode_hook, + events_request, + &hooks); lttv_trace_find_hook(ts->parent.t, @@ -1007,6 +1014,8 @@ Drawing_t *drawing_construct(ControlFlowData *control_flow_data) TRUE, success); gdk_colormap_alloc_colors(colormap, drawing_colors_irq, NUM_COLORS_IRQ, FALSE, TRUE, success); + gdk_colormap_alloc_colors(colormap, drawing_colors_soft_irq, NUM_COLORS_IRQ, FALSE, + TRUE, success); gdk_colormap_alloc_colors(colormap, drawing_colors_bdev, NUM_COLORS_BDEV, FALSE, TRUE, success); @@ -1067,6 +1076,7 @@ void drawing_destroy(Drawing_t *drawing) gdk_colormap_free_colors(colormap, drawing_colors, NUM_COLORS); gdk_colormap_free_colors(colormap, drawing_colors_cpu, NUM_COLORS_CPU); gdk_colormap_free_colors(colormap, drawing_colors_irq, NUM_COLORS_IRQ); + gdk_colormap_free_colors(colormap, drawing_colors_soft_irq, NUM_COLORS_IRQ); gdk_colormap_free_colors(colormap, drawing_colors_bdev, NUM_COLORS_BDEV); // Do not unref here, Drawing_t destroyed by it's widget. diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.h b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.h index f73b6c9d..434a39b2 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.h +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/drawing.h @@ -66,6 +66,13 @@ typedef enum _draw_color_irq { NUM_COLORS_IRQ } draw_color_irq; +typedef enum _draw_color_soft_irq { + COL_SOFT_IRQ_UNKNOWN, + COL_SOFT_IRQ_IDLE, + COL_SOFT_IRQ_BUSY, + NUM_COLORS_SOFT_IRQ +} draw_color_soft_irq; + typedef enum _draw_color_bdev { COL_BDEV_UNKNOWN, COL_BDEV_IDLE, @@ -77,6 +84,7 @@ typedef enum _draw_color_bdev { extern GdkColor drawing_colors[NUM_COLORS]; extern GdkColor drawing_colors_cpu[NUM_COLORS_CPU]; extern GdkColor drawing_colors_irq[NUM_COLORS_IRQ]; +extern GdkColor drawing_colors_soft_irq[NUM_COLORS_SOFT_IRQ]; extern GdkColor drawing_colors_bdev[NUM_COLORS_BDEV]; /* This part of the viewer does : diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c index 71d5553e..5da2a5c1 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/eventhooks.c @@ -307,6 +307,15 @@ static void irq_set_line_color(PropertiesLine *prop_line, LttvIRQState *s) } } +static void soft_irq_set_line_color(PropertiesLine *prop_line, LttvSoftIRQState *s) +{ + GQuark present_state; + if(s->running == 0) + prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_IDLE]; + else + prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_BUSY]; +} + static void bdev_set_line_color(PropertiesLine *prop_line, LttvBdevState *s) { GQuark present_state; @@ -632,6 +641,7 @@ int before_execmode_hook(void *hook_data, void *call_data) LttTime evtime = ltt_event_time(e); before_execmode_hook_irq(hook_data, call_data); + before_execmode_hook_soft_irq(hook_data, call_data); /* we are in a execmode, before the state update. We must draw the * items corresponding to the state before it changes : now is the right @@ -952,6 +962,172 @@ int before_execmode_hook_irq(void *hook_data, void *call_data) return 0; } +int before_execmode_hook_soft_irq(void *hook_data, void *call_data) +{ + LttvTraceHook *th = (LttvTraceHook*)hook_data; + EventsRequest *events_request = (EventsRequest*)th->hook_data; + ControlFlowData *resourceview_data = events_request->viewer_data; + + LttvTracefileContext *tfc = (LttvTracefileContext *)call_data; + + LttvTracefileState *tfs = (LttvTracefileState *)call_data; + LttvTraceState *ts = (LttvTraceState *)tfc->t_context; + + LttEvent *e; + e = ltt_tracefile_get_event(tfc->tf); + + LttTime evtime = ltt_event_time(e); + + LttTrace *trace = tfc->t_context->t; + + /* we are in a execmode, before the state update. We must draw the + * items corresponding to the state before it changes : now is the right + * time to do it. + */ + /* For the pid */ + + guint64 softirq; + guint cpu = tfs->cpu; + + guint16 ev_id_entry = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY))); + guint16 ev_id_exit = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT))); + if(ev_id_entry == e->event_id) { + softirq = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0)); + } + else if(ev_id_exit == e->event_id) { + softirq = ts->cpu_states[cpu].last_soft_irq; + } + else { + return 0; + } + + guint trace_num = ts->parent.index; + + /* Well, the process_out existed : we must get it in the process hash + * or add it, and draw its items. + */ + /* Add process to process list (if not present) */ + guint pl_height = 0; + HashedResourceData *hashed_process_data = NULL; + ProcessList *process_list = resourceview_data->process_list; + + hashed_process_data = resourcelist_obtain_soft_irq(resourceview_data, trace_num, softirq); + + /* Now, the process is in the state hash and our own process hash. + * We definitely can draw the items related to the ending state. + */ + + if(likely(ltt_time_compare(hashed_process_data->next_good_time, + evtime) > 0)) + { + if(unlikely(hashed_process_data->x.middle_marked == FALSE)) { + TimeWindow time_window = + lttvwindow_get_time_window(resourceview_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + Drawing_t *drawing = resourceview_data->drawing; + guint width = drawing->width; + guint x; + convert_time_to_pixels( + time_window, + evtime, + width, + &x); + + /* Draw collision indicator */ + gdk_gc_set_foreground(drawing->gc, &drawing_colors[COL_WHITE]); + gdk_draw_point(hashed_process_data->pixmap, + drawing->gc, + x, + COLLISION_POSITION(hashed_process_data->height)); + hashed_process_data->x.middle_marked = TRUE; + } + } + else { + TimeWindow time_window = + lttvwindow_get_time_window(resourceview_data->tab); + +#ifdef EXTRA_CHECK + if(ltt_time_compare(evtime, time_window.start_time) == -1 + || ltt_time_compare(evtime, time_window.end_time) == 1) + return; +#endif //EXTRA_CHECK + Drawing_t *drawing = resourceview_data->drawing; + guint width = drawing->width; + guint x; + + convert_time_to_pixels( + time_window, + evtime, + width, + &x); + + + /* Jump over draw if we are at the same x position */ + if(unlikely(x == hashed_process_data->x.middle && + hashed_process_data->x.middle_used)) + { + if(unlikely(hashed_process_data->x.middle_marked == FALSE)) { + /* Draw collision indicator */ + gdk_gc_set_foreground(drawing->gc, &drawing_colors[COL_WHITE]); + gdk_draw_point(hashed_process_data->pixmap, + drawing->gc, + x, + COLLISION_POSITION(hashed_process_data->height)); + hashed_process_data->x.middle_marked = TRUE; + } + /* jump */ + } + else { + + DrawContext draw_context; + /* Now create the drawing context that will be used to draw + * items related to the last state. */ + draw_context.drawable = hashed_process_data->pixmap; + draw_context.gc = drawing->gc; + draw_context.pango_layout = drawing->pango_layout; + draw_context.drawinfo.start.x = hashed_process_data->x.middle; + draw_context.drawinfo.end.x = x; + + draw_context.drawinfo.y.over = 1; + draw_context.drawinfo.y.middle = (hashed_process_data->height/2); + draw_context.drawinfo.y.under = hashed_process_data->height; + + draw_context.drawinfo.start.offset.over = 0; + draw_context.drawinfo.start.offset.middle = 0; + draw_context.drawinfo.start.offset.under = 0; + draw_context.drawinfo.end.offset.over = 0; + draw_context.drawinfo.end.offset.middle = 0; + draw_context.drawinfo.end.offset.under = 0; + + { + /* Draw the line */ + PropertiesLine prop_line; + prop_line.line_width = STATE_LINE_WIDTH; + prop_line.style = GDK_LINE_SOLID; + prop_line.y = MIDDLE; + soft_irq_set_line_color(&prop_line, &ts->soft_irq_states[softirq]); + draw_line((void*)&prop_line, (void*)&draw_context); + } + /* become the last x position */ + hashed_process_data->x.middle = x; + hashed_process_data->x.middle_used = TRUE; + hashed_process_data->x.middle_marked = FALSE; + + /* Calculate the next good time */ + convert_pixels_to_time(width, x+1, time_window, + &hashed_process_data->next_good_time); + } + } + + return 0; +} + + int before_bdev_event_hook(void *hook_data, void *call_data) { LttvTraceHook *th = (LttvTraceHook*)hook_data; @@ -1618,6 +1794,8 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) cpu_set_line_color(&prop_line, &ts->cpu_states[process_info->id]); else if(hashed_process_data->type == RV_RESOURCE_IRQ) irq_set_line_color(&prop_line, &ts->irq_states[process_info->id]); + else if(hashed_process_data->type == RV_RESOURCE_SOFT_IRQ) + soft_irq_set_line_color(&prop_line, &ts->soft_irq_states[process_info->id]); else if(hashed_process_data->type == RV_RESOURCE_BDEV) { gint devcode_gint = process_info->id; LttvBdevState *bdev = g_hash_table_lookup(ts->bdev_states, &devcode_gint); diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.c b/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.c index d96e544c..cb4c7a7a 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.c @@ -372,6 +372,7 @@ ProcessList *processlist_construct(void) process_list->restypes[RV_RESOURCE_MACHINE].hash_table = g_hash_table_new(ru_numeric_hash_fct, ru_numeric_equ_fct); process_list->restypes[RV_RESOURCE_CPU].hash_table = g_hash_table_new(ru_numeric_hash_fct, ru_numeric_equ_fct); process_list->restypes[RV_RESOURCE_IRQ].hash_table = g_hash_table_new(ru_numeric_hash_fct, ru_numeric_equ_fct); + process_list->restypes[RV_RESOURCE_SOFT_IRQ].hash_table = g_hash_table_new(ru_numeric_hash_fct, ru_numeric_equ_fct); process_list->restypes[RV_RESOURCE_BDEV].hash_table = g_hash_table_new(ru_numeric_hash_fct, ru_numeric_equ_fct); return process_list; @@ -469,6 +470,18 @@ GQuark make_irq_name(ControlFlowData *resourceview_data, guint trace_num, guint return name; } +GQuark make_soft_irq_name(ControlFlowData *resourceview_data, guint trace_num, guint id) +{ + GQuark name; + gchar *str; + + str = g_strdup_printf("SOFTIRQ %u", id); + name = g_quark_from_string(str); + g_free(str); + + return name; +} + GQuark make_bdev_name(ControlFlowData *resourceview_data, guint trace_num, guint id) { GQuark name; @@ -646,6 +659,11 @@ HashedResourceData *resourcelist_obtain_irq(ControlFlowData *resourceview_data, return resourcelist_obtain_generic(resourceview_data, RV_RESOURCE_IRQ, trace_num, id, make_irq_name); } +HashedResourceData *resourcelist_obtain_soft_irq(ControlFlowData *resourceview_data, guint trace_num, guint id) +{ + return resourcelist_obtain_generic(resourceview_data, RV_RESOURCE_SOFT_IRQ, trace_num, id, make_soft_irq_name); +} + HashedResourceData *resourcelist_obtain_bdev(ControlFlowData *resourceview_data, guint trace_num, guint id) { return resourcelist_obtain_generic(resourceview_data, RV_RESOURCE_BDEV, trace_num, id, make_bdev_name); diff --git a/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.h b/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.h index e8f5a849..24e27941 100644 --- a/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.h +++ b/ltt/branches/poly/lttv/modules/gui/resourceview/processlist.h @@ -44,8 +44,9 @@ #define RV_RESOURCE_MACHINE 0 #define RV_RESOURCE_CPU 1 #define RV_RESOURCE_IRQ 2 -#define RV_RESOURCE_BDEV 3 -#define RV_RESOURCE_COUNT 4 +#define RV_RESOURCE_SOFT_IRQ 3 +#define RV_RESOURCE_BDEV 4 +#define RV_RESOURCE_COUNT 5 /* Enumeration of the columns */ enum -- 2.34.1