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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 #if ENABLE(GC_PROFILING) | 248 #if ENABLE(GC_PROFILING) |
249 , m_nextFreeListSnapshotTime(-std::numeric_limits<double>::infinity()) | 249 , m_nextFreeListSnapshotTime(-std::numeric_limits<double>::infinity()) |
250 #endif | 250 #endif |
251 { | 251 { |
252 checkThread(); | 252 checkThread(); |
253 ASSERT(!**s_threadSpecific); | 253 ASSERT(!**s_threadSpecific); |
254 **s_threadSpecific = this; | 254 **s_threadSpecific = this; |
255 | 255 |
256 if (isMainThread()) { | 256 if (isMainThread()) { |
257 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); | 257 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); |
258 s_mainThreadUnderestimatedStackSize = StackFrameDepth::getUnderestimated
StackSize() - sizeof(void*); | 258 size_t underestimatedStackSize = StackFrameDepth::getUnderestimatedStack
Size(); |
| 259 if (underestimatedStackSize > sizeof(void*)) |
| 260 s_mainThreadUnderestimatedStackSize = underestimatedStackSize - size
of(void*); |
259 } | 261 } |
260 | 262 |
261 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++) | 263 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++) |
262 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex); | 264 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex); |
263 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd
ex); | 265 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd
ex); |
264 | 266 |
265 m_weakCallbackStack = new CallbackStack(); | 267 m_weakCallbackStack = new CallbackStack(); |
266 } | 268 } |
267 | 269 |
268 ThreadState::~ThreadState() | 270 ThreadState::~ThreadState() |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 json->beginArray(it->key.ascii().data()); | 1280 json->beginArray(it->key.ascii().data()); |
1279 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1281 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1280 json->pushInteger(it->value.ages[age]); | 1282 json->pushInteger(it->value.ages[age]); |
1281 json->endArray(); | 1283 json->endArray(); |
1282 } | 1284 } |
1283 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1285 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
1284 } | 1286 } |
1285 #endif | 1287 #endif |
1286 | 1288 |
1287 } // namespace blink | 1289 } // namespace blink |
OLD | NEW |