Lines Matching refs:entry

100 			trace_entry*		NextEntry(trace_entry* entry);
101 trace_entry* PreviousEntry(trace_entry* entry);
244 TracingMetaData::NextEntry(trace_entry* entry)
246 entry += entry->size;
247 if ((entry->flags & WRAP_ENTRY) != 0)
248 entry = fBuffer;
250 if (entry == fAfterLastEntry)
253 return entry;
258 TracingMetaData::PreviousEntry(trace_entry* entry)
260 if (entry == fFirstEntry)
263 if (entry == fBuffer) {
264 // beginning of buffer -- previous entry is a wrap entry
265 entry = fBuffer + kBufferSize - entry->previous_size;
268 return entry - entry->previous_size;
291 trace_entry* entry = fAfterLastEntry;
292 entry->size = size;
293 entry->flags = flags;
300 TRACE((" entry: %p, end %p, start %p, entries %ld\n", entry,
303 return entry;
334 // a buffer entry -- just skip it
337 // for sake of robustness. The destructors of tracing entry classes
343 // overwrite data of the entry we're going to allocate.
344 // We can't do anything until this entry can be discarded.
385 // just in case _FreeFirstEntry() freed the very last existing entry
389 // mark as wrap entry and actually wrap around
589 // verify/repair the tracing entry list
594 trace_entry* entry = fFirstEntry;
596 // check previous entry size
597 if (entry->previous_size != previousEntrySize) {
598 if (entry != fFirstEntry) {
599 dprintf("ktrace recovering: entry %p: fixing previous_size "
600 "size: %" B_PRIu32 " (should be %" B_PRIu32 ")\n", entry,
601 entry->previous_size, previousEntrySize);
604 entry->previous_size = previousEntrySize;
607 if (entry == fAfterLastEntry)
611 if ((entry->flags & WRAP_ENTRY) == 0 && entry->size == 0) {
612 dprintf("ktrace recovering: entry %p: non-wrap entry size is 0\n",
613 entry);
615 fAfterLastEntry = entry;
619 if (entry->size > uint32(fBuffer + kBufferSize - entry)) {
620 dprintf("ktrace recovering: entry %p: size too big: %" B_PRIu32 "\n",
621 entry, entry->size);
623 fAfterLastEntry = entry;
627 if (entry < fAfterLastEntry && entry + entry->size > fAfterLastEntry) {
628 dprintf("ktrace recovering: entry %p: entry crosses "
629 "fAfterLastEntry (%p)\n", entry, fAfterLastEntry);
631 fAfterLastEntry = entry;
635 // check for wrap entry
636 if ((entry->flags & WRAP_ENTRY) != 0) {
637 if ((uint32)(fBuffer + kBufferSize - entry)
639 dprintf("ktrace recovering: entry %p: wrap entry at invalid "
640 "buffer location\n", entry);
644 if (entry->size != 0) {
645 dprintf("ktrace recovering: entry %p: invalid wrap entry "
646 "size: %" B_PRIu32 "\n", entry, entry->size);
648 entry->size = 0;
651 previousEntrySize = fBuffer + kBufferSize - entry;
652 entry = fBuffer;
656 if ((entry->flags & BUFFER_ENTRY) == 0) {
657 entry->flags |= CHECK_ENTRY;
662 previousEntrySize = entry->size;
664 entry += entry->size;
669 fAfterLastEntry = entry;
792 trace_entry* entry = sTracingMetaData->AllocateEntry(
794 return entry != NULL ? entry + 1 : NULL;
961 TraceFilter::Filter(const TraceEntry* entry, LazyTraceOutput& out)
972 const AbstractTraceEntry* entry
974 return (entry != NULL && entry->ThreadID() == fThread);
983 const AbstractTraceEntry* entry
985 return (entry != NULL && entry->TeamID() == fTeam);
992 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
994 return strstr(out.DumpEntry(entry), fString) != NULL;
1001 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1006 return strstr(out.DumpEntry(entry), buffer) != NULL;
1012 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1017 return strstr(out.DumpEntry(entry), buffer) != NULL;
1023 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1026 return strstr(out.DumpEntry(entry), (const char*)fValue) != NULL;
1031 return strstr(out.DumpEntry(entry), buffer) != NULL;
1037 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1039 return !fSubFilters.first->Filter(entry, out);
1046 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1048 return fSubFilters.first->Filter(entry, out)
1049 && fSubFilters.second->Filter(entry, out);
1056 virtual bool Filter(const TraceEntry* entry, LazyTraceOutput& out)
1058 return fSubFilters.first->Filter(entry, out)
1059 || fSubFilters.second->Filter(entry, out);
1282 TraceEntryIterator::_NextNonBufferEntry(trace_entry* entry)
1284 while (entry != NULL && (entry->flags & BUFFER_ENTRY) != 0)
1285 entry = sTracingMetaData->NextEntry(entry);
1287 return entry;
1292 TraceEntryIterator::_PreviousNonBufferEntry(trace_entry* entry)
1294 while (entry != NULL && (entry->flags & BUFFER_ENTRY) != 0)
1295 entry = sTracingMetaData->PreviousEntry(entry);
1297 return entry;
1475 // From the last entry to check iterate backwards to check filter
1479 // move to the entry after the last entry to check
1486 TraceEntry* entry = iterator.Previous();
1487 if ((entry->Flags() & ENTRY_INITIALIZED) != 0) {
1489 if (filter->Filter(entry, out)) {
1490 entry->ToTraceEntry()->flags |= FILTER_MATCH;
1499 entry->ToTraceEntry()->flags &= ~FILTER_MATCH;
1505 // iterate to the previous entry, so that the next loop starts at the
1512 // set the iterator to the entry before the first one to dump
1519 while (TraceEntry* entry = iterator.Next()) {
1529 if ((entry->Flags() & ENTRY_INITIALIZED) != 0) {
1532 ? (entry->Flags() & FILTER_MATCH) == 0
1533 : !filter->Filter(entry, out))) {
1538 const char* dump = out.DumpEntry(entry);
1547 entry->DumpStackTrace(out);
1552 kprintf("%5" B_PRId32 ". ** uninitialized entry **\n", index);
1592 trace_entry* entry = sTracingMetaData->AllocateEntry(
1594 if (entry == NULL)
1597 return (uint8*)(entry + 1);
1741 while (TraceEntry* entry = iterator.Next()) {
1742 AbstractTraceEntry* abstract = dynamic_cast<AbstractTraceEntry*>(entry);
1802 "--difftime - print difference times for all but the first entry.\n"
1806 " backward this will be the first or last entry printed\n"
1808 " the first entry in the trace buffer is 1. If 0 is\n"