Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index b6cfbc5caee60e05abbfcd71954a8a852284dee6..270da8fc9774ec88484d4ec1c19260baaef9985b 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -446,6 +446,7 @@ void CpuProfiler::StartProcessorIfNotStarted() { |
} |
logger->LogCompiledFunctions(); |
logger->LogAccessorCallbacks(); |
+ LogBuiltins(); |
// Enable stack sampling. |
Sampler* sampler = logger->sampler(); |
sampler->IncreaseProfilingDepth(); |
@@ -506,4 +507,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 |