Lines Matching refs:rep

254 static ReportStack *ChooseSummaryStack(const ReportDesc *rep) {  in ChooseSummaryStack()  argument
255 if (rep->mops.Size()) in ChooseSummaryStack()
256 return rep->mops[0]->stack; in ChooseSummaryStack()
257 if (rep->stacks.Size()) in ChooseSummaryStack()
258 return rep->stacks[0]; in ChooseSummaryStack()
259 if (rep->mutexes.Size()) in ChooseSummaryStack()
260 return rep->mutexes[0]->stack; in ChooseSummaryStack()
261 if (rep->threads.Size()) in ChooseSummaryStack()
262 return rep->threads[0]->stack; in ChooseSummaryStack()
287 void PrintReport(const ReportDesc *rep) { in PrintReport() argument
290 const char *rep_typ_str = ReportTypeString(rep->typ); in PrintReport()
296 if (rep->typ == ReportTypeDeadlock) { in PrintReport()
299 for (uptr i = 0; i < rep->mutexes.Size(); i++) in PrintReport()
300 PrintMutexShortWithAddress(rep->mutexes[i], " => "); in PrintReport()
301 PrintMutexShort(rep->mutexes[0], "\n\n"); in PrintReport()
302 CHECK_GT(rep->mutexes.Size(), 0U); in PrintReport()
303 CHECK_EQ(rep->mutexes.Size() * (flags()->second_deadlock_stack ? 2 : 1), in PrintReport()
304 rep->stacks.Size()); in PrintReport()
305 for (uptr i = 0; i < rep->mutexes.Size(); i++) { in PrintReport()
307 PrintMutexShort(rep->mutexes[(i + 1) % rep->mutexes.Size()], in PrintReport()
309 PrintMutexShort(rep->mutexes[i], " in "); in PrintReport()
311 Printf("%s:\n", thread_name(thrbuf, rep->unique_tids[i])); in PrintReport()
314 PrintStack(rep->stacks[2*i]); in PrintReport()
316 PrintMutexShort(rep->mutexes[i], in PrintReport()
318 PrintStack(rep->stacks[2*i+1]); in PrintReport()
320 PrintStack(rep->stacks[i]); in PrintReport()
327 for (uptr i = 0; i < rep->stacks.Size(); i++) { in PrintReport()
330 PrintStack(rep->stacks[i]); in PrintReport()
334 for (uptr i = 0; i < rep->mops.Size(); i++) in PrintReport()
335 PrintMop(rep->mops[i], i == 0); in PrintReport()
337 if (rep->sleep) in PrintReport()
338 PrintSleep(rep->sleep); in PrintReport()
340 for (uptr i = 0; i < rep->locs.Size(); i++) in PrintReport()
341 PrintLocation(rep->locs[i]); in PrintReport()
343 if (rep->typ != ReportTypeDeadlock) { in PrintReport()
344 for (uptr i = 0; i < rep->mutexes.Size(); i++) in PrintReport()
345 PrintMutex(rep->mutexes[i]); in PrintReport()
348 for (uptr i = 0; i < rep->threads.Size(); i++) in PrintReport()
349 PrintThread(rep->threads[i]); in PrintReport()
351 if (rep->typ == ReportTypeThreadLeak && rep->count > 1) in PrintReport()
352 Printf(" And %d more similar thread leaks.\n\n", rep->count - 1); in PrintReport()
354 if (ReportStack *stack = ChooseSummaryStack(rep)) { in PrintReport()
401 void PrintReport(const ReportDesc *rep) { in PrintReport() argument
403 if (rep->typ == ReportTypeRace) { in PrintReport()
405 for (uptr i = 0; i < rep->mops.Size(); i++) in PrintReport()
406 PrintMop(rep->mops[i], i == 0); in PrintReport()
407 for (uptr i = 0; i < rep->threads.Size(); i++) in PrintReport()
408 PrintThread(rep->threads[i]); in PrintReport()
409 } else if (rep->typ == ReportTypeDeadlock) { in PrintReport()
411 for (uptr i = 0; i < rep->mutexes.Size(); i++) { in PrintReport()
413 999, rep->mutexes[i]->id, in PrintReport()
414 rep->mutexes[(i+1) % rep->mutexes.Size()]->id); in PrintReport()
415 PrintStack(rep->stacks[2*i]); in PrintReport()
418 rep->mutexes[(i+1) % rep->mutexes.Size()]->id); in PrintReport()
419 PrintStack(rep->stacks[2*i + 1]); in PrintReport()