| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 compaction()->registerMovingObjectCallback(reference, callback, callbackData); | 306 compaction()->registerMovingObjectCallback(reference, callback, callbackData); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void ThreadHeap::decommitCallbackStacks() { | 309 void ThreadHeap::decommitCallbackStacks() { |
| 310 m_markingStack->decommit(); | 310 m_markingStack->decommit(); |
| 311 m_postMarkingCallbackStack->decommit(); | 311 m_postMarkingCallbackStack->decommit(); |
| 312 m_weakCallbackStack->decommit(); | 312 m_weakCallbackStack->decommit(); |
| 313 m_ephemeronStack->decommit(); | 313 m_ephemeronStack->decommit(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 void ThreadHeap::preGC() { | |
| 317 ASSERT(!ThreadState::current()->isInGC()); | |
| 318 m_threadState->preGC(); | |
| 319 } | |
| 320 | |
| 321 void ThreadHeap::postGC(BlinkGC::GCType gcType) { | |
| 322 ASSERT(ThreadState::current()->isInGC()); | |
| 323 m_threadState->postGC(gcType); | |
| 324 } | |
| 325 | |
| 326 void ThreadHeap::preSweep(BlinkGC::GCType gcType) { | |
| 327 m_threadState->preSweep(gcType); | |
| 328 } | |
| 329 | |
| 330 void ThreadHeap::processMarkingStack(Visitor* visitor) { | 316 void ThreadHeap::processMarkingStack(Visitor* visitor) { |
| 331 // Ephemeron fixed point loop. | 317 // Ephemeron fixed point loop. |
| 332 do { | 318 do { |
| 333 { | 319 { |
| 334 // Iteratively mark all objects that are reachable from the objects | 320 // Iteratively mark all objects that are reachable from the objects |
| 335 // currently pushed onto the marking stack. | 321 // currently pushed onto the marking stack. |
| 336 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded"); | 322 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded"); |
| 337 while (popAndInvokeTraceCallback(visitor)) { | 323 while (popAndInvokeTraceCallback(visitor)) { |
| 338 } | 324 } |
| 339 } | 325 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 ProcessHeap::decreaseTotalAllocatedObjectSize(m_stats.allocatedObjectSize()); | 501 ProcessHeap::decreaseTotalAllocatedObjectSize(m_stats.allocatedObjectSize()); |
| 516 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); | 502 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); |
| 517 | 503 |
| 518 m_stats.reset(); | 504 m_stats.reset(); |
| 519 m_threadState->resetHeapCounters(); | 505 m_threadState->resetHeapCounters(); |
| 520 } | 506 } |
| 521 | 507 |
| 522 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; | 508 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; |
| 523 | 509 |
| 524 } // namespace blink | 510 } // namespace blink |
| OLD | NEW |