Commit 510d3437 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Revert "[TaskScheduler] Require constant initialization for g_heartbeat_for_testing"

This reverts commit 9442f946.

Reason for revert: didn't budge the graph (https://chromeperf.appspot.com/report?sid=d99ad2294f639cf4e0d0bbfa0e9aee1cac5a0352ef9f35d266f375f52466a608&start_rev=1526716391&end_rev=1532706078)

Original change's description:
> [TaskScheduler] Require constant initialization for g_heartbeat_for_testing
> 
> Somehow r562248 caused a regression whereby it should have been strictly
> more performant, the only difference is the potential static
> initializer (which if incorrectly initialized could result in it being
> non-zero? and somehow cause the timer to be fast?).
> Let's try to suppress it.
> 
> R=​fdoray@chromium.org
> 
> Bug: 848255
> Change-Id: I21111ddd4c069b9171badc58fc4a1914bb068641
> Reviewed-on: https://chromium-review.googlesource.com/1090794
> Reviewed-by: François Doray <fdoray@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#578420}

TBR=gab@chromium.org,fdoray@chromium.org

Change-Id: I457751dc2d9d410e049685e22cf3f79cf39d3c11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 848255
Reviewed-on: https://chromium-review.googlesource.com/1153230Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578762}
parent c8219606
...@@ -13,19 +13,13 @@ ...@@ -13,19 +13,13 @@
#include "base/task_scheduler/task_scheduler.h" #include "base/task_scheduler/task_scheduler.h"
#include "base/task_scheduler/task_tracker.h" #include "base/task_scheduler/task_tracker.h"
#include "base/task_scheduler/task_traits.h" #include "base/task_scheduler/task_traits.h"
#include "build/build_config.h"
namespace base { namespace base {
namespace internal { namespace internal {
namespace { namespace {
// TODO(gab): Verify whether this attribute addresses https://crbug.com/848255 TimeDelta g_heartbeat_for_testing = TimeDelta();
// and consider a way to expose it more widely.
#if defined(__clang__) && !defined(OS_NACL)
[[clang::require_constant_initialization]]
#endif
TimeDelta g_heartbeat_for_testing = TimeDelta();
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment