| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project 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 "src/inspector/V8ProfilerAgentImpl.h" | 5 #include "src/inspector/V8ProfilerAgentImpl.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/inspector/StringUtil.h" | 8 #include "src/inspector/StringUtil.h" |
| 9 #include "src/inspector/V8Debugger.h" | 9 #include "src/inspector/V8Debugger.h" |
| 10 #include "src/inspector/V8InspectorImpl.h" | 10 #include "src/inspector/V8InspectorImpl.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 std::unique_ptr<protocol::Profiler::Profile> result; | 297 std::unique_ptr<protocol::Profiler::Profile> result; |
| 298 if (serialize) result = createCPUProfile(m_isolate, profile); | 298 if (serialize) result = createCPUProfile(m_isolate, profile); |
| 299 profile->Delete(); | 299 profile->Delete(); |
| 300 return result; | 300 return result; |
| 301 } | 301 } |
| 302 | 302 |
| 303 bool V8ProfilerAgentImpl::isRecording() const { | 303 bool V8ProfilerAgentImpl::isRecording() const { |
| 304 return m_recordingCPUProfile || !m_startedProfiles.empty(); | 304 return m_recordingCPUProfile || !m_startedProfiles.empty(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool V8ProfilerAgentImpl::idleStarted() { |
| 308 if (m_profiler) m_profiler->SetIdle(true); |
| 309 return m_profiler; |
| 310 } |
| 311 |
| 312 bool V8ProfilerAgentImpl::idleFinished() { |
| 313 if (m_profiler) m_profiler->SetIdle(false); |
| 314 return m_profiler; |
| 315 } |
| 316 |
| 317 void V8ProfilerAgentImpl::collectSample() { |
| 318 if (m_profiler) m_profiler->CollectSample(); |
| 319 } |
| 320 |
| 307 } // namespace v8_inspector | 321 } // namespace v8_inspector |
| OLD | NEW |