projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start with a new fresh changelog with the 1.5 release.
[lttv.git]
/
lttv
/
modules
/
text
/
textDump.c
diff --git
a/lttv/modules/text/textDump.c
b/lttv/modules/text/textDump.c
index ddee070b119e78bcfc40b29610152b483aa22988..aa628c98232c7eaf77003223cfe7d94abc0f3311 100644
(file)
--- a/
lttv/modules/text/textDump.c
+++ b/
lttv/modules/text/textDump.c
@@
-31,15
+31,17
@@
#include <lttv/hook.h>
#include <lttv/attribute.h>
#include <lttv/iattribute.h>
#include <lttv/hook.h>
#include <lttv/attribute.h>
#include <lttv/iattribute.h>
+#ifdef BABEL_CLEANUP
#include <lttv/stats.h>
#include <lttv/filter.h>
#include <lttv/stats.h>
#include <lttv/filter.h>
+#endif
+// #include <lttv/traceset.h>
#include <lttv/print.h>
#include <lttv/print.h>
-#include <ltt/ltt.h>
-#include <ltt/event.h>
-#include <ltt/trace.h>
#include <stdio.h>
#include <inttypes.h>
#include <stdio.h>
#include <inttypes.h>
+#include <lttv/event.h>
+
static gboolean
a_noevent,
a_no_field_names,
static gboolean
a_noevent,
a_no_field_names,
@@
-195,7
+197,7
@@
print_tree(FILE *fp, GString *indent, LttvAttribute *tree)
}
}
}
}
}
}
-
+#ifdef BABEL_CLEANUP
static void
print_stats(FILE *fp, LttvTracesetStats *tscs)
{
static void
print_stats(FILE *fp, LttvTracesetStats *tscs)
{
@@
-242,7
+244,7
@@
print_stats(FILE *fp, LttvTracesetStats *tscs)
}
g_string_free(indent, TRUE);
}
}
g_string_free(indent, TRUE);
}
-
+#endif
/* Insert the hooks before and after each trace and tracefile, and for each
event. Print a global header. */
/* Insert the hooks before and after each trace and tracefile, and for each
event. Print a global header. */
@@
-252,7
+254,7
@@
static GString *a_string;
static gboolean write_traceset_header(void *hook_data, void *call_data)
{
static gboolean write_traceset_header(void *hook_data, void *call_data)
{
- LttvTraceset
Context *tc = (LttvTracesetContex
t *)call_data;
+ LttvTraceset
*traceset = (LttvTracese
t *)call_data;
g_info("TextDump traceset header");
g_info("TextDump traceset header");
@@
-263,7
+265,7
@@
static gboolean write_traceset_header(void *hook_data, void *call_data)
/* Print the trace set header */
fprintf(a_file,"Trace set contains %d traces\n\n",
/* Print the trace set header */
fprintf(a_file,"Trace set contains %d traces\n\n",
- lttv_traceset_number(t
c->ts
));
+ lttv_traceset_number(t
raceset
));
return FALSE;
}
return FALSE;
}
@@
-271,17
+273,17
@@
static gboolean write_traceset_header(void *hook_data, void *call_data)
static gboolean write_traceset_footer(void *hook_data, void *call_data)
{
static gboolean write_traceset_footer(void *hook_data, void *call_data)
{
- LttvTraceset
Context *tc = (LttvTracesetContex
t *)call_data;
+ LttvTraceset
*traceset = (LttvTracese
t *)call_data;
g_info("TextDump traceset footer");
fprintf(a_file,"End trace set\n\n");
g_info("TextDump traceset footer");
fprintf(a_file,"End trace set\n\n");
-
+#ifdef BABEL_CLEANUP
if(LTTV_IS_TRACESET_STATS(tc)) {
lttv_stats_sum_traceset((LttvTracesetStats *)tc, ltt_time_infinite);
print_stats(a_file, (LttvTracesetStats *)tc);
}
if(LTTV_IS_TRACESET_STATS(tc)) {
lttv_stats_sum_traceset((LttvTracesetStats *)tc, ltt_time_infinite);
print_stats(a_file, (LttvTracesetStats *)tc);
}
-
+#endif
if(a_file_name != NULL) fclose(a_file);
return FALSE;
if(a_file_name != NULL) fclose(a_file);
return FALSE;
@@
-302,13
+304,14
@@
static gboolean write_trace_header(void *hook_data, void *call_data)
return FALSE;
}
return FALSE;
}
-
static int write_event_content(void *hook_data, void *call_data)
{
gboolean result;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
static int write_event_content(void *hook_data, void *call_data)
{
gboolean result;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ LttvEvent *event = (LttvEvent *)call_data;
+#ifdef BABEL_CLEANUP
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
LttvTracefileState *tfs = (LttvTracefileState *)call_data;
@@
-340,17
+343,25
@@
static int write_event_content(void *hook_data, void *call_data)
if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
tfc->t_context->t,tfc,NULL,NULL))
return FALSE;
if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,
tfc->t_context->t,tfc,NULL,NULL))
return FALSE;
-
+#endif
+#ifdef BABEL_CLEANUP
lttv_event_to_string(e, a_string, TRUE, !a_no_field_names, tfs);
lttv_event_to_string(e, a_string, TRUE, !a_no_field_names, tfs);
+#endif
+ /* TODO 2012-03-12 Add state info */
+ lttv_event_to_string(event, a_string, !a_no_field_names, TRUE);
+
+#ifdef BABEL_CLEANUP
if(a_state) {
g_string_append_printf(a_string, " %s ",
g_quark_to_string(process->state->s));
}
if(a_state) {
g_string_append_printf(a_string, " %s ",
g_quark_to_string(process->state->s));
}
+#endif
g_string_append_printf(a_string,"\n");
fputs(a_string->str, a_file);
g_string_append_printf(a_string,"\n");
fputs(a_string->str, a_file);
+
return FALSE;
}
return FALSE;
}
@@
-472,5
+483,5
@@
static void destroy()
LTTV_MODULE("textDump", "Print events in a file", \
"Produce a detailed text printout of a trace", \
LTTV_MODULE("textDump", "Print events in a file", \
"Produce a detailed text printout of a trace", \
- init, destroy, "
stats", "
batchAnalysis", "option", "print")
+ init, destroy, "batchAnalysis", "option", "print")
This page took
0.027407 seconds
and
4
git commands to generate.