OLD | NEW |
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 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 obj != NULL; | 2378 obj != NULL; |
2379 obj = iterator.next(), IncProgressCounter()) { | 2379 obj = iterator.next(), IncProgressCounter()) { |
2380 if (!interrupted) { | 2380 if (!interrupted) { |
2381 ExtractReferences(obj); | 2381 ExtractReferences(obj); |
2382 if (!ReportProgress()) interrupted = true; | 2382 if (!ReportProgress()) interrupted = true; |
2383 } | 2383 } |
2384 } | 2384 } |
2385 if (interrupted) return false; | 2385 if (interrupted) return false; |
2386 SetRootGcRootsReference(); | 2386 SetRootGcRootsReference(); |
2387 RootsReferencesExtractor extractor(this); | 2387 RootsReferencesExtractor extractor(this); |
2388 Heap::IterateRoots(&extractor, VISIT_ONLY_STRONG); | 2388 Heap::IterateRoots(&extractor, VISIT_ALL); |
2389 return ReportProgress(); | 2389 return ReportProgress(); |
2390 } | 2390 } |
2391 | 2391 |
2392 | 2392 |
2393 void HeapSnapshotsDiff::CreateRoots(int additions_count, int deletions_count) { | 2393 void HeapSnapshotsDiff::CreateRoots(int additions_count, int deletions_count) { |
2394 raw_additions_root_ = | 2394 raw_additions_root_ = |
2395 NewArray<char>(HeapEntry::EntriesSize(1, additions_count, 0)); | 2395 NewArray<char>(HeapEntry::EntriesSize(1, additions_count, 0)); |
2396 additions_root()->Init( | 2396 additions_root()->Init( |
2397 snapshot2_, HeapEntry::kHidden, "", 0, 0, additions_count, 0); | 2397 snapshot2_, HeapEntry::kHidden, "", 0, 0, additions_count, 0); |
2398 raw_deletions_root_ = | 2398 raw_deletions_root_ = |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2833 | 2833 |
2834 | 2834 |
2835 String* GetConstructorNameForHeapProfile(JSObject* object) { | 2835 String* GetConstructorNameForHeapProfile(JSObject* object) { |
2836 if (object->IsJSFunction()) return Heap::closure_symbol(); | 2836 if (object->IsJSFunction()) return Heap::closure_symbol(); |
2837 return object->constructor_name(); | 2837 return object->constructor_name(); |
2838 } | 2838 } |
2839 | 2839 |
2840 } } // namespace v8::internal | 2840 } } // namespace v8::internal |
2841 | 2841 |
2842 #endif // ENABLE_LOGGING_AND_PROFILING | 2842 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |