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

Unified Diff: src/profiler/cpu-profiler-inl.h

Issue 2105943002: Expose TickSample and its APIs in v8-profiler.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase & address comments. Created 4 years, 6 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: src/profiler/cpu-profiler-inl.h
diff --git a/src/profiler/cpu-profiler-inl.h b/src/profiler/cpu-profiler-inl.h
index d8c9c909c292390b9a288a1812824115cc4ec6c4..50acb76a33b2c4ed69e865776fd1d0223a561790 100644
--- a/src/profiler/cpu-profiler-inl.h
+++ b/src/profiler/cpu-profiler-inl.h
@@ -71,6 +71,10 @@ TickSample* ProfilerEventsProcessor::StartTickSample() {
void ProfilerEventsProcessor::FinishTickSample() {
+ TickSampleEventRecord* evt = ticks_buffer_.CurrentEnqueue();
+ evt->timestamp = evt->sample.pc == nullptr
alph 2016/06/29 19:39:09 It's not its business. FinishTickSample should not
lpy 2016/06/29 20:17:39 Since I remove the timestamp from TickSample, I th
+ ? base::TimeTicks()
+ : base::TimeTicks::HighResolutionNow();
ticks_buffer_.FinishEnqueue();
}

Powered by Google App Engine
This is Rietveld 408576698