OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3100 ASSERT(!debug_heap->old_pointer_space()->was_swept_conservatively()); | 3100 ASSERT(!debug_heap->old_pointer_space()->was_swept_conservatively()); |
3101 ASSERT(!debug_heap->code_space()->was_swept_conservatively()); | 3101 ASSERT(!debug_heap->code_space()->was_swept_conservatively()); |
3102 ASSERT(!debug_heap->cell_space()->was_swept_conservatively()); | 3102 ASSERT(!debug_heap->cell_space()->was_swept_conservatively()); |
3103 ASSERT(!debug_heap->map_space()->was_swept_conservatively()); | 3103 ASSERT(!debug_heap->map_space()->was_swept_conservatively()); |
3104 #endif | 3104 #endif |
3105 | 3105 |
3106 // The following code uses heap iterators, so we want the heap to be | 3106 // The following code uses heap iterators, so we want the heap to be |
3107 // stable. It should follow TagGlobalObjects as that can allocate. | 3107 // stable. It should follow TagGlobalObjects as that can allocate. |
3108 AssertNoAllocation no_alloc; | 3108 AssertNoAllocation no_alloc; |
3109 | 3109 |
3110 #ifdef DEBUG | 3110 #ifdef VERIFY_HEAP |
3111 debug_heap->Verify(); | 3111 debug_heap->Verify(); |
3112 #endif | 3112 #endif |
3113 | 3113 |
3114 SetProgressTotal(1); // 1 pass. | 3114 SetProgressTotal(1); // 1 pass. |
3115 | 3115 |
3116 #ifdef DEBUG | 3116 #ifdef VERIFY_HEAP |
3117 debug_heap->Verify(); | 3117 debug_heap->Verify(); |
3118 #endif | 3118 #endif |
3119 | 3119 |
3120 if (!FillReferences()) return false; | 3120 if (!FillReferences()) return false; |
3121 | 3121 |
3122 snapshot_->FillChildren(); | 3122 snapshot_->FillChildren(); |
3123 snapshot_->RememberLastJSObjectId(); | 3123 snapshot_->RememberLastJSObjectId(); |
3124 | 3124 |
3125 progress_counter_ = progress_total_; | 3125 progress_counter_ = progress_total_; |
3126 if (!ProgressReport(true)) return false; | 3126 if (!ProgressReport(true)) return false; |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3578 | 3578 |
3579 | 3579 |
3580 void HeapSnapshotJSONSerializer::SortHashMap( | 3580 void HeapSnapshotJSONSerializer::SortHashMap( |
3581 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 3581 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
3582 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 3582 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
3583 sorted_entries->Add(p); | 3583 sorted_entries->Add(p); |
3584 sorted_entries->Sort(SortUsingEntryValue); | 3584 sorted_entries->Sort(SortUsingEntryValue); |
3585 } | 3585 } |
3586 | 3586 |
3587 } } // namespace v8::internal | 3587 } } // namespace v8::internal |
OLD | NEW |