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

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

Issue 7639020: Perform TODO(gc) cleanup for TODO-lockdown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 4 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 private: 2691 private:
2692 HeapSnapshot* snapshot_; 2692 HeapSnapshot* snapshot_;
2693 HeapSnapshotsCollection* collection_; 2693 HeapSnapshotsCollection* collection_;
2694 HeapEntriesMap* entries_; 2694 HeapEntriesMap* entries_;
2695 }; 2695 };
2696 2696
2697 2697
2698 bool HeapSnapshotGenerator::GenerateSnapshot() { 2698 bool HeapSnapshotGenerator::GenerateSnapshot() {
2699 v8_heap_explorer_.TagGlobalObjects(); 2699 v8_heap_explorer_.TagGlobalObjects();
2700 2700
2701 // TODO(gc) Profiler assumes that any object that is in the heap after 2701 // TODO(1562) Profiler assumes that any object that is in the heap after
2702 // full GC is reachable from the root when computing dominators. 2702 // full GC is reachable from the root when computing dominators.
2703 // This is not true for weakly reachable objects. 2703 // This is not true for weakly reachable objects.
2704 // As a temporary solution we call GC twice. 2704 // As a temporary solution we call GC twice.
2705 Isolate::Current()->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask); 2705 Isolate::Current()->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask);
2706 Isolate::Current()->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask); 2706 Isolate::Current()->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask);
2707 2707
2708 // Iterator creation should follow TagGlobalObjects as it can allocate. 2708 // Iterator creation should follow TagGlobalObjects as it can allocate.
2709 HeapIterator set_progress_heap_iterator; 2709 HeapIterator set_progress_heap_iterator;
2710 HeapIterator count_entries_heap_iterator; 2710 HeapIterator count_entries_heap_iterator;
2711 HeapIterator fill_references_heap_iterator; 2711 HeapIterator fill_references_heap_iterator;
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
3272 sorted_entries->Sort(SortUsingEntryValue); 3272 sorted_entries->Sort(SortUsingEntryValue);
3273 } 3273 }
3274 3274
3275 3275
3276 String* GetConstructorNameForHeapProfile(JSObject* object) { 3276 String* GetConstructorNameForHeapProfile(JSObject* object) {
3277 if (object->IsJSFunction()) return HEAP->closure_symbol(); 3277 if (object->IsJSFunction()) return HEAP->closure_symbol();
3278 return object->constructor_name(); 3278 return object->constructor_name();
3279 } 3279 }
3280 3280
3281 } } // namespace v8::internal 3281 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698