Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: src/heap-inl.h

Issue 160453: X64: Reenabled RSet. (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // - to space is already 25% full. 152 // - to space is already 25% full.
153 return old_address < new_space_.age_mark() 153 return old_address < new_space_.age_mark()
154 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2); 154 || (new_space_.Size() + object_size) >= (new_space_.Capacity() >> 2);
155 } 155 }
156 156
157 157
158 void Heap::RecordWrite(Address address, int offset) { 158 void Heap::RecordWrite(Address address, int offset) {
159 if (new_space_.Contains(address)) return; 159 if (new_space_.Contains(address)) return;
160 ASSERT(!new_space_.FromSpaceContains(address)); 160 ASSERT(!new_space_.FromSpaceContains(address));
161 SLOW_ASSERT(Contains(address + offset)); 161 SLOW_ASSERT(Contains(address + offset));
162 #ifndef V8_HOST_ARCH_64_BIT
163 Page::SetRSet(address, offset); 162 Page::SetRSet(address, offset);
164 #endif // V8_HOST_ARCH_64_BIT
165 } 163 }
166 164
167 165
168 OldSpace* Heap::TargetSpace(HeapObject* object) { 166 OldSpace* Heap::TargetSpace(HeapObject* object) {
169 InstanceType type = object->map()->instance_type(); 167 InstanceType type = object->map()->instance_type();
170 AllocationSpace space = TargetSpaceId(type); 168 AllocationSpace space = TargetSpaceId(type);
171 return (space == OLD_POINTER_SPACE) 169 return (space == OLD_POINTER_SPACE)
172 ? old_pointer_space_ 170 ? old_pointer_space_
173 : old_data_space_; 171 : old_data_space_;
174 } 172 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 allocation_allowed_ = new_state; 317 allocation_allowed_ = new_state;
320 return old; 318 return old;
321 } 319 }
322 320
323 #endif 321 #endif
324 322
325 323
326 } } // namespace v8::internal 324 } } // namespace v8::internal
327 325
328 #endif // V8_HEAP_INL_H_ 326 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/spaces.h » ('j') | src/x64/assembler-x64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698