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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp

Issue 1913283003: [DevTools] Rework idle{Started,Finished} instrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1907663005
Patch Set: rebased Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" 5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h"
6 6
7 #include "platform/v8_inspector/Atomics.h" 7 #include "platform/v8_inspector/Atomics.h"
8 #include "platform/v8_inspector/V8DebuggerImpl.h" 8 #include "platform/v8_inspector/V8DebuggerImpl.h"
9 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 9 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
10 #include "platform/v8_inspector/V8StackTraceImpl.h" 10 #include "platform/v8_inspector/V8StackTraceImpl.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 result = createCPUProfile(m_isolate, profile); 285 result = createCPUProfile(m_isolate, profile);
286 profile->Delete(); 286 profile->Delete();
287 return result.release(); 287 return result.release();
288 } 288 }
289 289
290 bool V8ProfilerAgentImpl::isRecording() const 290 bool V8ProfilerAgentImpl::isRecording() const
291 { 291 {
292 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); 292 return m_recordingCPUProfile || !m_startedProfiles.isEmpty();
293 } 293 }
294 294
295 void V8ProfilerAgentImpl::idleFinished()
296 {
297 if (!isRecording())
298 return;
299 m_isolate->GetCpuProfiler()->SetIdle(false);
300 }
301
302 void V8ProfilerAgentImpl::idleStarted()
303 {
304 if (!isRecording())
305 return;
306 m_isolate->GetCpuProfiler()->SetIdle(true);
307 }
308
309 } // namespace blink 295 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698