| 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 // Allocation is allowed during the pre-finalizers and destructors. | 1049 // Allocation is allowed during the pre-finalizers and destructors. |
| 1050 // However, they must not mutate an object graph in a way in which | 1050 // However, they must not mutate an object graph in a way in which |
| 1051 // a dead object gets resurrected. | 1051 // a dead object gets resurrected. |
| 1052 invokePreFinalizers(); | 1052 invokePreFinalizers(); |
| 1053 | 1053 |
| 1054 #if defined(ADDRESS_SANITIZER) | 1054 #if defined(ADDRESS_SANITIZER) |
| 1055 poisonEagerHeap(SetPoison); | 1055 poisonEagerHeap(SetPoison); |
| 1056 #endif | 1056 #endif |
| 1057 | 1057 |
| 1058 #if ENABLE(LAZY_SWEEPING) | 1058 #if ENABLE(LAZY_SWEEPING) |
| 1059 eagerSweep(); |
| 1060 #if defined(ADDRESS_SANITIZER) |
| 1061 poisonAllHeaps(); |
| 1062 #endif |
| 1059 if (previousGCState == EagerSweepScheduled) { | 1063 if (previousGCState == EagerSweepScheduled) { |
| 1060 // Eager sweeping should happen only in testing. | 1064 // Eager sweeping should happen only in testing. |
| 1061 eagerSweep(); | |
| 1062 #if defined(ADDRESS_SANITIZER) | |
| 1063 poisonAllHeaps(); | |
| 1064 #endif | |
| 1065 completeSweep(); | 1065 completeSweep(); |
| 1066 } else { | 1066 } else { |
| 1067 // The default behavior is lazy sweeping. | 1067 // The default behavior is lazy sweeping. |
| 1068 eagerSweep(); | |
| 1069 #if defined(ADDRESS_SANITIZER) | |
| 1070 poisonAllHeaps(); | |
| 1071 #endif | |
| 1072 scheduleIdleLazySweep(); | 1068 scheduleIdleLazySweep(); |
| 1073 } | 1069 } |
| 1074 #else | 1070 #else |
| 1075 completeSweep(); | 1071 completeSweep(); |
| 1076 #endif | 1072 #endif |
| 1077 | 1073 |
| 1078 #if ENABLE(GC_PROFILING) | 1074 #if ENABLE(GC_PROFILING) |
| 1079 snapshotFreeListIfNecessary(); | 1075 snapshotFreeListIfNecessary(); |
| 1080 #endif | 1076 #endif |
| 1081 } | 1077 } |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 json->beginArray(it->key.ascii().data()); | 1605 json->beginArray(it->key.ascii().data()); |
| 1610 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1606 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1611 json->pushInteger(it->value.ages[age]); | 1607 json->pushInteger(it->value.ages[age]); |
| 1612 json->endArray(); | 1608 json->endArray(); |
| 1613 } | 1609 } |
| 1614 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1610 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
| 1615 } | 1611 } |
| 1616 #endif | 1612 #endif |
| 1617 | 1613 |
| 1618 } // namespace blink | 1614 } // namespace blink |
| OLD | NEW |