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

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: Created 4 years, 8 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 result = createCPUProfile(m_isolate, profile); 283 result = createCPUProfile(m_isolate, profile);
284 profile->Delete(); 284 profile->Delete();
285 return result.release(); 285 return result.release();
286 } 286 }
287 287
288 bool V8ProfilerAgentImpl::isRecording() const 288 bool V8ProfilerAgentImpl::isRecording() const
289 { 289 {
290 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); 290 return m_recordingCPUProfile || !m_startedProfiles.isEmpty();
291 } 291 }
292 292
293 void V8ProfilerAgentImpl::idleFinished()
294 {
295 if (!isRecording())
296 return;
297 m_isolate->GetCpuProfiler()->SetIdle(false);
298 }
299
300 void V8ProfilerAgentImpl::idleStarted()
301 {
302 if (!isRecording())
303 return;
304 m_isolate->GetCpuProfiler()->SetIdle(true);
305 }
306
307 } // namespace blink 293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698