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 648633002: Oilpan: Scale up the number of marking threads according to available processors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 #endif 323 #endif
324 { 324 {
325 ASSERT(!**s_threadSpecific); 325 ASSERT(!**s_threadSpecific);
326 **s_threadSpecific = this; 326 **s_threadSpecific = this;
327 327
328 InitializeHeaps<NumberOfHeaps>::init(m_heaps, this); 328 InitializeHeaps<NumberOfHeaps>::init(m_heaps, this);
329 329
330 m_weakCallbackStack = new CallbackStack(); 330 m_weakCallbackStack = new CallbackStack();
331 331
332 if (blink::Platform::current()) 332 if (blink::Platform::current())
333 m_sweeperThread = adoptPtr(blink::Platform::current()->createThread("Bli nk GC Sweeper")); 333 m_sweeperThread = adoptPtr(blink::Platform::current()->createThread("Bli nk GC Sweeper Thread"));
334 } 334 }
335 335
336 ThreadState::~ThreadState() 336 ThreadState::~ThreadState()
337 { 337 {
338 checkThread(); 338 checkThread();
339 delete m_weakCallbackStack; 339 delete m_weakCallbackStack;
340 m_weakCallbackStack = 0; 340 m_weakCallbackStack = 0;
341 for (int i = 0; i < NumberOfHeaps; i++) 341 for (int i = 0; i < NumberOfHeaps; i++)
342 delete m_heaps[i]; 342 delete m_heaps[i];
343 deleteAllValues(m_interruptors); 343 deleteAllValues(m_interruptors);
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 return gcInfo; 1282 return gcInfo;
1283 } 1283 }
1284 } 1284 }
1285 if (needLockForIteration) 1285 if (needLockForIteration)
1286 threadAttachMutex().unlock(); 1286 threadAttachMutex().unlock();
1287 return 0; 1287 return 0;
1288 } 1288 }
1289 #endif 1289 #endif
1290 1290
1291 } 1291 }
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