| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #include "src/v8.h" |     5 #include "src/v8.h" | 
|     6  |     6  | 
|     7 #include "src/accessors.h" |     7 #include "src/accessors.h" | 
|     8 #include "src/api.h" |     8 #include "src/api.h" | 
|     9 #include "src/base/bits.h" |     9 #include "src/base/bits.h" | 
|    10 #include "src/base/once.h" |    10 #include "src/base/once.h" | 
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   729 } |   729 } | 
|   730  |   730  | 
|   731  |   731  | 
|   732 void Heap::HandleGCRequest() { |   732 void Heap::HandleGCRequest() { | 
|   733   if (incremental_marking()->request_type() == |   733   if (incremental_marking()->request_type() == | 
|   734       IncrementalMarking::COMPLETE_MARKING) { |   734       IncrementalMarking::COMPLETE_MARKING) { | 
|   735     CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt"); |   735     CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt"); | 
|   736     return; |   736     return; | 
|   737   } |   737   } | 
|   738   DCHECK(FLAG_overapproximate_weak_closure); |   738   DCHECK(FLAG_overapproximate_weak_closure); | 
|   739   DCHECK(!incremental_marking()->weak_closure_was_overapproximated()); |   739   if (!incremental_marking()->weak_closure_was_overapproximated()) { | 
|   740   OverApproximateWeakClosure("GC interrupt"); |   740     OverApproximateWeakClosure("GC interrupt"); | 
 |   741   } | 
|   741 } |   742 } | 
|   742  |   743  | 
|   743  |   744  | 
|   744 void Heap::OverApproximateWeakClosure(const char* gc_reason) { |   745 void Heap::OverApproximateWeakClosure(const char* gc_reason) { | 
|   745   if (FLAG_trace_incremental_marking) { |   746   if (FLAG_trace_incremental_marking) { | 
|   746     PrintF("[IncrementalMarking] Overapproximate weak closure (%s).\n", |   747     PrintF("[IncrementalMarking] Overapproximate weak closure (%s).\n", | 
|   747            gc_reason); |   748            gc_reason); | 
|   748   } |   749   } | 
|   749  |   750  | 
|   750   GCTracer::Scope gc_scope(tracer(), |   751   GCTracer::Scope gc_scope(tracer(), | 
| (...skipping 5632 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6383       static_cast<int>(object_sizes_last_time_[index])); |  6384       static_cast<int>(object_sizes_last_time_[index])); | 
|  6384   CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |  6385   CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 
|  6385 #undef ADJUST_LAST_TIME_OBJECT_COUNT |  6386 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 
|  6386  |  6387  | 
|  6387   MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |  6388   MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 
|  6388   MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |  6389   MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 
|  6389   ClearObjectStats(); |  6390   ClearObjectStats(); | 
|  6390 } |  6391 } | 
|  6391 } |  6392 } | 
|  6392 }  // namespace v8::internal |  6393 }  // namespace v8::internal | 
| OLD | NEW |