From 996acd9220aa2a8e2bb502cc95d140eb44c322de Mon Sep 17 00:00:00 2001 From: dagenais Date: Tue, 5 Aug 2003 21:08:54 +0000 Subject: [PATCH] Correct a few syntax errors git-svn-id: http://ltt.polymtl.ca/svn@167 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/include/lttv/Makefile.am | 3 ++- ltt/branches/poly/include/lttv/hook.h | 2 +- ltt/branches/poly/include/lttv/iattribute.h | 4 ++-- ltt/branches/poly/include/lttv/lttv.h | 4 ++-- ltt/branches/poly/include/lttv/module.h | 2 +- ltt/branches/poly/include/lttv/state.h | 6 +++--- ltt/branches/poly/lttv/Makefile.am | 16 ++++++++++------ ltt/branches/poly/lttv/batchAnalysis.c | 3 ++- ltt/branches/poly/lttv/module.c | 2 +- ltt/branches/poly/lttv/textDump.c | 12 ++++++++++-- 10 files changed, 34 insertions(+), 20 deletions(-) diff --git a/ltt/branches/poly/include/lttv/Makefile.am b/ltt/branches/poly/include/lttv/Makefile.am index a9fedc2a..f5efe2c1 100644 --- a/ltt/branches/poly/include/lttv/Makefile.am +++ b/ltt/branches/poly/include/lttv/Makefile.am @@ -1 +1,2 @@ -lttvinclude_HEADERS = hook.h module.h traceWindow.h +lttvinclude_HEADERS = hook.h module.h option.h lttv.h iattribute.h \ + attribute.h processTrace.h state.h traceset.h traceWindow.h diff --git a/ltt/branches/poly/include/lttv/hook.h b/ltt/branches/poly/include/lttv/hook.h index 2fd17e1a..677bb892 100644 --- a/ltt/branches/poly/include/lttv/hook.h +++ b/ltt/branches/poly/include/lttv/hook.h @@ -12,7 +12,7 @@ typedef gboolean (*LttvHook)(void *hook_data, void *call_data); /* A list of hooks allows registering hooks to be called later. */ -typedef struct _LttvHooks LttvHooks; +typedef GArray LttvHooks; /* Create and destroy a list of hooks */ diff --git a/ltt/branches/poly/include/lttv/iattribute.h b/ltt/branches/poly/include/lttv/iattribute.h index e9f853cf..944092a2 100644 --- a/ltt/branches/poly/include/lttv/iattribute.h +++ b/ltt/branches/poly/include/lttv/iattribute.h @@ -26,10 +26,10 @@ typedef union LttvAttributeValue { unsigned long *v_ulong; float *v_float; double *v_double; - timespec *v_timespec; + LttvTime *v_time; gpointer *v_pointer; char **v_string; - gobject **v_gobject; + GObject **v_gobject; } LttvAttributeValue; diff --git a/ltt/branches/poly/include/lttv/lttv.h b/ltt/branches/poly/include/lttv/lttv.h index 4f1fda61..77dac57e 100644 --- a/ltt/branches/poly/include/lttv/lttv.h +++ b/ltt/branches/poly/include/lttv/lttv.h @@ -1,12 +1,12 @@ #ifndef LTTV_H #define LTTV_H -#include "attribute.h" +#include /* The modules in the visualizer communicate with the main module and with each other through attributes. There is a global set of attributes */ -LttvAttributes *lttv_global_attributes(); +LttvAttribute *lttv_global_attributes(); /* A number of global attributes are initialized before modules are diff --git a/ltt/branches/poly/include/lttv/module.h b/ltt/branches/poly/include/lttv/module.h index 6a0a45fb..2649902c 100644 --- a/ltt/branches/poly/include/lttv/module.h +++ b/ltt/branches/poly/include/lttv/module.h @@ -24,7 +24,7 @@ typedef struct _LttvModule LttvModule; -typedef void (*LttvModuleInit)(int argc, char **argv); +typedef void (*LttvModuleInit)(LttvModule *self, int argc, char **argv); typedef void (*LttvModuleDestroy)(); diff --git a/ltt/branches/poly/include/lttv/state.h b/ltt/branches/poly/include/lttv/state.h index 4a4664d4..d7b265a3 100644 --- a/ltt/branches/poly/include/lttv/state.h +++ b/ltt/branches/poly/include/lttv/state.h @@ -29,9 +29,9 @@ like enumerations. */ -gboolean lttv_state_add_event_hooks(void *hook_data, void *call_data); +gboolean lttv_state_add_event_hooks(LttvTracesetState *self); -gboolean lttv_state_remove_event_hooks(void *hook_data, void *call_data); +gboolean lttv_state_remove_event_hooks(LttvTracesetState *self); /* The interrupt type is one of "user mode", "kernel thread", "system call", @@ -44,7 +44,7 @@ typedef GQuark LttvInterruptType; thread, which are the normal mode (interrupt stack bottom), it is set to "none". For interrupt requests, faults and system calls, it is set respectively to the interrupt name (e.g. "timer"), fault name - (e.g. "page fault"), and system call name (e.g. "select"). + (e.g. "page fault"), and system call name (e.g. "select"). */ typedef GQuark LttvInterruptNumber; diff --git a/ltt/branches/poly/lttv/Makefile.am b/ltt/branches/poly/lttv/Makefile.am index 7741d505..3a50276f 100644 --- a/ltt/branches/poly/lttv/Makefile.am +++ b/ltt/branches/poly/lttv/Makefile.am @@ -3,18 +3,22 @@ SUBDIRS = modules AM_CFLAGS = $(GLIB_CFLAGS) LIBS += $(GLIB_LIBS) -bin_PROGRAMS = tracevisualizer +bin_PROGRAMS = lttv #AM_CPPFLAGS = \ # -I$(top_srcdir)/include #INCLUDES=$(top_srcdir)/include tracevisualizer_SOURCES = main.c module.c option.c hook.c attribute.c \ - attribute.h lttv.h option.h trace.h + iattribute.c processTrace.c state.c traceset.c +# lttv.h module.h option.h hook.h attribute.h \ +# iattribute.h processTrace.h state.h traceset.h -#libdir = ${lttvplugindir} +libdir = ${lttvplugindir} -#lib_LTLIBRARIES = libtextDump.la -#libtextDump_la_LDFLAGS = -module -#libtextDump_la_SOURCES = textDump.c +lib_LTLIBRARIES = libtextDump.la libbatchAnalysis.la +libtextDump_la_LDFLAGS = -module +libtextDump_la_SOURCES = textDump.c +libbatchAnalysis_la_LDFLAGS = -module +libbatchAnalysis_la_SOURCES = batchAnalysis.c diff --git a/ltt/branches/poly/lttv/batchAnalysis.c b/ltt/branches/poly/lttv/batchAnalysis.c index 02b3dea4..fa7f2c57 100644 --- a/ltt/branches/poly/lttv/batchAnalysis.c +++ b/ltt/branches/poly/lttv/batchAnalysis.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -64,7 +65,7 @@ static void process_traceset(void *hook_data, void *call_data) } -void init(int argc, char **argv) +void init(LttvModule *self, int argc, char **argv) { LttvAttribute_value *value; diff --git a/ltt/branches/poly/lttv/module.c b/ltt/branches/poly/lttv/module.c index ccb2bdde..d207c0a7 100644 --- a/ltt/branches/poly/lttv/module.c +++ b/ltt/branches/poly/lttv/module.c @@ -116,7 +116,7 @@ module_load(const char *name, int argc, char **argv) if(!g_module_symbol(gm, "init", (gpointer)&init_function)) { g_warning("module %s (%s) has no init function", name, pathname); } - else init_Function(argc,argv); + else init_Function(m, argc, argv); } else { diff --git a/ltt/branches/poly/lttv/textDump.c b/ltt/branches/poly/lttv/textDump.c index 189f9202..3fb0b6f7 100644 --- a/ltt/branches/poly/lttv/textDump.c +++ b/ltt/branches/poly/lttv/textDump.c @@ -2,6 +2,14 @@ before each trace, to print each event, and to print statistics after each trace. */ +#include +#include +#include +#include +#include +#include +#include + static gboolean a_field_names, a_state; @@ -18,9 +26,9 @@ static LttvHooks void init(int argc, char **argv) { - LttvAttribute_value *value; + LttvAttributeValue *value; - LttvIAttributes *attributes = LTTV_IATTRIBUTES(lttv_global_attributes()); + LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); a_file_name = NULL; lttv_option_add("output", 'o', -- 2.34.1