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

Unified Diff: src/cpu-profiler.cc

Issue 14253015: Skip samples where top function's stack frame is not setup properly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reverted build/common.gypi Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cpu-profiler.h ('k') | src/log.h » ('j') | src/profile-generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « src/cpu-profiler.h ('k') | src/log.h » ('j') | src/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698