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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 { | 301 { |
302 checkThread(); | 302 checkThread(); |
303 ASSERT(!**s_threadSpecific); | 303 ASSERT(!**s_threadSpecific); |
304 **s_threadSpecific = this; | 304 **s_threadSpecific = this; |
305 | 305 |
306 if (isMainThread()) { | 306 if (isMainThread()) { |
307 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); | 307 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); |
308 s_mainThreadUnderestimatedStackSize = StackFrameDepth::getUnderestimated
StackSize() - sizeof(void*); | 308 s_mainThreadUnderestimatedStackSize = StackFrameDepth::getUnderestimated
StackSize() - sizeof(void*); |
309 } | 309 } |
310 | 310 |
311 for (int heapIndex = 0; heapIndex < NumberOfHeaps; heapIndex++) | 311 for (int heapIndex = 0; heapIndex < LargeObjectHeap; heapIndex++) |
312 m_heaps[heapIndex] = new ThreadHeap(this, heapIndex); | 312 m_heaps[heapIndex] = new ThreadHeapForHeapPage(this, heapIndex); |
| 313 m_heaps[LargeObjectHeap] = new ThreadHeapForLargeObject(this, LargeObjectHea
p); |
313 | 314 |
314 m_weakCallbackStack = new CallbackStack(); | 315 m_weakCallbackStack = new CallbackStack(); |
315 } | 316 } |
316 | 317 |
317 ThreadState::~ThreadState() | 318 ThreadState::~ThreadState() |
318 { | 319 { |
319 checkThread(); | 320 checkThread(); |
320 delete m_weakCallbackStack; | 321 delete m_weakCallbackStack; |
321 m_weakCallbackStack = nullptr; | 322 m_weakCallbackStack = nullptr; |
322 for (int i = 0; i < NumberOfHeaps; ++i) | 323 for (int i = 0; i < NumberOfHeaps; ++i) |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 json->beginArray(it->key.ascii().data()); | 1316 json->beginArray(it->key.ascii().data()); |
1316 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1317 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1317 json->pushInteger(it->value.ages[age]); | 1318 json->pushInteger(it->value.ages[age]); |
1318 json->endArray(); | 1319 json->endArray(); |
1319 } | 1320 } |
1320 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1321 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
1321 } | 1322 } |
1322 #endif | 1323 #endif |
1323 | 1324 |
1324 } // namespace blink | 1325 } // namespace blink |
OLD | NEW |