| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 std::unique_ptr<protocol::Array<protocol::Profiler::PositionTickInfo>> posit
ionTicks = buildInspectorObjectForPositionTicks(node); | 57 std::unique_ptr<protocol::Array<protocol::Profiler::PositionTickInfo>> posit
ionTicks = buildInspectorObjectForPositionTicks(node); |
| 58 | 58 |
| 59 std::unique_ptr<protocol::Profiler::CPUProfileNode> result = protocol::Profi
ler::CPUProfileNode::create() | 59 std::unique_ptr<protocol::Profiler::CPUProfileNode> result = protocol::Profi
ler::CPUProfileNode::create() |
| 60 .setFunctionName(toProtocolString(node->GetFunctionName())) | 60 .setFunctionName(toProtocolString(node->GetFunctionName())) |
| 61 .setScriptId(String16::number(node->GetScriptId())) | 61 .setScriptId(String16::number(node->GetScriptId())) |
| 62 .setUrl(toProtocolString(node->GetScriptResourceName())) | 62 .setUrl(toProtocolString(node->GetScriptResourceName())) |
| 63 .setLineNumber(node->GetLineNumber()) | 63 .setLineNumber(node->GetLineNumber()) |
| 64 .setColumnNumber(node->GetColumnNumber()) | 64 .setColumnNumber(node->GetColumnNumber()) |
| 65 .setHitCount(node->GetHitCount()) | 65 .setHitCount(node->GetHitCount()) |
| 66 .setCallUID(node->GetCallUid()) | |
| 67 .setChildren(std::move(children)) | 66 .setChildren(std::move(children)) |
| 68 .setPositionTicks(std::move(positionTicks)) | 67 .setPositionTicks(std::move(positionTicks)) |
| 69 .setDeoptReason(node->GetBailoutReason()) | 68 .setDeoptReason(node->GetBailoutReason()) |
| 70 .setId(node->GetNodeId()).build(); | 69 .setId(node->GetNodeId()).build(); |
| 71 return result; | 70 return result; |
| 72 } | 71 } |
| 73 | 72 |
| 74 std::unique_ptr<protocol::Array<int>> buildInspectorObjectForSamples(v8::CpuProf
ile* v8profile) | 73 std::unique_ptr<protocol::Array<int>> buildInspectorObjectForSamples(v8::CpuProf
ile* v8profile) |
| 75 { | 74 { |
| 76 std::unique_ptr<protocol::Array<int>> array = protocol::Array<int>::create()
; | 75 std::unique_ptr<protocol::Array<int>> array = protocol::Array<int>::create()
; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 profile->Delete(); | 281 profile->Delete(); |
| 283 return result; | 282 return result; |
| 284 } | 283 } |
| 285 | 284 |
| 286 bool V8ProfilerAgentImpl::isRecording() const | 285 bool V8ProfilerAgentImpl::isRecording() const |
| 287 { | 286 { |
| 288 return m_recordingCPUProfile || !m_startedProfiles.empty(); | 287 return m_recordingCPUProfile || !m_startedProfiles.empty(); |
| 289 } | 288 } |
| 290 | 289 |
| 291 } // namespace blink | 290 } // namespace blink |
| OLD | NEW |