google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.19k stars 1.01k forks source link

Thread sanitizer flag to turn off "Thread created by" sections of log #1031

Open olologin opened 5 years ago

olologin commented 5 years ago

Is it possible to turn off "Thread created by" sections for every report? In some situations thread pool is created only once for program run, and the place where each thread is created doesn't give us any useful info. For example when we use OMP, all threads in its pool are created only once and at the same place. And for every other omp cycle the same place will be reported.

It just floods log. It's not crucial of course, but such optional flag might be useful.

dvyukov commented 5 years ago

There is no such option at the moment.

I guess it would also be useful for GCD, TBB and all other tasking libraries. I wonder if it's possible to auto-detect such threads... @kubamracek do we want to skip thread creation stack for headless GCD threads?

kubamracek commented 5 years ago

@dvyukov we already do, see PrintThread in tsan_report.cc