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

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

Issue 1115993003: Try reducing and balance GC callback stack sizes. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: initialize stacks also before doing thread-terminating GCs Created 5 years, 7 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/Heap.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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 s_mainThreadUnderestimatedStackSize = underestimatedStackSize - size of(void*); 119 s_mainThreadUnderestimatedStackSize = underestimatedStackSize - size of(void*);
120 } 120 }
121 121
122 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++) 122 for (int heapIndex = 0; heapIndex < LargeObjectHeapIndex; heapIndex++)
123 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex); 123 m_heaps[heapIndex] = new NormalPageHeap(this, heapIndex);
124 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd ex); 124 m_heaps[LargeObjectHeapIndex] = new LargeObjectHeap(this, LargeObjectHeapInd ex);
125 125
126 m_likelyToBePromptlyFreed = adoptArrayPtr(new int[likelyToBePromptlyFreedArr aySize]); 126 m_likelyToBePromptlyFreed = adoptArrayPtr(new int[likelyToBePromptlyFreedArr aySize]);
127 clearHeapAges(); 127 clearHeapAges();
128 128
129 m_weakCallbackStack = new CallbackStack(); 129 m_weakCallbackStack = new CallbackStack(CallbackStack::WeakCallbackStackBloc kSize);
130 } 130 }
131 131
132 ThreadState::~ThreadState() 132 ThreadState::~ThreadState()
133 { 133 {
134 checkThread(); 134 checkThread();
135 delete m_weakCallbackStack; 135 delete m_weakCallbackStack;
136 m_weakCallbackStack = nullptr; 136 m_weakCallbackStack = nullptr;
137 for (int i = 0; i < NumberOfHeaps; ++i) 137 for (int i = 0; i < NumberOfHeaps; ++i)
138 delete m_heaps[i]; 138 delete m_heaps[i];
139 deleteAllValues(m_interruptors); 139 deleteAllValues(m_interruptors);
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 json->beginArray(it->key.ascii().data()); 1298 json->beginArray(it->key.ascii().data());
1299 for (size_t age = 0; age <= maxHeapObjectAge; ++age) 1299 for (size_t age = 0; age <= maxHeapObjectAge; ++age)
1300 json->pushInteger(it->value.ages[age]); 1300 json->pushInteger(it->value.ages[age]);
1301 json->endArray(); 1301 json->endArray();
1302 } 1302 }
1303 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); 1303 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release());
1304 } 1304 }
1305 #endif 1305 #endif
1306 1306
1307 } // namespace blink 1307 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698