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

Side by Side 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: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/profile-generator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 CodeTree::Locator locator; 564 CodeTree::Locator locator;
565 if (!tree_.Find(from, &locator)) return; 565 if (!tree_.Find(from, &locator)) return;
566 CodeEntryInfo entry = locator.value(); 566 CodeEntryInfo entry = locator.value();
567 tree_.Remove(from); 567 tree_.Remove(from);
568 AddCode(to, entry.entry, entry.size); 568 AddCode(to, entry.entry, entry.size);
569 } 569 }
570 570
571 571
572 void CodeMap::CodeTreePrinter::Call( 572 void CodeMap::CodeTreePrinter::Call(
573 const Address& key, const CodeMap::CodeEntryInfo& value) { 573 const Address& key, const CodeMap::CodeEntryInfo& value) {
574 OS::Print("%p %5d %s\n", key, value.size, value.entry->name()); 574 // For shared function entries, 'size' field is used to store their IDs.
575 if (value.entry == kSharedFunctionCodeEntry)
576 OS::Print("%p SharedFunctionInfo %d\n", key, value.size);
Jakob Kummerow 2013/04/24 12:00:41 nit: {} please.
yurys 2013/04/24 12:07:42 Done. WebKit habbit:)
577 else
578 OS::Print("%p %5d %s\n", key, value.size, value.entry->name());
575 } 579 }
576 580
577 581
578 void CodeMap::Print() { 582 void CodeMap::Print() {
579 CodeTreePrinter printer; 583 CodeTreePrinter printer;
580 tree_.ForEach(&printer); 584 tree_.ForEach(&printer);
581 } 585 }
582 586
583 587
584 CpuProfilesCollection::CpuProfilesCollection() 588 CpuProfilesCollection::CpuProfilesCollection()
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 if (no_symbolized_entries) { 927 if (no_symbolized_entries) {
924 *entry++ = EntryForVMState(sample.state); 928 *entry++ = EntryForVMState(sample.state);
925 } 929 }
926 } 930 }
927 931
928 profiles_->AddPathToCurrentProfiles(entries); 932 profiles_->AddPathToCurrentProfiles(entries);
929 } 933 }
930 934
931 935
932 } } // namespace v8::internal 936 } } // namespace v8::internal
OLDNEW
« 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