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

Unified Diff: tools/profile.js

Issue 802333002: Profiler improvements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated test expectations; improved tickprocessor tests failure output Created 5 years, 11 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 | « tools/logreader.js ('k') | tools/tickprocessor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profile.js
diff --git a/tools/profile.js b/tools/profile.js
index a06cd3a5ff0fff19232fee60bf78e5ba2a7a1129..f0814a2f0d9cc3303cf5ae8f5633058a1e7243cd 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -257,26 +257,28 @@ Profile.prototype.resolveAndFilterFuncs_ = function(stack) {
var entry = this.codeMap_.findEntry(stack[i]);
if (entry) {
var name = entry.getName();
- if (i == 0 && (entry.type == 'CPP' || entry.type == 'SHARED_LIB')) {
+ if (i === 0 && (entry.type === 'CPP' || entry.type === 'SHARED_LIB')) {
look_for_first_c_function = true;
}
- if (look_for_first_c_function) {
- if (entry.type == 'CPP') {
- last_seen_c_function = name;
- } else if (i > 0 && last_seen_c_function != '') {
- if (this.c_entries_[last_seen_c_function] === undefined) {
- this.c_entries_[last_seen_c_function] = 0;
- }
- this.c_entries_[last_seen_c_function]++;
- look_for_first_c_function = false; // Found it, we're done.
- }
+ if (look_for_first_c_function && entry.type === 'CPP') {
+ last_seen_c_function = name;
}
if (!this.skipThisFunction(name)) {
result.push(name);
}
} else {
- this.handleUnknownCode(
- Profile.Operation.TICK, stack[i], i);
+ this.handleUnknownCode(Profile.Operation.TICK, stack[i], i);
+ if (i === 0) result.push("UNKNOWN");
+ }
+ if (look_for_first_c_function &&
+ i > 0 &&
+ (!entry || entry.type !== 'CPP') &&
+ last_seen_c_function !== '') {
+ if (this.c_entries_[last_seen_c_function] === undefined) {
+ this.c_entries_[last_seen_c_function] = 0;
+ }
+ this.c_entries_[last_seen_c_function]++;
+ look_for_first_c_function = false; // Found it, we're done.
}
}
return result;
« no previous file with comments | « tools/logreader.js ('k') | tools/tickprocessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698