From d83f67398f1bf3c1f1372570c009071622626e4e Mon Sep 17 00:00:00 2001 From: yangxx Date: Thu, 14 Aug 2003 20:52:00 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@178 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/batchAnalysis.c | 4 ++-- ltt/branches/poly/lttv/main.c | 3 +++ ltt/branches/poly/lttv/processTrace.c | 8 ++++---- ltt/branches/poly/lttv/state.c | 3 ++- ltt/branches/poly/lttv/textDump.c | 7 ++++--- ltt/branches/poly/lttv/traceset.c | 3 ++- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ltt/branches/poly/lttv/batchAnalysis.c b/ltt/branches/poly/lttv/batchAnalysis.c index 72a642c4..0a7d9dd1 100644 --- a/ltt/branches/poly/lttv/batchAnalysis.c +++ b/ltt/branches/poly/lttv/batchAnalysis.c @@ -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; diff --git a/ltt/branches/poly/lttv/main.c b/ltt/branches/poly/lttv/main.c index 5fc5abb6..ad0c17f7 100644 --- a/ltt/branches/poly/lttv/main.c +++ b/ltt/branches/poly/lttv/main.c @@ -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(); diff --git a/ltt/branches/poly/lttv/processTrace.c b/ltt/branches/poly/lttv/processTrace.c index 8723204c..94b5e2d9 100644 --- a/ltt/branches/poly/lttv/processTrace.c +++ b/ltt/branches/poly/lttv/processTrace.c @@ -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); diff --git a/ltt/branches/poly/lttv/state.c b/ltt/branches/poly/lttv/state.c index 794a94f6..6f6dc9ad 100644 --- a/ltt/branches/poly/lttv/state.c +++ b/ltt/branches/poly/lttv/state.c @@ -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 */ diff --git a/ltt/branches/poly/lttv/textDump.c b/ltt/branches/poly/lttv/textDump.c index 646cb081..acf06e4e 100644 --- a/ltt/branches/poly/lttv/textDump.c +++ b/ltt/branches/poly/lttv/textDump.c @@ -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"); diff --git a/ltt/branches/poly/lttv/traceset.c b/ltt/branches/poly/lttv/traceset.c index cfa51abd..85e33225 100644 --- a/ltt/branches/poly/lttv/traceset.c +++ b/ltt/branches/poly/lttv/traceset.c @@ -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; } -- 2.34.1