Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1182)

Unified Diff: base/tracked_objects.cc

Issue 1640223002: profiler: cleanup unused alternate_timer code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/tracked_objects.cc
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index 0632edf71e5725a34962ff28a1ea67f7b327f0ec..33a0a27ef6763524eb05b281138fb1bc0244e75e 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -14,7 +14,6 @@
#include "base/debug/leak_annotations.h"
#include "base/logging.h"
#include "base/process/process_handle.h"
-#include "base/profiler/alternate_timer.h"
#include "base/strings/stringprintf.h"
#include "base/third_party/valgrind/memcheck.h"
#include "base/tracking_info.h"
@@ -285,7 +284,7 @@ void Births::RecordBirth() { ++birth_count_; }
// to them.
// static
-NowFunction* ThreadData::now_function_ = NULL;
+ThreadData::NowFunction* ThreadData::now_function_ = NULL;
// static
bool ThreadData::now_function_is_time_ = false;
@@ -692,12 +691,6 @@ void ThreadData::OnProfilingPhaseCompletedOnThread(int profiling_phase) {
}
}
-static void OptionallyInitializeAlternateTimer() {
- NowFunction* alternate_time_source = GetAlternateTimeSource();
- if (alternate_time_source)
- ThreadData::SetAlternateTimeSource(alternate_time_source);
-}
-
void ThreadData::Initialize() {
if (base::subtle::Acquire_Load(&status_) >= DEACTIVATED)
return; // Someone else did the initialization.
@@ -711,13 +704,6 @@ void ThreadData::Initialize() {
if (base::subtle::Acquire_Load(&status_) >= DEACTIVATED)
return; // Someone raced in here and beat us.
- // Put an alternate timer in place if the environment calls for it, such as
- // for tracking TCMalloc allocations. This insertion is idempotent, so we
- // don't mind if there is a race, and we'd prefer not to be in a lock while
- // doing this work.
- if (kAllowAlternateTimeSourceHandling)
- OptionallyInitializeAlternateTimer();
-
// Perform the "real" TLS initialization now, and leave it intact through
// process termination.
if (!tls_index_.initialized()) { // Testing may have initialized this.

Powered by Google App Engine
This is Rietveld 408576698