Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: Source/platform/heap/ThreadState.cpp

Issue 927213002: [Oilpan] Set stack limit using estimated sizes (Re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work for comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/heap/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 #if ENABLE(GC_PROFILING) 247 #if ENABLE(GC_PROFILING)
248 , m_nextFreeListSnapshotTime(-std::numeric_limits<double>::infinity()) 248 , m_nextFreeListSnapshotTime(-std::numeric_limits<double>::infinity())
249 #endif 249 #endif
250 { 250 {
251 checkThread(); 251 checkThread();
252 ASSERT(!**s_threadSpecific); 252 ASSERT(!**s_threadSpecific);
253 **s_threadSpecific = this; 253 **s_threadSpecific = this;
254 254
255 if (isMainThread()) { 255 if (isMainThread()) {
256 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s izeof(void*); 256 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s izeof(void*);
257 s_mainThreadUnderestimatedStackSize = StackFrameDepth::getUnderestimated StackSize() - sizeof(void*); 257 size_t underestimatedStackSize = StackFrameDepth::getUnderestimatedStack Size();
258 if (underestimatedStackSize > sizeof(void*))
259 s_mainThreadUnderestimatedStackSize = underestimatedStackSize - size of(void*);
258 } 260 }
259 261
260 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++) 262 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++)
261 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex); 263 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex);
262 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd ex); 264 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd ex);
263 265
264 m_weakCallbackStack = new CallbackStack(); 266 m_weakCallbackStack = new CallbackStack();
265 } 267 }
266 268
267 ThreadState::~ThreadState() 269 ThreadState::~ThreadState()
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 json->beginArray(it->key.ascii().data()); 1267 json->beginArray(it->key.ascii().data());
1266 for (size_t age = 0; age <= maxHeapObjectAge; ++age) 1268 for (size_t age = 0; age <= maxHeapObjectAge; ++age)
1267 json->pushInteger(it->value.ages[age]); 1269 json->pushInteger(it->value.ages[age]);
1268 json->endArray(); 1270 json->endArray();
1269 } 1271 }
1270 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); 1272 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release());
1271 } 1273 }
1272 #endif 1274 #endif
1273 1275
1274 } // namespace blink 1276 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698