[test] Make RCS test time atomic to fix TSAN
Change-Id: Ibc256e202a75f7dbcba27dad2b591cf45738b005 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3571900 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#79809}
This commit is contained in:
parent
3bb9ab5646
commit
1026cd68cf
@ -4,6 +4,8 @@
|
||||
|
||||
#include "src/logging/runtime-call-stats.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "include/v8-template.h"
|
||||
#include "src/api/api-inl.h"
|
||||
#include "src/base/atomic-utils.h"
|
||||
@ -21,7 +23,8 @@ namespace internal {
|
||||
|
||||
namespace {
|
||||
|
||||
static base::TimeTicks runtime_call_stats_test_time_ = base::TimeTicks();
|
||||
static std::atomic<base::TimeTicks> runtime_call_stats_test_time_ =
|
||||
base::TimeTicks();
|
||||
// Time source used for the RuntimeCallTimer during tests. We cannot rely on
|
||||
// the native timer since it's too unpredictable on the build bots.
|
||||
static base::TimeTicks RuntimeCallStatsTestNow() {
|
||||
|
Loading…
Reference in New Issue
Block a user