| OLD | NEW |
| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 logger->TearDownProfilerListener(); | 363 logger->TearDownProfilerListener(); |
| 364 processor_.reset(); | 364 processor_.reset(); |
| 365 generator_.reset(); | 365 generator_.reset(); |
| 366 logger->is_logging_ = saved_is_logging_; | 366 logger->is_logging_ = saved_is_logging_; |
| 367 } | 367 } |
| 368 | 368 |
| 369 | 369 |
| 370 void CpuProfiler::LogBuiltins() { | 370 void CpuProfiler::LogBuiltins() { |
| 371 Builtins* builtins = isolate_->builtins(); | 371 Builtins* builtins = isolate_->builtins(); |
| 372 DCHECK(builtins->is_initialized()); | 372 DCHECK(builtins->is_initialized()); |
| 373 for (int i = 0; i < Builtins::builtin_count; i++) { | 373 for (int i = 0; i < Builtins::BUILTIN_COUNT; i++) { |
| 374 CodeEventsContainer evt_rec(CodeEventRecord::REPORT_BUILTIN); | 374 CodeEventsContainer evt_rec(CodeEventRecord::REPORT_BUILTIN); |
| 375 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 375 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
| 376 Builtins::Name id = static_cast<Builtins::Name>(i); | 376 Builtins::Name id = static_cast<Builtins::Name>(i); |
| 377 rec->start = builtins->builtin(id)->address(); | 377 rec->start = builtins->builtin(id)->address(); |
| 378 rec->builtin_id = id; | 378 rec->builtin_id = id; |
| 379 processor_->Enqueue(evt_rec); | 379 processor_->Enqueue(evt_rec); |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 | 382 |
| 383 } // namespace internal | 383 } // namespace internal |
| 384 } // namespace v8 | 384 } // namespace v8 |
| OLD | NEW |