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 < LargeObjectHeap; heapIndex++) | 311 for (int heapIndex = 0; heapIndex < NumberOfHeaps; heapIndex++) |
312 m_heaps[heapIndex] = new ThreadHeapForHeapPage(this, heapIndex); | 312 m_heaps[heapIndex] = new ThreadHeap(this, heapIndex); |
313 m_heaps[LargeObjectHeap] = new ThreadHeapForLargeObject(this, LargeObjectHea
p); | |
314 | 313 |
315 m_weakCallbackStack = new CallbackStack(); | 314 m_weakCallbackStack = new CallbackStack(); |
316 } | 315 } |
317 | 316 |
318 ThreadState::~ThreadState() | 317 ThreadState::~ThreadState() |
319 { | 318 { |
320 checkThread(); | 319 checkThread(); |
321 delete m_weakCallbackStack; | 320 delete m_weakCallbackStack; |
322 m_weakCallbackStack = nullptr; | 321 m_weakCallbackStack = nullptr; |
323 for (int i = 0; i < NumberOfHeaps; ++i) | 322 for (int i = 0; i < NumberOfHeaps; ++i) |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 json->beginArray(it->key.ascii().data()); | 1315 json->beginArray(it->key.ascii().data()); |
1317 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1316 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1318 json->pushInteger(it->value.ages[age]); | 1317 json->pushInteger(it->value.ages[age]); |
1319 json->endArray(); | 1318 json->endArray(); |
1320 } | 1319 } |
1321 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1320 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
1322 } | 1321 } |
1323 #endif | 1322 #endif |
1324 | 1323 |
1325 } // namespace blink | 1324 } // namespace blink |
OLD | NEW |