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

Unified Diff: src/profile-generator.cc

Issue 422593003: Initial GetSample implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added test to verify the pc values in obtained sample. Created 6 years, 3 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
« include/v8.h ('K') | « src/log.cc ('k') | src/sampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 945bdd6cc12f5ea883ea6a30a12c24f938b81de2..aa01026a7177624484b72f8686481640e26edfe4 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -628,11 +628,8 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
}
}
- for (const Address* stack_pos = sample.stack,
- *stack_end = stack_pos + sample.frames_count;
- stack_pos != stack_end;
- ++stack_pos) {
- *entry++ = code_map_.FindEntry(*stack_pos);
+ for (unsigned i = 0; i < sample.frames_count; ++i) {
+ *entry++ = code_map_.FindEntry(static_cast<Address>(sample.stack[i]));
}
}
« include/v8.h ('K') | « src/log.cc ('k') | src/sampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698