From: compudj Date: Thu, 29 Jul 2004 21:16:55 +0000 (+0000) Subject: put back hook adder the way they were, new state hook adder and remover hook X-Git-Tag: v0.12.20~2841 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=58c88a41c3beff0c4c6ff7d856ab2355820d9f16;hp=1ce324c60d5e864674b80514297c97e1a7e2919d;p=lttv.git put back hook adder the way they were, new state hook adder and remover hook git-svn-id: http://ltt.polymtl.ca/svn@648 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index f13bd8db..e7f23f9c 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -1045,6 +1045,14 @@ gboolean process(void *hook_data, void *call_data) return 0; } +gint lttv_state_hook_add_event_hooks(void *hook_data, void *call_data) +{ + LttvTracesetState *tss = (LttvTracesetState*)(call_data); + + lttv_state_add_event_hooks(tss); + + return 0; +} void lttv_state_add_event_hooks(LttvTracesetState *self) { @@ -1123,6 +1131,14 @@ void lttv_state_add_event_hooks(LttvTracesetState *self) } } +gint lttv_state_hook_remove_event_hooks(void *hook_data, void *call_data) +{ + LttvTracesetState *tss = (LttvTracesetState*)(call_data); + + lttv_state_remove_event_hooks(tss); + + return 0; +} void lttv_state_remove_event_hooks(LttvTracesetState *self) { @@ -1253,8 +1269,6 @@ void lttv_state_save_add_event_hooks(LttvTracesetState *self) LttvTraceHook hook_start, hook_end; - lttv_state_add_event_hooks(self); - nb_trace = lttv_traceset_number(traceset); for(i = 0 ; i < nb_trace ; i++) { ts = (LttvTraceState *)self->parent.traces[i]; @@ -1318,8 +1332,6 @@ void lttv_state_save_remove_event_hooks(LttvTracesetState *self) tfs->parent.event_by_id, hook_end.id), hook_end.h, NULL); } } - - lttv_state_remove_event_hooks(self); } gint lttv_state_save_hook_remove_event_hooks(void *hook_data, void *call_data) diff --git a/ltt/branches/poly/lttv/lttv/state.h b/ltt/branches/poly/lttv/lttv/state.h index 988ee647..c6b69b54 100644 --- a/ltt/branches/poly/lttv/lttv/state.h +++ b/ltt/branches/poly/lttv/lttv/state.h @@ -60,8 +60,10 @@ typedef struct _LttvTraceStateClass LttvTraceStateClass; typedef struct _LttvTracefileState LttvTracefileState; typedef struct _LttvTracefileStateClass LttvTracefileStateClass; +gint lttv_state_hook_add_event_hooks(void *hook_data, void *call_data); void lttv_state_add_event_hooks(LttvTracesetState *self); +gint lttv_state_hook_remove_event_hooks(void *hook_data, void *call_data); void lttv_state_remove_event_hooks(LttvTracesetState *self); void lttv_state_save_add_event_hooks(LttvTracesetState *self); diff --git a/ltt/branches/poly/lttv/lttv/stats.c b/ltt/branches/poly/lttv/lttv/stats.c index 5bb91af6..b56eb36f 100644 --- a/ltt/branches/poly/lttv/lttv/stats.c +++ b/ltt/branches/poly/lttv/lttv/stats.c @@ -740,8 +740,6 @@ lttv_stats_add_event_hooks(LttvTracesetStats *self) LttvAttributeValue val; - lttv_state_add_event_hooks(&self->parent); - nb_trace = lttv_traceset_number(traceset); for(i = 0 ; i < nb_trace ; i++) { ts = (LttvTraceStats *)self->parent.parent.traces[i]; @@ -910,7 +908,6 @@ lttv_stats_remove_event_hooks(LttvTracesetStats *self) g_array_free(before_hooks, TRUE); g_array_free(after_hooks, TRUE); } - lttv_state_remove_event_hooks(&self->parent); }