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 6143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6154 if (mode != VISIT_ALL_IN_SCAVENGE && | 6154 if (mode != VISIT_ALL_IN_SCAVENGE && |
6155 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { | 6155 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { |
6156 // Scavenge collections have special processing for this. | 6156 // Scavenge collections have special processing for this. |
6157 external_string_table_.Iterate(v); | 6157 external_string_table_.Iterate(v); |
6158 } | 6158 } |
6159 v->Synchronize(VisitorSynchronization::kExternalStringsTable); | 6159 v->Synchronize(VisitorSynchronization::kExternalStringsTable); |
6160 } | 6160 } |
6161 | 6161 |
6162 | 6162 |
6163 void Heap::IterateSmiRoots(ObjectVisitor* v) { | 6163 void Heap::IterateSmiRoots(ObjectVisitor* v) { |
| 6164 // Acquire execution access since we are going to read stack limit values. |
| 6165 ExecutionAccess access(isolate()); |
6164 v->VisitPointers(&roots_[kSmiRootsStart], &roots_[kRootListLength]); | 6166 v->VisitPointers(&roots_[kSmiRootsStart], &roots_[kRootListLength]); |
6165 v->Synchronize(VisitorSynchronization::kSmiRootList); | 6167 v->Synchronize(VisitorSynchronization::kSmiRootList); |
6166 } | 6168 } |
6167 | 6169 |
6168 | 6170 |
6169 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { | 6171 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { |
6170 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); | 6172 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); |
6171 v->Synchronize(VisitorSynchronization::kStrongRootList); | 6173 v->Synchronize(VisitorSynchronization::kStrongRootList); |
6172 | 6174 |
6173 v->VisitPointer(BitCast<Object**>(&hidden_string_)); | 6175 v->VisitPointer(BitCast<Object**>(&hidden_string_)); |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7748 static_cast<int>(object_sizes_last_time_[index])); | 7750 static_cast<int>(object_sizes_last_time_[index])); |
7749 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7751 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7750 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7752 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7751 | 7753 |
7752 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7754 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7753 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7755 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7754 ClearObjectStats(); | 7756 ClearObjectStats(); |
7755 } | 7757 } |
7756 | 7758 |
7757 } } // namespace v8::internal | 7759 } } // namespace v8::internal |
OLD | NEW |