Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index e75e05d985f80c3a5dfdd77ae55bb4cc184e4b71..be64dd77ac93c041e919799b901aaf2709cb1556 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -454,6 +454,7 @@ void CpuProfiler::StartProcessorIfNotStarted() { |
} |
logger->LogCompiledFunctions(); |
logger->LogAccessorCallbacks(); |
+ LogBuiltins(); |
// Enable stack sampling. |
Sampler* sampler = logger->sampler(); |
sampler->IncreaseProfilingDepth(); |
@@ -514,4 +515,18 @@ void CpuProfiler::StopProcessor() { |
} |
+void CpuProfiler::LogBuiltins() { |
+ Builtins* builtins = isolate_->builtins(); |
+ ASSERT(builtins->is_initialized()); |
+ for (int i = 0; i < Builtins::builtin_count; i++) { |
+ CodeEventsContainer evt_rec(CodeEventRecord::REPORT_BUILTIN); |
+ ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
+ Builtins::Name id = static_cast<Builtins::Name>(i); |
+ rec->start = builtins->builtin(id)->address(); |
+ rec->builtin_id = id; |
+ processor_->Enqueue(evt_rec); |
+ } |
+} |
+ |
+ |
} } // namespace v8::internal |