From af0cd3e8c7b85cc13a7a503af346a9c861c2f59a Mon Sep 17 00:00:00 2001 From: compudj Date: Sat, 21 Aug 2004 17:52:34 +0000 Subject: [PATCH] report broken 2.2 traces with flight desactivated. Cannot detect them if flight recorder activated : conflict with trace_syscall_entry number git-svn-id: http://ltt.polymtl.ca/svn@826 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/convert/convert.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ltt/branches/poly/ltt/convert/convert.c b/ltt/branches/poly/ltt/convert/convert.c index 722bf5ec..c30fbd06 100644 --- a/ltt/branches/poly/ltt/convert/convert.c +++ b/ltt/branches/poly/ltt/convert/convert.c @@ -324,7 +324,20 @@ int main(int argc, char ** argv){ ltt_block_size = tStart_2_2->BufferSize; ltt_log_cpu = tStart_2_2->LogCPUID; ltt_trace_start_size = sizeof(trace_start_2_2); - } else if(tStart->MinorVersion == 3) { + /* Verify if it's a broken 2.2 format */ + if(*(uint8_t*)(cur_pos + sizeof(trace_start_2_2)) == 0) { + /* Cannot have two trace start events. We cannot detect the problem + * if the flight recording flag is set to 1, as it conflicts + * with TRACE_SYSCALL_ENTRY. + */ + g_warning("This is a 2.3 trace format that has a 2.2 tag. Please upgrade your kernel"); + g_printf("Processing the trace as a 2.3 format\n"); + + tStart->MinorVersion = 3; + } + } + + if(tStart->MinorVersion == 3) { trace_start_2_3* tStart_2_3 = (trace_start_2_3*)tStart; ltt_major_version = tStart_2_3->MajorVersion; ltt_minor_version = tStart_2_3->MinorVersion; -- 2.34.1