This is an archive of the discontinued LLVM Phabricator instance.

tsan: make mem profile data more consistent
ClosedPublic

Authored by dvyukov on Sep 21 2021, 4:15 AM.

Details

Summary

We currently query number of threads before reading /proc/self/smaps.
But reading /proc/self/smaps can take lots of time for huge processes
and it's retries several times with different buffer sizes.
Overall it can take tens of seconds. This can make number of threads
significantly inconsistent with the rest of the stats.
So query it after reading /proc/self/smaps.

Depends on D110149.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Sep 21 2021, 4:15 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2021, 4:15 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Sep 21 2021, 1:39 PM
This revision is now accepted and ready to land.Sep 21 2021, 1:39 PM
melver accepted this revision.Sep 22 2021, 12:37 AM
melver added inline comments.
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
146

Accidental change?

dvyukov updated this revision to Diff 374138.Sep 22 2021, 1:09 AM
dvyukov marked an inline comment as done.

rebased and addressed comments

dvyukov marked an inline comment as not done.Sep 22 2021, 1:12 AM
dvyukov added inline comments.
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
146

I've tried to remove this during rebase but then when I run 'arc diff' it insistent on this change...

This revision was landed with ongoing or failed builds.Sep 22 2021, 1:16 AM
This revision was automatically updated to reflect the committed changes.
dvyukov marked an inline comment as not done.