Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index 51d29423c4e8592b8d7afd032cf70b616cba7cef..a31c03ef6e0388e7042a32d8857e8f6a3c4f7ae4 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -29,6 +29,7 @@ |
#include "cpu-profiler-inl.h" |
+#include "compiler.h" |
#include "frames-inl.h" |
#include "hashmap.h" |
#include "log-inl.h" |
@@ -80,7 +81,8 @@ void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
int line_number, |
Address start, |
unsigned size, |
- Address shared) { |
+ Address shared, |
+ CompilationInfo* info) { |
if (FilterOutCodeCreateEvent(tag)) return; |
CodeEventsContainer evt_rec; |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
@@ -88,6 +90,10 @@ void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
rec->order = ++enqueue_order_; |
rec->start = start; |
rec->entry = profiles_->NewCodeEntry(tag, name, resource_name, line_number); |
+ if (info) { |
+ rec->entry->set_frame_setup_offset(info->prologue_offset()); |
+ rec->entry->set_frame_destroy_offset(info->frame_destroy_offset()); |
+ } |
rec->size = size; |
rec->shared = shared; |
events_buffer_.Enqueue(evt_rec); |
@@ -323,6 +329,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
v8::CpuProfileNode::kNoLineNumberInfo, |
code->address(), |
code->ExecutableSize(), |
+ NULL, |
NULL); |
} |
@@ -330,6 +337,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
Code* code, |
SharedFunctionInfo* shared, |
+ CompilationInfo* info, |
Name* name) { |
processor_->CodeCreateEvent( |
tag, |
@@ -338,13 +346,15 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
v8::CpuProfileNode::kNoLineNumberInfo, |
code->address(), |
code->ExecutableSize(), |
- shared->address()); |
+ shared->address(), |
+ info); |
} |
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
Code* code, |
SharedFunctionInfo* shared, |
+ CompilationInfo* info, |
String* source, int line) { |
processor_->CodeCreateEvent( |
tag, |
@@ -353,7 +363,8 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
line, |
code->address(), |
code->ExecutableSize(), |
- shared->address()); |
+ shared->address(), |
+ info); |
} |
@@ -496,6 +507,7 @@ CpuProfile* CpuProfiler::StopProfiling(Object* security_token, String* title) { |
void CpuProfiler::StopProcessorIfLastProfile(const char* title) { |
+ printf("CompilationInfo size = %lu\n", sizeof(CompilationInfo)); |
loislo
2013/04/26 13:36:56
please remove that
loislo
2013/04/26 13:36:56
please remove that
yurys
2013/04/26 13:43:51
Done.
yurys
2013/04/26 13:43:51
Done.
|
if (profiles_->IsLastProfile(title)) StopProcessor(); |
} |