[all-commits] [llvm/llvm-project] 58a157: tsan: make mem profile data more consistent

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Sep 22 01:16:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58a157cd3b54942283a301019dceb65be2da85f7
      https://github.com/llvm/llvm-project/commit/58a157cd3b54942283a301019dceb65be2da85f7
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_platform.h
    M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
    M compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
    M compiler-rt/lib/tsan/rtl/tsan_platform_windows.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

  Log Message:
  -----------
  tsan: make mem profile data more consistent

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.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110150




More information about the All-commits mailing list