| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef HeapCompact_h | 5 #ifndef HeapCompact_h |
| 6 #define HeapCompact_h | 6 #define HeapCompact_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/heap/BlinkGC.h" | 9 #include "platform/heap/BlinkGC.h" |
| 10 #include "platform/wtf/DataLog.h" | 10 #include "platform/wtf/DataLog.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 double start_compaction_time_ms_; | 155 double start_compaction_time_ms_; |
| 156 | 156 |
| 157 static bool force_compaction_gc_; | 157 static bool force_compaction_gc_; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace blink | 160 } // namespace blink |
| 161 | 161 |
| 162 // Logging macros activated by debug switches. | 162 // Logging macros activated by debug switches. |
| 163 | 163 |
| 164 #define LOG_HEAP_COMPACTION_INTERNAL(msg, ...) dataLogF(msg, ##__VA_ARGS__) | 164 #define LOG_HEAP_COMPACTION_INTERNAL(msg, ...) DataLogF(msg, ##__VA_ARGS__) |
| 165 | 165 |
| 166 #if DEBUG_HEAP_COMPACTION | 166 #if DEBUG_HEAP_COMPACTION |
| 167 #define LOG_HEAP_COMPACTION(msg, ...) \ | 167 #define LOG_HEAP_COMPACTION(msg, ...) \ |
| 168 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) | 168 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) |
| 169 #else | 169 #else |
| 170 #define LOG_HEAP_COMPACTION(msg, ...) \ | 170 #define LOG_HEAP_COMPACTION(msg, ...) \ |
| 171 do { \ | 171 do { \ |
| 172 } while (0) | 172 } while (0) |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 #if DEBUG_HEAP_FREELIST | 175 #if DEBUG_HEAP_FREELIST |
| 176 #define LOG_HEAP_FREELIST(msg, ...) \ | 176 #define LOG_HEAP_FREELIST(msg, ...) \ |
| 177 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) | 177 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) |
| 178 #else | 178 #else |
| 179 #define LOG_HEAP_FREELIST(msg, ...) \ | 179 #define LOG_HEAP_FREELIST(msg, ...) \ |
| 180 do { \ | 180 do { \ |
| 181 } while (0) | 181 } while (0) |
| 182 #endif | 182 #endif |
| 183 | 183 |
| 184 #if DEBUG_HEAP_FREELIST == 2 | 184 #if DEBUG_HEAP_FREELIST == 2 |
| 185 #define LOG_HEAP_FREELIST_VERBOSE(msg, ...) \ | 185 #define LOG_HEAP_FREELIST_VERBOSE(msg, ...) \ |
| 186 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) | 186 LOG_HEAP_COMPACTION_INTERNAL(msg, ##__VA_ARGS__) |
| 187 #else | 187 #else |
| 188 #define LOG_HEAP_FREELIST_VERBOSE(msg, ...) \ | 188 #define LOG_HEAP_FREELIST_VERBOSE(msg, ...) \ |
| 189 do { \ | 189 do { \ |
| 190 } while (0) | 190 } while (0) |
| 191 #endif | 191 #endif |
| 192 | 192 |
| 193 #endif // HeapCompact_h | 193 #endif // HeapCompact_h |
| OLD | NEW |