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

Side by Side Diff: src/profile-generator.h

Issue 8274031: Merge r9430, r9433 and r9508 into 3.5 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.5/
Patch Set: '' Created 9 years, 2 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/parser.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 const char* name, 577 const char* name,
578 HeapEntry* entry, 578 HeapEntry* entry,
579 int retainer_index); 579 int retainer_index);
580 void SetUnidirElementReference(int child_index, int index, HeapEntry* entry); 580 void SetUnidirElementReference(int child_index, int index, HeapEntry* entry);
581 581
582 int EntrySize() { return EntriesSize(1, children_count_, retainers_count_); } 582 int EntrySize() { return EntriesSize(1, children_count_, retainers_count_); }
583 int RetainedSize(bool exact); 583 int RetainedSize(bool exact);
584 584
585 void Print(int max_depth, int indent); 585 void Print(int max_depth, int indent);
586 586
587 Handle<HeapObject> GetHeapObject();
588
587 static int EntriesSize(int entries_count, 589 static int EntriesSize(int entries_count,
588 int children_count, 590 int children_count,
589 int retainers_count); 591 int retainers_count);
590 592
591 private: 593 private:
592 HeapGraphEdge* children_arr() { 594 HeapGraphEdge* children_arr() {
593 return reinterpret_cast<HeapGraphEdge*>(this + 1); 595 return reinterpret_cast<HeapGraphEdge*>(this + 1);
594 } 596 }
595 HeapGraphEdge** retainers_arr() { 597 HeapGraphEdge** retainers_arr() {
596 return reinterpret_cast<HeapGraphEdge**>(children_arr() + children_count_); 598 return reinterpret_cast<HeapGraphEdge**>(children_arr() + children_count_);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 HeapSnapshot::Type type, const char* name, unsigned uid); 757 HeapSnapshot::Type type, const char* name, unsigned uid);
756 void SnapshotGenerationFinished(HeapSnapshot* snapshot); 758 void SnapshotGenerationFinished(HeapSnapshot* snapshot);
757 List<HeapSnapshot*>* snapshots() { return &snapshots_; } 759 List<HeapSnapshot*>* snapshots() { return &snapshots_; }
758 HeapSnapshot* GetSnapshot(unsigned uid); 760 HeapSnapshot* GetSnapshot(unsigned uid);
759 void RemoveSnapshot(HeapSnapshot* snapshot); 761 void RemoveSnapshot(HeapSnapshot* snapshot);
760 762
761 StringsStorage* names() { return &names_; } 763 StringsStorage* names() { return &names_; }
762 TokenEnumerator* token_enumerator() { return token_enumerator_; } 764 TokenEnumerator* token_enumerator() { return token_enumerator_; }
763 765
764 uint64_t GetObjectId(Address addr) { return ids_.FindObject(addr); } 766 uint64_t GetObjectId(Address addr) { return ids_.FindObject(addr); }
767 Handle<HeapObject> FindHeapObjectById(uint64_t id);
765 void ObjectMoveEvent(Address from, Address to) { ids_.MoveObject(from, to); } 768 void ObjectMoveEvent(Address from, Address to) { ids_.MoveObject(from, to); }
766 769
767 private: 770 private:
768 INLINE(static bool HeapSnapshotsMatch(void* key1, void* key2)) { 771 INLINE(static bool HeapSnapshotsMatch(void* key1, void* key2)) {
769 return key1 == key2; 772 return key1 == key2;
770 } 773 }
771 774
772 bool is_tracking_objects_; // Whether tracking object moves is needed. 775 bool is_tracking_objects_; // Whether tracking object moves is needed.
773 List<HeapSnapshot*> snapshots_; 776 List<HeapSnapshot*> snapshots_;
774 // Mapping from snapshots' uids to HeapSnapshot* pointers. 777 // Mapping from snapshots' uids to HeapSnapshot* pointers.
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 1122
1120 friend class HeapSnapshotJSONSerializerEnumerator; 1123 friend class HeapSnapshotJSONSerializerEnumerator;
1121 friend class HeapSnapshotJSONSerializerIterator; 1124 friend class HeapSnapshotJSONSerializerIterator;
1122 1125
1123 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 1126 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
1124 }; 1127 };
1125 1128
1126 } } // namespace v8::internal 1129 } } // namespace v8::internal
1127 1130
1128 #endif // V8_PROFILE_GENERATOR_H_ 1131 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698