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

Unified Diff: components/startup_metric_utils/browser/startup_metric_utils.cc

Issue 2215513002: Reland #1: "base: Implement GetCurrentThreadPriority." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REbase error. Created 4 years, 4 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
« no previous file with comments | « base/threading/platform_thread_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/startup_metric_utils/browser/startup_metric_utils.cc
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.cc b/components/startup_metric_utils/browser/startup_metric_utils.cc
index b2852722466a28b7b95408af5bf24439a9205242..f0d415444a9b3b558ebf3605860896e5c2ed9920 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.cc
+++ b/components/startup_metric_utils/browser/startup_metric_utils.cc
@@ -316,9 +316,6 @@ base::TimeTicks StartupTimeToTimeTicks(const base::Time& time) {
// bumping the priority reduces the likelihood of a context switch interfering
// with this computation.
-// Enabling this logic on OS X causes a significant performance regression.
-// https://crbug.com/601270
-#if !defined(OS_MACOSX)
static bool statics_initialized = false;
base::ThreadPriority previous_priority = base::ThreadPriority::NORMAL;
@@ -327,17 +324,14 @@ base::TimeTicks StartupTimeToTimeTicks(const base::Time& time) {
base::PlatformThread::SetCurrentThreadPriority(
base::ThreadPriority::DISPLAY);
}
-#endif
static const base::Time time_base = base::Time::Now();
static const base::TimeTicks trace_ticks_base = base::TimeTicks::Now();
-#if !defined(OS_MACOSX)
if (!statics_initialized) {
base::PlatformThread::SetCurrentThreadPriority(previous_priority);
}
statics_initialized = true;
-#endif
// Then use the TimeDelta common ground between the two units to make the
// conversion.
« no previous file with comments | « base/threading/platform_thread_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698