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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 __msan_unpoison(&ptr, sizeof(ptr)); | 563 __msan_unpoison(&ptr, sizeof(ptr)); |
564 #endif | 564 #endif |
565 Heap::checkAndMarkPointer(visitor, ptr); | 565 Heap::checkAndMarkPointer(visitor, ptr); |
566 visitAsanFakeStackForPointer(visitor, ptr); | 566 visitAsanFakeStackForPointer(visitor, ptr); |
567 } | 567 } |
568 } | 568 } |
569 | 569 |
570 void ThreadState::visitPersistents(Visitor* visitor) | 570 void ThreadState::visitPersistents(Visitor* visitor) |
571 { | 571 { |
572 m_persistents->trace(visitor); | 572 m_persistents->trace(visitor); |
573 WrapperPersistentRegion::trace(m_liveWrapperPersistents, visitor); | 573 { |
| 574 TRACE_EVENT0("blink_gc", "WrapperPersistentRegion::trace"); |
| 575 WrapperPersistentRegion::trace(m_liveWrapperPersistents, visitor); |
| 576 } |
574 } | 577 } |
575 | 578 |
576 #if ENABLE(GC_PROFILE_MARKING) | 579 #if ENABLE(GC_PROFILE_MARKING) |
577 const GCInfo* ThreadState::findGCInfo(Address address) | 580 const GCInfo* ThreadState::findGCInfo(Address address) |
578 { | 581 { |
579 BaseHeapPage* page = heapPageFromAddress(address); | 582 BaseHeapPage* page = heapPageFromAddress(address); |
580 if (page) { | 583 if (page) { |
581 return page->findGCInfo(address); | 584 return page->findGCInfo(address); |
582 } | 585 } |
583 return 0; | 586 return 0; |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 , m_stats(stats) | 1038 , m_stats(stats) |
1036 { | 1039 { |
1037 m_threadState->registerSweepingTask(); | 1040 m_threadState->registerSweepingTask(); |
1038 } | 1041 } |
1039 | 1042 |
1040 virtual ~SweepNonFinalizedHeapTask() | 1043 virtual ~SweepNonFinalizedHeapTask() |
1041 { | 1044 { |
1042 m_threadState->unregisterSweepingTask(); | 1045 m_threadState->unregisterSweepingTask(); |
1043 } | 1046 } |
1044 | 1047 |
1045 virtual void run() { m_heap->sweep(m_stats); } | 1048 virtual void run() |
| 1049 { |
| 1050 TRACE_EVENT0("blink_gc", "ThreadState::sweepNonFinalizedHeaps"); |
| 1051 m_heap->sweep(m_stats); |
| 1052 } |
1046 | 1053 |
1047 private: | 1054 private: |
1048 ThreadState* m_threadState; | 1055 ThreadState* m_threadState; |
1049 BaseHeap* m_heap; | 1056 BaseHeap* m_heap; |
1050 HeapStats* m_stats; | 1057 HeapStats* m_stats; |
1051 }; | 1058 }; |
1052 | 1059 |
1053 void ThreadState::performPendingSweep() | 1060 void ThreadState::performPendingSweep() |
1054 { | 1061 { |
1055 if (!sweepRequested()) | 1062 if (!sweepRequested()) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 return gcInfo; | 1268 return gcInfo; |
1262 } | 1269 } |
1263 } | 1270 } |
1264 if (needLockForIteration) | 1271 if (needLockForIteration) |
1265 threadAttachMutex().unlock(); | 1272 threadAttachMutex().unlock(); |
1266 return 0; | 1273 return 0; |
1267 } | 1274 } |
1268 #endif | 1275 #endif |
1269 | 1276 |
1270 } | 1277 } |
OLD | NEW |