Chromium Code Reviews| 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 6063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6074 if (mode != VISIT_ALL_IN_SCAVENGE && | 6074 if (mode != VISIT_ALL_IN_SCAVENGE && |
| 6075 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { | 6075 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { |
| 6076 // Scavenge collections have special processing for this. | 6076 // Scavenge collections have special processing for this. |
| 6077 external_string_table_.Iterate(v); | 6077 external_string_table_.Iterate(v); |
| 6078 } | 6078 } |
| 6079 v->Synchronize(VisitorSynchronization::kExternalStringsTable); | 6079 v->Synchronize(VisitorSynchronization::kExternalStringsTable); |
| 6080 } | 6080 } |
| 6081 | 6081 |
| 6082 | 6082 |
| 6083 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { | 6083 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { |
| 6084 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); | 6084 { // Avoid race with interrupts that set the stack limit on the root list. |
| 6085 // Note that GC does not actually care about the value of the stack limit | |
| 6086 // as long as it is a smi. We may want to revisit this if this causes | |
| 6087 // performance regressions by blocking the optimizing compiler thread. | |
| 6088 ExecutionAccess access(isolate()); | |
|
Michael Starzinger
2014/02/07 10:24:50
As discussed offline: This seems very much like a
| |
| 6089 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); | |
| 6090 } | |
| 6085 v->Synchronize(VisitorSynchronization::kStrongRootList); | 6091 v->Synchronize(VisitorSynchronization::kStrongRootList); |
| 6086 | 6092 |
| 6087 v->VisitPointer(BitCast<Object**>(&hidden_string_)); | 6093 v->VisitPointer(BitCast<Object**>(&hidden_string_)); |
| 6088 v->Synchronize(VisitorSynchronization::kInternalizedString); | 6094 v->Synchronize(VisitorSynchronization::kInternalizedString); |
| 6089 | 6095 |
| 6090 isolate_->bootstrapper()->Iterate(v); | 6096 isolate_->bootstrapper()->Iterate(v); |
| 6091 v->Synchronize(VisitorSynchronization::kBootstrapper); | 6097 v->Synchronize(VisitorSynchronization::kBootstrapper); |
| 6092 isolate_->Iterate(v); | 6098 isolate_->Iterate(v); |
| 6093 v->Synchronize(VisitorSynchronization::kTop); | 6099 v->Synchronize(VisitorSynchronization::kTop); |
| 6094 Relocatable::Iterate(isolate_, v); | 6100 Relocatable::Iterate(isolate_, v); |
| (...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7662 static_cast<int>(object_sizes_last_time_[index])); | 7668 static_cast<int>(object_sizes_last_time_[index])); |
| 7663 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7669 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7664 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7670 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7665 | 7671 |
| 7666 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7672 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7667 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7673 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7668 ClearObjectStats(); | 7674 ClearObjectStats(); |
| 7669 } | 7675 } |
| 7670 | 7676 |
| 7671 } } // namespace v8::internal | 7677 } } // namespace v8::internal |
| OLD | NEW |