| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 if (gcType == BlinkGC::TakeSnapshot) | 521 if (gcType == BlinkGC::TakeSnapshot) |
| 522 BlinkGCMemoryDumpProvider::instance()->clearProcessDumpForCurrentGC(); | 522 BlinkGCMemoryDumpProvider::instance()->clearProcessDumpForCurrentGC(); |
| 523 | 523 |
| 524 // Disallow allocation during garbage collection (but not during the | 524 // Disallow allocation during garbage collection (but not during the |
| 525 // finalization that happens when the visitorScope is torn down). | 525 // finalization that happens when the visitorScope is torn down). |
| 526 ThreadState::NoAllocationScope noAllocationScope(state); | 526 ThreadState::NoAllocationScope noAllocationScope(state); |
| 527 | 527 |
| 528 state->heap().commitCallbackStacks(); | 528 state->heap().commitCallbackStacks(); |
| 529 state->heap().preGC(); | 529 state->heap().preGC(); |
| 530 | 530 |
| 531 StackFrameDepthScope stackDepthScope; | 531 StackFrameDepthScope stackDepthScope(&state->heap().stackFrameDepth()); |
| 532 | 532 |
| 533 size_t totalObjectSize = state->heap().heapStats().allocatedObjectSize() + s
tate->heap().heapStats().markedObjectSize(); | 533 size_t totalObjectSize = state->heap().heapStats().allocatedObjectSize() + s
tate->heap().heapStats().markedObjectSize(); |
| 534 if (gcType != BlinkGC::TakeSnapshot) | 534 if (gcType != BlinkGC::TakeSnapshot) |
| 535 state->heap().resetHeapCounters(); | 535 state->heap().resetHeapCounters(); |
| 536 | 536 |
| 537 { | 537 { |
| 538 // Access to the CrossThreadPersistentRegion has to be prevented while | 538 // Access to the CrossThreadPersistentRegion has to be prevented while |
| 539 // marking and global weak processing is in progress. If not, threads | 539 // marking and global weak processing is in progress. If not, threads |
| 540 // not attached to Oilpan and participating in this GC are able | 540 // not attached to Oilpan and participating in this GC are able |
| 541 // to allocate & free PersistentNodes, something the marking phase isn't | 541 // to allocate & free PersistentNodes, something the marking phase isn't |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); | 809 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); |
| 810 | 810 |
| 811 m_stats.reset(); | 811 m_stats.reset(); |
| 812 for (ThreadState* state : m_threads) | 812 for (ThreadState* state : m_threads) |
| 813 state->resetHeapCounters(); | 813 state->resetHeapCounters(); |
| 814 } | 814 } |
| 815 | 815 |
| 816 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; | 816 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; |
| 817 | 817 |
| 818 } // namespace blink | 818 } // namespace blink |
| OLD | NEW |