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

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

Issue 2686533003: Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: fix 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 for (ThreadState* state : m_threads) 384 for (ThreadState* state : m_threads)
385 state->preGC(); 385 state->preGC();
386 } 386 }
387 387
388 void ThreadHeap::postGC(BlinkGC::GCType gcType) { 388 void ThreadHeap::postGC(BlinkGC::GCType gcType) {
389 ASSERT(ThreadState::current()->isInGC()); 389 ASSERT(ThreadState::current()->isInGC());
390 for (ThreadState* state : m_threads) 390 for (ThreadState* state : m_threads)
391 state->postGC(gcType); 391 state->postGC(gcType);
392 } 392 }
393 393
394 void ThreadHeap::preSweep(BlinkGC::GCType gcType) {
395 for (ThreadState* state : m_threads)
396 state->preSweep(gcType);
397 }
398
394 void ThreadHeap::processMarkingStack(Visitor* visitor) { 399 void ThreadHeap::processMarkingStack(Visitor* visitor) {
395 // Ephemeron fixed point loop. 400 // Ephemeron fixed point loop.
396 do { 401 do {
397 { 402 {
398 // Iteratively mark all objects that are reachable from the objects 403 // Iteratively mark all objects that are reachable from the objects
399 // currently pushed onto the marking stack. 404 // currently pushed onto the marking stack.
400 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded"); 405 TRACE_EVENT0("blink_gc", "ThreadHeap::processMarkingStackSingleThreaded");
401 while (popAndInvokeTraceCallback(visitor)) { 406 while (popAndInvokeTraceCallback(visitor)) {
402 } 407 }
403 } 408 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); 604 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize());
600 605
601 m_stats.reset(); 606 m_stats.reset();
602 for (ThreadState* state : m_threads) 607 for (ThreadState* state : m_threads)
603 state->resetHeapCounters(); 608 state->resetHeapCounters();
604 } 609 }
605 610
606 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; 611 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr;
607 612
608 } // namespace blink 613 } // 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