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

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

Issue 955563002: [Oilpan] Set stack limit using estimated sizes (Re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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