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

Unified Diff: src/profile-generator.cc

Issue 14387004: Fix segmentation fault in CodeMap::Print (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment 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/profile-generator.h ('k') | no next file » | 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 837faa0c84cdcc938354c15892ae63d71a46c07e..b1b163b50ecdf2d59173eef568c84878fb50becf 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -571,7 +571,12 @@ void CodeMap::MoveCode(Address from, Address to) {
void CodeMap::CodeTreePrinter::Call(
const Address& key, const CodeMap::CodeEntryInfo& value) {
- OS::Print("%p %5d %s\n", key, value.size, value.entry->name());
+ // For shared function entries, 'size' field is used to store their IDs.
+ if (value.entry == kSharedFunctionCodeEntry) {
+ OS::Print("%p SharedFunctionInfo %d\n", key, value.size);
+ } else {
+ OS::Print("%p %5d %s\n", key, value.size, value.entry->name());
+ }
}
« no previous file with comments | « src/profile-generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698