put back hook adder the way they were, new state hook adder and remover hook
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 Jul 2004 21:16:55 +0000 (21:16 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 Jul 2004 21:16:55 +0000 (21:16 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@648 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h
ltt/branches/poly/lttv/lttv/stats.c

index f13bd8dba876b4cc960497c8de76405e92352d6a..e7f23f9cd04ca22c0384bc2f924c6606c12bbcb5 100644 (file)
@@ -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)
index 988ee647d1eee61e213ca48c56e3b8a1ad07803b..c6b69b546a8e3e1ac75b103ba2fcfe0d4e925d0f 100644 (file)
@@ -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);
index 5bb91af6e46169571360161adf13b80d44b70eea..b56eb36fda3a9107785a86fe42109cf9cd7d9b2b 100644 (file)
@@ -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);
 }
 
 
This page took 0.027235 seconds and 4 git commands to generate.