Author: bonefish Date: 2010-03-04 00:23:09 +0100 (Thu, 04 Mar 2010) New Revision: 35750 Changeset: http://dev.haiku-os.org/changeset/35750/haiku Modified: haiku/trunk/src/system/kernel/debug/tracing.cpp Log: TracingMetaData::_InitPreviousTracingData(): * More output. * Actually increment errorCount when encountering an error. The loop condition would never be false this way. Modified: haiku/trunk/src/system/kernel/debug/tracing.cpp =================================================================== --- haiku/trunk/src/system/kernel/debug/tracing.cpp 2010-03-03 22:46:25 UTC (rev 35749) +++ haiku/trunk/src/system/kernel/debug/tracing.cpp 2010-03-03 23:23:09 UTC (rev 35750) @@ -474,6 +474,9 @@ return false; } + dprintf("ktrace: Remapped tracing buffer at %p, size: %" B_PRIuSIZE "\n", + buffer, kTraceOutputBufferSize + MAX_TRACE_SIZE); + // verify/repair the tracing entry list uint32 errorCount = 0; uint32 entryCount = 0; @@ -487,6 +490,7 @@ dprintf("ktrace recovering: entry %p: fixing previous_size " "size: %lu (should be %lu)\n", entry, entry->previous_size, previousEntrySize); + errorCount++; } entry->previous_size = previousEntrySize; } @@ -498,6 +502,7 @@ if ((entry->flags & WRAP_ENTRY) == 0 && entry->size == 0) { dprintf("ktrace recovering: entry %p: non-wrap entry size is 0\n", entry); + errorCount++; fAfterLastEntry = entry; break; } @@ -505,6 +510,7 @@ if (entry->size > uint32(fBuffer + kBufferSize - entry)) { dprintf("ktrace recovering: entry %p: size too big: %lu\n", entry, entry->size); + errorCount++; fAfterLastEntry = entry; break; } @@ -512,6 +518,7 @@ if (entry < fAfterLastEntry && entry + entry->size > fAfterLastEntry) { dprintf("ktrace recovering: entry %p: entry crosses " "fAfterLastEntry (%p)\n", entry, fAfterLastEntry); + errorCount++; fAfterLastEntry = entry; break; } @@ -522,11 +529,13 @@ > kMaxTracingEntryByteSize / sizeof(trace_entry)) { dprintf("ktrace recovering: entry %p: wrap entry at invalid " "buffer location\n", entry); + errorCount++; } if (entry->size != 0) { dprintf("ktrace recovering: entry %p: invalid wrap entry " "size: %lu\n", entry, entry->size); + errorCount++; entry->size = 0; }