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

Unified Diff: src/profile-generator.cc

Issue 1332683002: Profiler code clean-up (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.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 3cb3fa40b6b6e0757afda1aa69ff3c6c8d3c02f1..aefc52a96f15dbd26617742ad33d7dc2f3ad6f8b 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -405,15 +405,12 @@ void CodeMap::DeleteAllCoveredCode(Address start, Address end) {
}
-CodeEntry* CodeMap::FindEntry(Address addr, Address* start) {
+CodeEntry* CodeMap::FindEntry(Address addr) {
CodeTree::Locator locator;
if (tree_.FindGreatestLessThan(addr, &locator)) {
// locator.key() <= addr. Need to check that addr is within entry.
const CodeEntryInfo& entry = locator.value();
if (addr < (locator.key() + entry.size)) {
- if (start) {
- *start = locator.key();
- }
return entry.entry;
}
}
@@ -601,8 +598,7 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
// that a callback calls itself.
*entry++ = code_map_.FindEntry(sample.external_callback);
} else {
- Address start;
- CodeEntry* pc_entry = code_map_.FindEntry(sample.pc, &start);
+ CodeEntry* pc_entry = code_map_.FindEntry(sample.pc);
// If there is no pc_entry we're likely in native code.
// Find out, if top of stack was pointing inside a JS function
// meaning that we have encountered a frameless invocation.
@@ -651,8 +647,7 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
*stack_end = stack_pos + sample.frames_count;
stack_pos != stack_end;
++stack_pos) {
- Address start = NULL;
- *entry = code_map_.FindEntry(*stack_pos, &start);
+ *entry = code_map_.FindEntry(*stack_pos);
// Skip unresolved frames (e.g. internal frame) and get source line of
// the first JS caller.
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698