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 <v8-profiler.h> | |
8 #include "src/inspector/Atomics.h" | 7 #include "src/inspector/Atomics.h" |
9 #include "src/inspector/StringUtil.h" | 8 #include "src/inspector/StringUtil.h" |
10 #include "src/inspector/V8Debugger.h" | 9 #include "src/inspector/V8Debugger.h" |
11 #include "src/inspector/V8InspectorImpl.h" | 10 #include "src/inspector/V8InspectorImpl.h" |
12 #include "src/inspector/V8InspectorSessionImpl.h" | 11 #include "src/inspector/V8InspectorSessionImpl.h" |
13 #include "src/inspector/V8StackTraceImpl.h" | 12 #include "src/inspector/V8StackTraceImpl.h" |
14 #include "src/inspector/protocol/Protocol.h" | 13 #include "src/inspector/protocol/Protocol.h" |
15 | 14 |
| 15 #include "include/v8-profiler.h" |
| 16 |
16 #include <vector> | 17 #include <vector> |
17 | 18 |
18 #define ENSURE_V8_VERSION(major, minor) \ | 19 #define ENSURE_V8_VERSION(major, minor) \ |
19 (V8_MAJOR_VERSION * 1000 + V8_MINOR_VERSION >= (major)*1000 + (minor)) | 20 (V8_MAJOR_VERSION * 1000 + V8_MINOR_VERSION >= (major)*1000 + (minor)) |
20 | 21 |
21 namespace v8_inspector { | 22 namespace v8_inspector { |
22 | 23 |
23 namespace ProfilerAgentState { | 24 namespace ProfilerAgentState { |
24 static const char samplingInterval[] = "samplingInterval"; | 25 static const char samplingInterval[] = "samplingInterval"; |
25 static const char userInitiatedProfiling[] = "userInitiatedProfiling"; | 26 static const char userInitiatedProfiling[] = "userInitiatedProfiling"; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 316 |
316 v8::CpuProfiler* V8ProfilerAgentImpl::profiler() { | 317 v8::CpuProfiler* V8ProfilerAgentImpl::profiler() { |
317 #if ENSURE_V8_VERSION(5, 4) | 318 #if ENSURE_V8_VERSION(5, 4) |
318 return m_profiler; | 319 return m_profiler; |
319 #else | 320 #else |
320 return m_isolate->GetCpuProfiler(); | 321 return m_isolate->GetCpuProfiler(); |
321 #endif | 322 #endif |
322 } | 323 } |
323 | 324 |
324 } // namespace v8_inspector | 325 } // namespace v8_inspector |
OLD | NEW |