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

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

Issue 672033003: Oilpan: Add TRACE_EVENT0 to ThreadState::waitUntilSweepersDone. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 void ThreadState::unregisterSweepingTask() 1022 void ThreadState::unregisterSweepingTask()
1023 { 1023 {
1024 MutexLocker locker(m_sweepMutex); 1024 MutexLocker locker(m_sweepMutex);
1025 ASSERT(m_numberOfSweeperTasks > 0); 1025 ASSERT(m_numberOfSweeperTasks > 0);
1026 if (!--m_numberOfSweeperTasks) 1026 if (!--m_numberOfSweeperTasks)
1027 m_sweepThreadCondition.signal(); 1027 m_sweepThreadCondition.signal();
1028 } 1028 }
1029 1029
1030 void ThreadState::waitUntilSweepersDone() 1030 void ThreadState::waitUntilSweepersDone()
1031 { 1031 {
1032 TRACE_EVENT0("blink_gc", "ThreadState::waitUntilSweepersDone");
1032 MutexLocker locker(m_sweepMutex); 1033 MutexLocker locker(m_sweepMutex);
1033 while (m_numberOfSweeperTasks > 0) 1034 while (m_numberOfSweeperTasks > 0)
1034 m_sweepThreadCondition.wait(m_sweepMutex); 1035 m_sweepThreadCondition.wait(m_sweepMutex);
1035 } 1036 }
1036 1037
1037 1038
1038 class SweepNonFinalizedHeapTask final : public WebThread::Task { 1039 class SweepNonFinalizedHeapTask final : public WebThread::Task {
1039 public: 1040 public:
1040 SweepNonFinalizedHeapTask(ThreadState* state, BaseHeap* heap, HeapStats* sta ts) 1041 SweepNonFinalizedHeapTask(ThreadState* state, BaseHeap* heap, HeapStats* sta ts)
1041 : m_threadState(state) 1042 : m_threadState(state)
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 return gcInfo; 1274 return gcInfo;
1274 } 1275 }
1275 } 1276 }
1276 if (needLockForIteration) 1277 if (needLockForIteration)
1277 threadAttachMutex().unlock(); 1278 threadAttachMutex().unlock();
1278 return 0; 1279 return 0;
1279 } 1280 }
1280 #endif 1281 #endif
1281 1282
1282 } 1283 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698