OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 for (ThreadState* state = ThreadState::FirstInUse(); | 261 for (ThreadState* state = ThreadState::FirstInUse(); |
262 state != NULL; | 262 state != NULL; |
263 state = state->Next()) { | 263 state = state->Next()) { |
264 char* data = state->data(); | 264 char* data = state->data(); |
265 data = HandleScopeImplementer::Iterate(v, data); | 265 data = HandleScopeImplementer::Iterate(v, data); |
266 data = Top::Iterate(v, data); | 266 data = Top::Iterate(v, data); |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
270 | 270 |
271 void ThreadManager::MarkCompactPrologue() { | 271 void ThreadManager::MarkCompactPrologue(bool is_compacting) { |
272 for (ThreadState* state = ThreadState::FirstInUse(); | 272 for (ThreadState* state = ThreadState::FirstInUse(); |
273 state != NULL; | 273 state != NULL; |
274 state = state->Next()) { | 274 state = state->Next()) { |
275 char* data = state->data(); | 275 char* data = state->data(); |
276 data += HandleScopeImplementer::ArchiveSpacePerThread(); | 276 data += HandleScopeImplementer::ArchiveSpacePerThread(); |
277 Top::MarkCompactPrologue(data); | 277 Top::MarkCompactPrologue(is_compacting, data); |
278 } | 278 } |
279 } | 279 } |
280 | 280 |
281 | 281 |
282 void ThreadManager::MarkCompactEpilogue() { | 282 void ThreadManager::MarkCompactEpilogue(bool is_compacting) { |
283 for (ThreadState* state = ThreadState::FirstInUse(); | 283 for (ThreadState* state = ThreadState::FirstInUse(); |
284 state != NULL; | 284 state != NULL; |
285 state = state->Next()) { | 285 state = state->Next()) { |
286 char* data = state->data(); | 286 char* data = state->data(); |
287 data += HandleScopeImplementer::ArchiveSpacePerThread(); | 287 data += HandleScopeImplementer::ArchiveSpacePerThread(); |
288 Top::MarkCompactEpilogue(data); | 288 Top::MarkCompactEpilogue(is_compacting, data); |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 // This is the ContextSwitcher singleton. There is at most a single thread | 293 // This is the ContextSwitcher singleton. There is at most a single thread |
294 // running which delivers preemption events to V8 threads. | 294 // running which delivers preemption events to V8 threads. |
295 ContextSwitcher* ContextSwitcher::singleton_ = NULL; | 295 ContextSwitcher* ContextSwitcher::singleton_ = NULL; |
296 | 296 |
297 | 297 |
298 ContextSwitcher::ContextSwitcher(int every_n_ms) | 298 ContextSwitcher::ContextSwitcher(int every_n_ms) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // Acknowledge the preemption by the receiving thread. | 346 // Acknowledge the preemption by the receiving thread. |
347 void ContextSwitcher::PreemptionReceived() { | 347 void ContextSwitcher::PreemptionReceived() { |
348 ASSERT(Locker::IsLocked()); | 348 ASSERT(Locker::IsLocked()); |
349 // There is currently no accounting being done for this. But could be in the | 349 // There is currently no accounting being done for this. But could be in the |
350 // future, which is why we leave this in. | 350 // future, which is why we leave this in. |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 } // namespace internal | 354 } // namespace internal |
355 } // namespace v8 | 355 } // namespace v8 |
OLD | NEW |