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

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

Issue 1834373003: [heap] Add optimized RecordWrites (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding helper macro Created 4 years, 8 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
« src/heap/heap-inl.h ('K') | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 #define NOBARRIER_WRITE_FIELD(p, offset, value) \ 1141 #define NOBARRIER_WRITE_FIELD(p, offset, value) \
1142 base::NoBarrier_Store( \ 1142 base::NoBarrier_Store( \
1143 reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \ 1143 reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \
1144 reinterpret_cast<base::AtomicWord>(value)); 1144 reinterpret_cast<base::AtomicWord>(value));
1145 1145
1146 #define WRITE_BARRIER(heap, object, offset, value) \ 1146 #define WRITE_BARRIER(heap, object, offset, value) \
1147 heap->incremental_marking()->RecordWrite( \ 1147 heap->incremental_marking()->RecordWrite( \
1148 object, HeapObject::RawField(object, offset), value); \ 1148 object, HeapObject::RawField(object, offset), value); \
1149 heap->RecordWrite(object, offset, value); 1149 heap->RecordWrite(object, offset, value);
1150 1150
1151 #define FIXED_ARRAY_WRITE_BARRIER(heap, array, start, length) \
Hannes Payer (out of office) 2016/04/01 11:34:40 FIXED_ARRAY_ELEMENTS_WRITE_BARRIER
Camillo Bruni 2016/04/01 13:45:02 done.
1152 heap->RecordWrites(array, start, length); \
ulan 2016/04/01 11:28:32 Let's put the two statements in do { } while (fa
Camillo Bruni 2016/04/01 13:45:02 done.
1153 heap->incremental_marking()->IterateBlackObject(array)
1154
1151 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \ 1155 #define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \
1152 if (mode != SKIP_WRITE_BARRIER) { \ 1156 if (mode != SKIP_WRITE_BARRIER) { \
1153 if (mode == UPDATE_WRITE_BARRIER) { \ 1157 if (mode == UPDATE_WRITE_BARRIER) { \
1154 heap->incremental_marking()->RecordWrite( \ 1158 heap->incremental_marking()->RecordWrite( \
1155 object, HeapObject::RawField(object, offset), value); \ 1159 object, HeapObject::RawField(object, offset), value); \
1156 } \ 1160 } \
1157 heap->RecordWrite(object, offset, value); \ 1161 heap->RecordWrite(object, offset, value); \
1158 } 1162 }
1159 1163
1160 #define READ_DOUBLE_FIELD(p, offset) \ 1164 #define READ_DOUBLE_FIELD(p, offset) \
(...skipping 6663 matching lines...) Expand 10 before | Expand all | Expand 10 after
7824 #undef WRITE_INT64_FIELD 7828 #undef WRITE_INT64_FIELD
7825 #undef READ_BYTE_FIELD 7829 #undef READ_BYTE_FIELD
7826 #undef WRITE_BYTE_FIELD 7830 #undef WRITE_BYTE_FIELD
7827 #undef NOBARRIER_READ_BYTE_FIELD 7831 #undef NOBARRIER_READ_BYTE_FIELD
7828 #undef NOBARRIER_WRITE_BYTE_FIELD 7832 #undef NOBARRIER_WRITE_BYTE_FIELD
7829 7833
7830 } // namespace internal 7834 } // namespace internal
7831 } // namespace v8 7835 } // namespace v8
7832 7836
7833 #endif // V8_OBJECTS_INL_H_ 7837 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/heap/heap-inl.h ('K') | « src/heap/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698