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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some cleanup Created 7 years, 6 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 ExtractScriptReferences(entry, Script::cast(obj)); 974 ExtractScriptReferences(entry, Script::cast(obj));
975 } else if (obj->IsCodeCache()) { 975 } else if (obj->IsCodeCache()) {
976 ExtractCodeCacheReferences(entry, CodeCache::cast(obj)); 976 ExtractCodeCacheReferences(entry, CodeCache::cast(obj));
977 } else if (obj->IsCode()) { 977 } else if (obj->IsCode()) {
978 ExtractCodeReferences(entry, Code::cast(obj)); 978 ExtractCodeReferences(entry, Code::cast(obj));
979 } else if (obj->IsJSGlobalPropertyCell()) { 979 } else if (obj->IsJSGlobalPropertyCell()) {
980 ExtractJSGlobalPropertyCellReferences( 980 ExtractJSGlobalPropertyCellReferences(
981 entry, JSGlobalPropertyCell::cast(obj)); 981 entry, JSGlobalPropertyCell::cast(obj));
982 extract_indexed_refs = false; 982 extract_indexed_refs = false;
983 } 983 }
984
984 if (extract_indexed_refs) { 985 if (extract_indexed_refs) {
985 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); 986 SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset);
986 IndexedReferencesExtractor refs_extractor(this, obj, entry); 987 IndexedReferencesExtractor refs_extractor(this, obj, entry);
987 obj->Iterate(&refs_extractor); 988 obj->Iterate(&refs_extractor);
988 } 989 }
989 } 990 }
990 991
991 992
992 void V8HeapExplorer::ExtractJSGlobalProxyReferences(JSGlobalProxy* proxy) { 993 void V8HeapExplorer::ExtractJSGlobalProxyReferences(JSGlobalProxy* proxy) {
993 // We need to reference JS global objects from snapshot's root. 994 // We need to reference JS global objects from snapshot's root.
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 2655
2655 2656
2656 void HeapSnapshotJSONSerializer::SortHashMap( 2657 void HeapSnapshotJSONSerializer::SortHashMap(
2657 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 2658 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
2658 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 2659 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
2659 sorted_entries->Add(p); 2660 sorted_entries->Add(p);
2660 sorted_entries->Sort(SortUsingEntryValue); 2661 sorted_entries->Sort(SortUsingEntryValue);
2661 } 2662 }
2662 2663
2663 } } // namespace v8::internal 2664 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698