Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/tools/profile.js b/tools/profile.js
index a06cd3a..f0814a2 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -257,26 +257,28 @@
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;