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

Unified Diff: content/renderer/devtools/v8_sampling_profiler.cc

Issue 1121463005: Fixit: Split base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Windows compile fixes. Created 5 years, 8 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 | « content/child/blink_platform_impl.cc ('k') | gpu/perftests/measurements.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/devtools/v8_sampling_profiler.cc
diff --git a/content/renderer/devtools/v8_sampling_profiler.cc b/content/renderer/devtools/v8_sampling_profiler.cc
index 20b22387282643d2c55d515217d8a2cc342cc64d..f3ad2156cb686e68a4d49f9d55ae8211dbc822ff 100644
--- a/content/renderer/devtools/v8_sampling_profiler.cc
+++ b/content/renderer/devtools/v8_sampling_profiler.cc
@@ -95,14 +95,14 @@ class SampleRecord {
SampleRecord() {}
- base::TimeTicks timestamp() const { return timestamp_; }
+ base::TraceTicks timestamp() const { return timestamp_; }
void Collect(v8::Isolate* isolate,
- base::TimeTicks timestamp,
+ base::TraceTicks timestamp,
const v8::RegisterState& state);
scoped_refptr<ConvertableToTraceFormat> ToTraceFormat() const;
private:
- base::TimeTicks timestamp_;
+ base::TraceTicks timestamp_;
unsigned vm_state_ : 4;
unsigned frames_count_ : kMaxFramesCountLog2;
const void* frames_[kMaxFramesCount];
@@ -111,7 +111,7 @@ class SampleRecord {
};
void SampleRecord::Collect(v8::Isolate* isolate,
- base::TimeTicks timestamp,
+ base::TraceTicks timestamp,
const v8::RegisterState& state) {
v8::SampleInfo sample_info;
isolate->GetStackSample(state, (void**)frames_, kMaxFramesCount,
@@ -282,7 +282,7 @@ void Sampler::Sample() {
void Sampler::DoSample(const v8::RegisterState& state) {
// Called in the sampled thread signal handler.
// Because of that it is not allowed to do any memory allocation here.
- base::TimeTicks timestamp = base::TimeTicks::NowFromSystemTraceTime();
+ base::TraceTicks timestamp = base::TraceTicks::Now();
SampleRecord* record = samples_data_->StartEnqueue();
if (!record)
return;
@@ -296,7 +296,7 @@ void Sampler::InjectPendingEvents() {
TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP1(
TRACE_DISABLED_BY_DEFAULT("v8.cpu_profile"), "V8Sample",
platform_data_.thread_id(),
- (record->timestamp() - base::TimeTicks()).InMicroseconds(), "data",
+ (record->timestamp() - base::TraceTicks()).InMicroseconds(), "data",
record->ToTraceFormat());
samples_data_->Remove();
record = samples_data_->Peek();
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | gpu/perftests/measurements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698