OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 #ifndef V8_V8_PROFILER_H_ | 5 #ifndef V8_V8_PROFILER_H_ |
6 #define V8_V8_PROFILER_H_ | 6 #define V8_V8_PROFILER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "v8.h" | 9 #include "v8.h" |
10 | 10 |
11 /** | 11 /** |
12 * Profiler support for the V8 JavaScript engine. | 12 * Profiler support for the V8 JavaScript engine. |
13 */ | 13 */ |
14 namespace v8 { | 14 namespace v8 { |
15 | 15 |
16 class HeapGraphNode; | 16 class HeapGraphNode; |
17 struct HeapStatsUpdate; | 17 struct HeapStatsUpdate; |
18 | 18 |
19 typedef uint32_t SnapshotObjectId; | 19 typedef uint32_t SnapshotObjectId; |
20 | 20 |
21 | 21 |
22 struct CpuProfileDeoptFrame { | 22 struct CpuProfileDeoptFrame { |
23 int script_id; | 23 int script_id; |
24 size_t position; | 24 size_t position; |
25 }; | 25 }; |
26 | 26 |
| 27 } // namespace v8 |
27 | 28 |
28 #ifdef V8_OS_WIN | 29 #ifdef V8_OS_WIN |
29 template class V8_EXPORT std::vector<CpuProfileDeoptFrame>; | 30 template class V8_EXPORT std::vector<v8::CpuProfileDeoptFrame>; |
30 #endif | 31 #endif |
31 | 32 |
| 33 namespace v8 { |
32 | 34 |
33 struct V8_EXPORT CpuProfileDeoptInfo { | 35 struct V8_EXPORT CpuProfileDeoptInfo { |
34 /** A pointer to a static string owned by v8. */ | 36 /** A pointer to a static string owned by v8. */ |
35 const char* deopt_reason; | 37 const char* deopt_reason; |
36 std::vector<CpuProfileDeoptFrame> stack; | 38 std::vector<CpuProfileDeoptFrame> stack; |
37 }; | 39 }; |
38 | 40 |
| 41 } // namespace v8 |
39 | 42 |
40 #ifdef V8_OS_WIN | 43 #ifdef V8_OS_WIN |
41 template class V8_EXPORT std::vector<CpuProfileDeoptInfo>; | 44 template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>; |
42 #endif | 45 #endif |
43 | 46 |
| 47 namespace v8 { |
44 | 48 |
45 /** | 49 /** |
46 * CpuProfileNode represents a node in a call graph. | 50 * CpuProfileNode represents a node in a call graph. |
47 */ | 51 */ |
48 class V8_EXPORT CpuProfileNode { | 52 class V8_EXPORT CpuProfileNode { |
49 public: | 53 public: |
50 struct LineTick { | 54 struct LineTick { |
51 /** The 1-based number of the source line where the function originates. */ | 55 /** The 1-based number of the source line where the function originates. */ |
52 int line; | 56 int line; |
53 | 57 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 uint32_t index; // Index of the time interval that was changed. | 637 uint32_t index; // Index of the time interval that was changed. |
634 uint32_t count; // New value of count field for the interval with this index. | 638 uint32_t count; // New value of count field for the interval with this index. |
635 uint32_t size; // New value of size field for the interval with this index. | 639 uint32_t size; // New value of size field for the interval with this index. |
636 }; | 640 }; |
637 | 641 |
638 | 642 |
639 } // namespace v8 | 643 } // namespace v8 |
640 | 644 |
641 | 645 |
642 #endif // V8_V8_PROFILER_H_ | 646 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |