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

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

Issue 2701513003: Revert of 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
453 void ThreadHeap::processMarkingStack(Visitor* visitor) { 448 void ThreadHeap::processMarkingStack(Visitor* visitor) {
454 // Ephemeron fixed point loop. 449 // Ephemeron fixed point loop.
455 do { 450 do {
456 { 451 {
457 // Iteratively mark all objects that are reachable from the objects 452 // Iteratively mark all objects that are reachable from the objects
458 // currently pushed onto the marking stack. 453 // currently pushed onto the marking stack.
459 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded"); 454 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded");
460 while (popAndInvokeTraceCallback(visitor)) { 455 while (popAndInvokeTraceCallback(visitor)) {
461 } 456 }
462 } 457 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); 654 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize());
660 655
661 m_stats.reset(); 656 m_stats.reset();
662 for (ThreadState* state : m_threads) 657 for (ThreadState* state : m_threads)
663 state->resetHeapCounters(); 658 state->resetHeapCounters();
664 } 659 }
665 660
666 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; 661 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr;
667 662
668 } // namespace blink 663 } // 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