mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 10:36:06 +00:00

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
37 lines
895 B
C++
37 lines
895 B
C++
//===-- tsan_platform_windows.cpp -----------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is a part of ThreadSanitizer (TSan), a race detector.
|
|
//
|
|
// Windows-specific code.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "sanitizer_common/sanitizer_platform.h"
|
|
#if SANITIZER_WINDOWS
|
|
|
|
#include "tsan_platform.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
namespace __tsan {
|
|
|
|
void FlushShadowMemory() {
|
|
}
|
|
|
|
void WriteMemoryProfile(char *buf, uptr buf_size) {}
|
|
|
|
void InitializePlatformEarly() {
|
|
}
|
|
|
|
void InitializePlatform() {
|
|
}
|
|
|
|
} // namespace __tsan
|
|
|
|
#endif // SANITIZER_WINDOWS
|