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

Side by Side Diff: src/profiler/cpu-profiler.cc

Issue 2950543002: Add StartProfiling to filter out v8 warm up (Closed)
Patch Set: Add StartProfiling to filter out v8 warm up Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/profiler/cpu-profiler.h" 5 #include "src/profiler/cpu-profiler.h"
6 6
7 #include "src/debug/debug.h" 7 #include "src/debug/debug.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/locked-queue-inl.h" 10 #include "src/locked-queue-inl.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 void CpuProfiler::CollectSample() { 295 void CpuProfiler::CollectSample() {
296 if (processor_) { 296 if (processor_) {
297 processor_->AddCurrentStack(isolate_); 297 processor_->AddCurrentStack(isolate_);
298 } 298 }
299 } 299 }
300 300
301 void CpuProfiler::StartProfiling(const char* title, bool record_samples) { 301 void CpuProfiler::StartProfiling(const char* title, bool record_samples) {
302 if (profiles_->StartProfiling(title, record_samples)) { 302 if (profiles_->StartProfiling(title, record_samples)) {
303 TRACE_EVENT0("v8", "CpuProfiler::StartProfiling");
303 StartProcessorIfNotStarted(); 304 StartProcessorIfNotStarted();
304 } 305 }
305 } 306 }
306 307
307 308
308 void CpuProfiler::StartProfiling(String* title, bool record_samples) { 309 void CpuProfiler::StartProfiling(String* title, bool record_samples) {
309 StartProfiling(profiles_->GetName(title), record_samples); 310 StartProfiling(profiles_->GetName(title), record_samples);
310 isolate_->debug()->feature_tracker()->Track(DebugFeatureTracker::kProfiler); 311 isolate_->debug()->feature_tracker()->Track(DebugFeatureTracker::kProfiler);
311 } 312 }
312 313
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 380 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
380 Builtins::Name id = static_cast<Builtins::Name>(i); 381 Builtins::Name id = static_cast<Builtins::Name>(i);
381 rec->start = builtins->builtin(id)->address(); 382 rec->start = builtins->builtin(id)->address();
382 rec->builtin_id = id; 383 rec->builtin_id = id;
383 processor_->Enqueue(evt_rec); 384 processor_->Enqueue(evt_rec);
384 } 385 }
385 } 386 }
386 387
387 } // namespace internal 388 } // namespace internal
388 } // namespace v8 389 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698