| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 } | 835 } |
| 836 | 836 |
| 837 void ThreadState::flushHeapDoesNotContainCacheIfNeeded() | 837 void ThreadState::flushHeapDoesNotContainCacheIfNeeded() |
| 838 { | 838 { |
| 839 if (m_shouldFlushHeapDoesNotContainCache) { | 839 if (m_shouldFlushHeapDoesNotContainCache) { |
| 840 Heap::flushHeapDoesNotContainCache(); | 840 Heap::flushHeapDoesNotContainCache(); |
| 841 m_shouldFlushHeapDoesNotContainCache = false; | 841 m_shouldFlushHeapDoesNotContainCache = false; |
| 842 } | 842 } |
| 843 } | 843 } |
| 844 | 844 |
| 845 void ThreadState::makeConsistentForSweeping() | 845 void ThreadState::makeConsistentForGC() |
| 846 { | 846 { |
| 847 ASSERT(isInGC()); | 847 ASSERT(isInGC()); |
| 848 TRACE_EVENT0("blink_gc", "ThreadState::makeConsistentForSweeping"); | 848 TRACE_EVENT0("blink_gc", "ThreadState::makeConsistentForGC"); |
| 849 for (int i = 0; i < NumberOfHeaps; ++i) | 849 for (int i = 0; i < NumberOfHeaps; ++i) |
| 850 m_heaps[i]->makeConsistentForSweeping(); | 850 m_heaps[i]->makeConsistentForGC(); |
| 851 } | 851 } |
| 852 | 852 |
| 853 void ThreadState::preGC() | 853 void ThreadState::preGC() |
| 854 { | 854 { |
| 855 ASSERT(!isInGC()); | 855 ASSERT(!isInGC()); |
| 856 setGCState(GCRunning); | 856 setGCState(GCRunning); |
| 857 makeConsistentForSweeping(); | 857 makeConsistentForGC(); |
| 858 prepareRegionTree(); | 858 prepareRegionTree(); |
| 859 flushHeapDoesNotContainCacheIfNeeded(); | 859 flushHeapDoesNotContainCacheIfNeeded(); |
| 860 clearHeapAges(); | 860 clearHeapAges(); |
| 861 } | 861 } |
| 862 | 862 |
| 863 void ThreadState::postGC(GCType gcType) | 863 void ThreadState::postGC(GCType gcType) |
| 864 { | 864 { |
| 865 ASSERT(isInGC()); | 865 ASSERT(isInGC()); |
| 866 | 866 |
| 867 #if ENABLE(GC_PROFILING) | 867 #if ENABLE(GC_PROFILING) |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 json->beginArray(it->key.ascii().data()); | 1352 json->beginArray(it->key.ascii().data()); |
| 1353 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1353 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1354 json->pushInteger(it->value.ages[age]); | 1354 json->pushInteger(it->value.ages[age]); |
| 1355 json->endArray(); | 1355 json->endArray(); |
| 1356 } | 1356 } |
| 1357 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1357 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
| 1358 } | 1358 } |
| 1359 #endif | 1359 #endif |
| 1360 | 1360 |
| 1361 } // namespace blink | 1361 } // namespace blink |
| OLD | NEW |