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

Side by Side Diff: src/incremental-marking.h

Issue 8431010: Split incremental marking write barrier into fast and slow paths. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | src/incremental-marking.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 State state() { 53 State state() {
54 ASSERT(state_ == STOPPED || FLAG_incremental_marking); 54 ASSERT(state_ == STOPPED || FLAG_incremental_marking);
55 return state_; 55 return state_;
56 } 56 }
57 57
58 bool should_hurry() { return should_hurry_; } 58 bool should_hurry() { return should_hurry_; }
59 59
60 inline bool IsStopped() { return state() == STOPPED; } 60 inline bool IsStopped() { return state() == STOPPED; }
61 61
62 inline bool IsMarking() { return state() >= MARKING; } 62 INLINE(bool IsMarking()) { return state() >= MARKING; }
63 63
64 inline bool IsMarkingIncomplete() { return state() == MARKING; } 64 inline bool IsMarkingIncomplete() { return state() == MARKING; }
65 65
66 bool WorthActivating(); 66 bool WorthActivating();
67 67
68 void Start(); 68 void Start();
69 69
70 void Stop(); 70 void Stop();
71 71
72 void PrepareForScavenge(); 72 void PrepareForScavenge();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 static void RecordWriteFromCode(HeapObject* obj, 115 static void RecordWriteFromCode(HeapObject* obj,
116 Object* value, 116 Object* value,
117 Isolate* isolate); 117 Isolate* isolate);
118 118
119 static void RecordWriteForEvacuationFromCode(HeapObject* obj, 119 static void RecordWriteForEvacuationFromCode(HeapObject* obj,
120 Object** slot, 120 Object** slot,
121 Isolate* isolate); 121 Isolate* isolate);
122 122
123 inline bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value); 123 INLINE(bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value));
124 INLINE(void RecordWrite(HeapObject* obj, Object** slot, Object* value));
125 INLINE(void RecordWriteIntoCode(HeapObject* obj,
126 RelocInfo* rinfo,
127 Object* value));
128 INLINE(void RecordWriteOfCodeEntry(JSFunction* host,
129 Object** slot,
130 Code* value));
124 131
125 132
126 inline void RecordWrite(HeapObject* obj, Object** slot, Object* value); 133 void RecordWriteSlow(HeapObject* obj, Object** slot, Object* value);
127 inline void RecordWriteIntoCode(HeapObject* obj, 134 void RecordWriteIntoCodeSlow(HeapObject* obj,
128 RelocInfo* rinfo, 135 RelocInfo* rinfo,
129 Object* value); 136 Object* value);
137 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value);
130 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); 138 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value);
131 void RecordCodeTargetPatch(Address pc, HeapObject* value); 139 void RecordCodeTargetPatch(Address pc, HeapObject* value);
132 void RecordWriteOfCodeEntry(JSFunction* host, Object** slot, Code* value);
133 140
134 inline void RecordWrites(HeapObject* obj); 141 inline void RecordWrites(HeapObject* obj);
135 142
136 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); 143 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit);
137 144
138 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); 145 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit);
139 146
140 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); 147 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit);
141 148
142 // Does white->black or keeps gray or black color. Returns true if converting 149 // Does white->black or keeps gray or black color. Returns true if converting
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 intptr_t allocated_; 265 intptr_t allocated_;
259 266
260 int no_marking_scope_depth_; 267 int no_marking_scope_depth_;
261 268
262 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 269 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
263 }; 270 };
264 271
265 } } // namespace v8::internal 272 } } // namespace v8::internal
266 273
267 #endif // V8_INCREMENTAL_MARKING_H_ 274 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698