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

Unified Diff: base/profiler/scoped_profile.cc

Issue 445413003: Creating a framework for suppressing pollution of the profiler data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing unit tests again. Created 6 years, 3 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/profiler/scoped_profile.h ('k') | base/profiler/tracked_time_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/scoped_profile.cc
diff --git a/base/profiler/scoped_profile.cc b/base/profiler/scoped_profile.cc
index 93c86e92cce5452e81e3b5d16e71e82e99c443a0..e1edc97357cc2726c074976e4e3467c56552899d 100644
--- a/base/profiler/scoped_profile.cc
+++ b/base/profiler/scoped_profile.cc
@@ -12,8 +12,8 @@ namespace tracked_objects {
ScopedProfile::ScopedProfile(const Location& location)
- : birth_(ThreadData::TallyABirthIfActive(location)),
- start_of_run_(ThreadData::NowForStartOfRun(birth_)) {
+ : birth_(ThreadData::TallyABirthIfActive(location)) {
+ ThreadData::PrepareForStartOfRun(birth_);
}
ScopedProfile::~ScopedProfile() {
@@ -21,10 +21,11 @@ ScopedProfile::~ScopedProfile() {
}
void ScopedProfile::StopClockAndTally() {
+ stopwatch_.Stop();
+
if (!birth_)
return;
- ThreadData::TallyRunInAScopedRegionIfTracking(birth_, start_of_run_,
- ThreadData::NowForEndOfRun());
+ ThreadData::TallyRunInAScopedRegionIfTracking(birth_, stopwatch_);
birth_ = NULL;
}
« no previous file with comments | « base/profiler/scoped_profile.h ('k') | base/profiler/tracked_time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698