Lines Matching refs:rep

221 static ReportStack *ChooseSummaryStack(const ReportDesc *rep) {
222 if (rep->mops.Size())
223 return rep->mops[0]->stack;
224 if (rep->stacks.Size())
225 return rep->stacks[0];
226 if (rep->mutexes.Size())
227 return rep->mutexes[0]->stack;
228 if (rep->threads.Size())
229 return rep->threads[0]->stack;
239 void PrintReport(const ReportDesc *rep) {
242 const char *rep_typ_str = ReportTypeString(rep->typ);
248 if (rep->typ == ReportTypeDeadlock) {
251 for (uptr i = 0; i < rep->mutexes.Size(); i++)
252 PrintMutexShortWithAddress(rep->mutexes[i], " => ");
253 PrintMutexShort(rep->mutexes[0], "\n\n");
254 CHECK_GT(rep->mutexes.Size(), 0U);
255 CHECK_EQ(rep->mutexes.Size() * (flags()->second_deadlock_stack ? 2 : 1),
256 rep->stacks.Size());
257 for (uptr i = 0; i < rep->mutexes.Size(); i++) {
259 PrintMutexShort(rep->mutexes[(i + 1) % rep->mutexes.Size()],
261 PrintMutexShort(rep->mutexes[i], " in ");
263 Printf("%s:\n", thread_name(thrbuf, rep->unique_tids[i]));
266 PrintStack(rep->stacks[2*i]);
268 PrintMutexShort(rep->mutexes[i],
270 PrintStack(rep->stacks[2*i+1]);
272 PrintStack(rep->stacks[i]);
279 for (uptr i = 0; i < rep->stacks.Size(); i++) {
282 PrintStack(rep->stacks[i]);
286 for (uptr i = 0; i < rep->mops.Size(); i++)
287 PrintMop(rep->mops[i], i == 0);
289 if (rep->sleep)
290 PrintSleep(rep->sleep);
292 for (uptr i = 0; i < rep->locs.Size(); i++)
293 PrintLocation(rep->locs[i]);
295 if (rep->typ != ReportTypeDeadlock) {
296 for (uptr i = 0; i < rep->mutexes.Size(); i++)
297 PrintMutex(rep->mutexes[i]);
300 for (uptr i = 0; i < rep->threads.Size(); i++)
301 PrintThread(rep->threads[i]);
303 if (rep->typ == ReportTypeThreadLeak && rep->count > 1)
304 Printf(" And %d more similar thread leaks.\n\n", rep->count - 1);
306 if (ReportStack *ent = SkipTsanInternalFrames(ChooseSummaryStack(rep)))
348 void PrintReport(const ReportDesc *rep) {
350 if (rep->typ == ReportTypeRace) {
352 for (uptr i = 0; i < rep->mops.Size(); i++)
353 PrintMop(rep->mops[i], i == 0);
354 for (uptr i = 0; i < rep->threads.Size(); i++)
355 PrintThread(rep->threads[i]);
356 } else if (rep->typ == ReportTypeDeadlock) {
358 for (uptr i = 0; i < rep->mutexes.Size(); i++) {
360 999, rep->mutexes[i]->id,
361 rep->mutexes[(i+1) % rep->mutexes.Size()]->id);
362 PrintStack(rep->stacks[2*i]);
365 rep->mutexes[(i+1) % rep->mutexes.Size()]->id);
366 PrintStack(rep->stacks[2*i + 1]);