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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 , m_stats(stats) | 1035 , m_stats(stats) |
1036 { | 1036 { |
1037 m_threadState->registerSweepingTask(); | 1037 m_threadState->registerSweepingTask(); |
1038 } | 1038 } |
1039 | 1039 |
1040 virtual ~SweepNonFinalizedHeapTask() | 1040 virtual ~SweepNonFinalizedHeapTask() |
1041 { | 1041 { |
1042 m_threadState->unregisterSweepingTask(); | 1042 m_threadState->unregisterSweepingTask(); |
1043 } | 1043 } |
1044 | 1044 |
1045 virtual void run() { m_heap->sweep(m_stats); } | 1045 virtual void run() |
| 1046 { |
| 1047 TRACE_EVENT0("blink_gc", "ThreadState::sweepNonFinalizedHeaps"); |
| 1048 m_heap->sweep(m_stats); |
| 1049 } |
1046 | 1050 |
1047 private: | 1051 private: |
1048 ThreadState* m_threadState; | 1052 ThreadState* m_threadState; |
1049 BaseHeap* m_heap; | 1053 BaseHeap* m_heap; |
1050 HeapStats* m_stats; | 1054 HeapStats* m_stats; |
1051 }; | 1055 }; |
1052 | 1056 |
1053 void ThreadState::performPendingSweep() | 1057 void ThreadState::performPendingSweep() |
1054 { | 1058 { |
1055 if (!sweepRequested()) | 1059 if (!sweepRequested()) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 return gcInfo; | 1265 return gcInfo; |
1262 } | 1266 } |
1263 } | 1267 } |
1264 if (needLockForIteration) | 1268 if (needLockForIteration) |
1265 threadAttachMutex().unlock(); | 1269 threadAttachMutex().unlock(); |
1266 return 0; | 1270 return 0; |
1267 } | 1271 } |
1268 #endif | 1272 #endif |
1269 | 1273 |
1270 } | 1274 } |
OLD | NEW |