git-svn-id: http://ltt.polymtl.ca/svn@178 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 14 Aug 2003 20:52:00 +0000 (20:52 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 14 Aug 2003 20:52:00 +0000 (20:52 +0000)
ltt/branches/poly/lttv/batchAnalysis.c
ltt/branches/poly/lttv/main.c
ltt/branches/poly/lttv/processTrace.c
ltt/branches/poly/lttv/state.c
ltt/branches/poly/lttv/textDump.c
ltt/branches/poly/lttv/traceset.c

index 72a642c4d5c0803e134c9829dcfedae1f0600cb1..0a7d9dd10b50af66ab65759539eae129b6abda64 100644 (file)
@@ -66,7 +66,7 @@ static gboolean process_traceset(void *hook_data, void *call_data)
 }
 
 
-void init(LttvModule *self, int argc, char **argv)
+G_MODULE_EXPORT void init(LttvModule *self, int argc, char **argv)
 {
   LttvAttributeValue value;
 
@@ -120,7 +120,7 @@ void init(LttvModule *self, int argc, char **argv)
 }
 
 
-void destroy()
+G_MODULE_EXPORT void destroy()
 {
   guint i, nb;
 
index 5fc5abb6cf4861642ba8af70bd5a9563022ddfe9..ad0c17f7ef9892dfdcf717fe1f3f459fc82e8ae7 100644 (file)
@@ -59,6 +59,9 @@ int main(int argc, char **argv) {
   g_mem_profile();
 #endif
 
+  //g_type_init();
+  g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS);
+
   attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL));
 
   before_options = lttv_hooks_new();
index 8723204c70bc58d1b7afa0f9b6da33acf7558205..94b5e2d90f37685abb688f70784f7e3ddcb3389b 100644 (file)
@@ -182,7 +182,7 @@ void lttv_traceset_context_add_hooks(LttvTracesetContext *self,
     lttv_hooks_add_list(tc->before, before_trace);
     lttv_hooks_add_list(tc->after, after_trace);
     nb_control = ltt_trace_control_tracefile_number(tc->t);
-    nb_per_cpu = ltt_trace_control_tracefile_number(tc->t);
+    nb_per_cpu = ltt_trace_per_cpu_tracefile_number(tc->t);
     nb_tracefile = nb_control + nb_per_cpu;
 
     for(j = 0 ; j < nb_tracefile ; j++) {
@@ -190,7 +190,7 @@ void lttv_traceset_context_add_hooks(LttvTracesetContext *self,
         tfc = tc->control_tracefiles[j];
       }
       else {
-        tfc = tc->per_cpu_tracefiles[j];
+        tfc = tc->per_cpu_tracefiles[j-nb_control];
       }
       lttv_hooks_add_list(tfc->check, check_tracefile);
       lttv_hooks_add_list(tfc->before, before_tracefile);
@@ -236,7 +236,7 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
     lttv_hooks_remove_list(tc->before, before_trace);
     lttv_hooks_remove_list(tc->after, after_trace);
     nb_control = ltt_trace_control_tracefile_number(tc->t);
-    nb_per_cpu = ltt_trace_control_tracefile_number(tc->t);
+    nb_per_cpu = ltt_trace_per_cpu_tracefile_number(tc->t);
     nb_tracefile = nb_control + nb_per_cpu;
 
     for(j = 0 ; j < nb_tracefile ; j++) {
@@ -244,7 +244,7 @@ void lttv_traceset_context_remove_hooks(LttvTracesetContext *self,
         tfc = tc->control_tracefiles[j];
       }
       else {
-        tfc = tc->per_cpu_tracefiles[j];
+        tfc = tc->per_cpu_tracefiles[j-nb_control];
       }
       lttv_hooks_remove_list(tfc->check, check_tracefile);
       lttv_hooks_remove_list(tfc->before, before_tracefile);
index 794a94f66d4d5a6a100f21b31b061d78359496d1..6f6dc9addf10c6d38371583e73074a5c1a8409aa 100644 (file)
@@ -591,6 +591,7 @@ lttv_state_add_event_hooks(LttvTracesetState *self)
                        "in", "out", "out_state", schedchange);
     g_array_append_val(hooks, hook_id);
 
+/* for now, in core facility there is no process_fork and process_exit event
     hook_id = find_hook(ts->parent.t, "core", "process_fork", 
                        "child_pid", NULL, NULL, process_fork);
     g_array_append_val(hooks, hook_id);
@@ -598,7 +599,7 @@ lttv_state_add_event_hooks(LttvTracesetState *self)
     hook_id = find_hook(ts->parent.t, "core", "process_exit", 
                        NULL, NULL, NULL, process_exit);
     g_array_append_val(hooks, hook_id);
-
+*/
 
     /* Add these hooks to each before_event_by_id hooks list */
 
index 646cb0812123ae9bc5d23baac04e3a465ac18515..acf06e4e3cf3f449904098b4759cb3a35d3ade1d 100644 (file)
@@ -59,7 +59,7 @@ void print_field(LttEvent *e, LttField *f, GString *s, gboolean field_names) {
 
     case LTT_ENUM:
       g_string_append_printf(s, " %s", ltt_enum_string_get(type,
-          event_get_unsigned(e,f)));
+          ltt_event_get_unsigned(e,f)));
       break;
 
     case LTT_ARRAY:
@@ -192,7 +192,8 @@ static int write_event_content(void *hook_data, void *call_data)
 }
 
 
-void init(int argc, char **argv)
+//void init(int argc, char **argv)
+G_MODULE_EXPORT void init(LttvModule *self, int argc, char **argv)
 {
   LttvAttributeValue value;
 
@@ -238,7 +239,7 @@ void init(int argc, char **argv)
 }
 
 
-void destroy()
+G_MODULE_EXPORT void destroy()
 {
   lttv_option_remove("output");
 
index cfa51abd737a32ee7aad24b3a8e52f107fb95565..85e33225bb95e252b2b85e6cfc6cc4f499e87b5b 100644 (file)
@@ -14,7 +14,7 @@ struct _LttvTraceset {
 };
 
 
-LttvTraceset *lttv_trace_set_new() 
+LttvTraceset *lttv_traceset_new() 
 {
   LttvTraceset *s;
 
@@ -22,6 +22,7 @@ LttvTraceset *lttv_trace_set_new()
   s->traces = g_ptr_array_new();
   s->attributes = g_ptr_array_new();
   s->a = g_object_new(LTTV_ATTRIBUTE_TYPE, NULL);
+  return s;
 }
 
 
This page took 0.027246 seconds and 4 git commands to generate.