| OLD | NEW |
| 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 Loading... |
| 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); |
| 577 } else { |
| 578 OS::Print("%p %5d %s\n", key, value.size, value.entry->name()); |
| 579 } |
| 575 } | 580 } |
| 576 | 581 |
| 577 | 582 |
| 578 void CodeMap::Print() { | 583 void CodeMap::Print() { |
| 579 CodeTreePrinter printer; | 584 CodeTreePrinter printer; |
| 580 tree_.ForEach(&printer); | 585 tree_.ForEach(&printer); |
| 581 } | 586 } |
| 582 | 587 |
| 583 | 588 |
| 584 CpuProfilesCollection::CpuProfilesCollection() | 589 CpuProfilesCollection::CpuProfilesCollection() |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 if (no_symbolized_entries) { | 928 if (no_symbolized_entries) { |
| 924 *entry++ = EntryForVMState(sample.state); | 929 *entry++ = EntryForVMState(sample.state); |
| 925 } | 930 } |
| 926 } | 931 } |
| 927 | 932 |
| 928 profiles_->AddPathToCurrentProfiles(entries); | 933 profiles_->AddPathToCurrentProfiles(entries); |
| 929 } | 934 } |
| 930 | 935 |
| 931 | 936 |
| 932 } } // namespace v8::internal | 937 } } // namespace v8::internal |
| OLD | NEW |