X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Fstate.h;h=5f22b356f7240317dfb6f4db353a8ee3a0e23dc6;hb=598026baa39b5672b77d46e70a1434f975d52486;hp=68c6eb2569378d029691d92a71c3381f3bf043d5;hpb=f63ebe5196f36fcf40385d29cfc37288c4d70817;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/state.h b/ltt/branches/poly/lttv/lttv/state.h index 68c6eb25..5f22b356 100644 --- a/ltt/branches/poly/lttv/lttv/state.h +++ b/ltt/branches/poly/lttv/lttv/state.h @@ -198,6 +198,13 @@ extern LttvProcessType LTTV_STATE_USER_THREAD, LTTV_STATE_KERNEL_THREAD; +typedef GQuark LttvCPUMode; +extern LttvCPUMode + LTTV_CPU_UNKNOWN, + LTTV_CPU_IDLE, + LTTV_CPU_BUSY, + LTTV_CPU_IRQ; + typedef struct _LttvExecutionState { LttvExecutionMode t; LttvExecutionSubmode n; @@ -277,6 +284,11 @@ GType lttv_traceset_state_get_type (void); #define LTTV_IS_TRACE_STATE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), LTTV_TRACE_STATE_TYPE)) #define LTTV_TRACE_STATE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), LTTV_TRACE_STATE_TYPE, LttvTraceStateClass)) +typedef struct _LttvCPUState { + LttvCPUMode previous_state; + LttvCPUMode present_state; +} LttvCPUState; + struct _LttvTraceState { LttvTraceContext parent; @@ -300,6 +312,7 @@ struct _LttvTraceState { /* Array of per cpu running process */ LttvProcessState **running_process; gboolean has_precomputed_states; + LttvCPUState *cpu_states; /* state of each cpu */ }; struct _LttvTraceStateClass { @@ -332,10 +345,9 @@ int lttv_state_pop_state_cleanup(LttvProcessState *process, struct _LttvTracefileState { LttvTracefileContext parent; - //LttvProcessState *process; GQuark tracefile_name; - guint cpu; /* Current cpu of the tracefile */ -// guint saved_position; + guint cpu; /* Current cpu of the tracefile */ /* perhaps merge in cpu_state */ + LttvCPUState *cpu_state; /* cpu resource state */ }; struct _LttvTracefileStateClass {