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

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

Issue 3531005: Fix HeapSnapshotsDiff test, diff implementation, and a bug introduced (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 HeapSnapshot(HeapSnapshotsCollection* collection, 655 HeapSnapshot(HeapSnapshotsCollection* collection,
656 Type type, 656 Type type,
657 const char* title, 657 const char* title,
658 unsigned uid); 658 unsigned uid);
659 ~HeapSnapshot(); 659 ~HeapSnapshot();
660 660
661 HeapSnapshotsCollection* collection() { return collection_; } 661 HeapSnapshotsCollection* collection() { return collection_; }
662 Type type() { return type_; } 662 Type type() { return type_; }
663 const char* title() { return title_; } 663 const char* title() { return title_; }
664 unsigned uid() { return uid_; } 664 unsigned uid() { return uid_; }
665 HeapEntry* root() { return entries_[root_entry_index_]; } 665 HeapEntry* root() { return root_entry_; }
666 666
667 void AllocateEntries( 667 void AllocateEntries(
668 int entries_count, int children_count, int retainers_count); 668 int entries_count, int children_count, int retainers_count);
669 HeapEntry* AddEntry( 669 HeapEntry* AddEntry(
670 HeapObject* object, int children_count, int retainers_count); 670 HeapObject* object, int children_count, int retainers_count);
671 bool WillAddEntry(HeapObject* object); 671 bool WillAddEntry(HeapObject* object);
672 HeapEntry* AddEntry(HeapEntry::Type type, 672 HeapEntry* AddEntry(HeapEntry::Type type,
673 const char* name, 673 const char* name,
674 uint64_t id, 674 uint64_t id,
675 int size, 675 int size,
(...skipping 21 matching lines...) Expand all
697 int children_count, 697 int children_count,
698 int retainers_count); 698 int retainers_count);
699 HeapEntry* GetNextEntryToInit(); 699 HeapEntry* GetNextEntryToInit();
700 static int GetObjectSize(HeapObject* obj); 700 static int GetObjectSize(HeapObject* obj);
701 static int CalculateNetworkSize(JSObject* obj); 701 static int CalculateNetworkSize(JSObject* obj);
702 702
703 HeapSnapshotsCollection* collection_; 703 HeapSnapshotsCollection* collection_;
704 Type type_; 704 Type type_;
705 const char* title_; 705 const char* title_;
706 unsigned uid_; 706 unsigned uid_;
707 int root_entry_index_; 707 HeapEntry* root_entry_;
708 char* raw_entries_; 708 char* raw_entries_;
709 List<HeapEntry*> entries_; 709 List<HeapEntry*> entries_;
710 bool entries_sorted_; 710 bool entries_sorted_;
711 List<HeapEntryCalculatedData> calculated_data_; 711 List<HeapEntryCalculatedData> calculated_data_;
712 #ifdef DEBUG 712 #ifdef DEBUG
713 int raw_entries_size_; 713 int raw_entries_size_;
714 #endif 714 #endif
715 715
716 friend class HeapSnapshotTester; 716 friend class HeapSnapshotTester;
717 717
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 friend class HeapSnapshotJSONSerializerIterator; 1024 friend class HeapSnapshotJSONSerializerIterator;
1025 1025
1026 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 1026 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
1027 }; 1027 };
1028 1028
1029 } } // namespace v8::internal 1029 } } // namespace v8::internal
1030 1030
1031 #endif // ENABLE_LOGGING_AND_PROFILING 1031 #endif // ENABLE_LOGGING_AND_PROFILING
1032 1032
1033 #endif // V8_PROFILE_GENERATOR_H_ 1033 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698