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

Side by Side Diff: third_party/WebKit/Source/platform/heap/Heap.cpp

Issue 2690943009: Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: Created 3 years, 10 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 /* 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 for (ThreadState* state : m_threads) 438 for (ThreadState* state : m_threads)
439 state->preGC(); 439 state->preGC();
440 } 440 }
441 441
442 void ThreadHeap::postGC(BlinkGC::GCType gcType) { 442 void ThreadHeap::postGC(BlinkGC::GCType gcType) {
443 ASSERT(ThreadState::current()->isInGC()); 443 ASSERT(ThreadState::current()->isInGC());
444 for (ThreadState* state : m_threads) 444 for (ThreadState* state : m_threads)
445 state->postGC(gcType); 445 state->postGC(gcType);
446 } 446 }
447 447
448 void ThreadHeap::preSweep(BlinkGC::GCType gcType) {
449 for (ThreadState* state : m_threads)
450 state->preSweep(gcType);
451 }
452
448 void ThreadHeap::processMarkingStack(Visitor* visitor) { 453 void ThreadHeap::processMarkingStack(Visitor* visitor) {
449 // Ephemeron fixed point loop. 454 // Ephemeron fixed point loop.
450 do { 455 do {
451 { 456 {
452 // Iteratively mark all objects that are reachable from the objects 457 // Iteratively mark all objects that are reachable from the objects
453 // currently pushed onto the marking stack. 458 // currently pushed onto the marking stack.
454 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded"); 459 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded");
455 while (popAndInvokeTraceCallback(visitor)) { 460 while (popAndInvokeTraceCallback(visitor)) {
456 } 461 }
457 } 462 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); 659 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize());
655 660
656 m_stats.reset(); 661 m_stats.reset();
657 for (ThreadState* state : m_threads) 662 for (ThreadState* state : m_threads)
658 state->resetHeapCounters(); 663 state->resetHeapCounters();
659 } 664 }
660 665
661 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; 666 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr;
662 667
663 } // namespace blink 668 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698