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 | 27 |
28 #ifdef V8_OS_WIN | |
29 template class V8_EXPORT std::vector<CpuProfileDeoptFrame>; | |
30 #endif | |
31 | |
32 | |
33 struct V8_EXPORT CpuProfileDeoptInfo { | 28 struct V8_EXPORT CpuProfileDeoptInfo { |
34 /** A pointer to a static string owned by v8. */ | 29 /** A pointer to a static string owned by v8. */ |
35 const char* deopt_reason; | 30 const char* deopt_reason; |
36 std::vector<CpuProfileDeoptFrame> stack; | 31 std::vector<CpuProfileDeoptFrame> stack; |
loislo
2015/04/09 20:23:21
template class needs to be defined before the firs
Nico
2015/04/09 20:50:11
Yeah, I just noticed. I have set up a v8 upstream
| |
37 }; | 32 }; |
38 | 33 |
34 } // namespace v8 | |
39 | 35 |
40 #ifdef V8_OS_WIN | 36 #ifdef V8_OS_WIN |
41 template class V8_EXPORT std::vector<CpuProfileDeoptInfo>; | 37 template class V8_EXPORT std::vector<v8::CpuProfileDeoptFrame>; |
38 template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>; | |
42 #endif | 39 #endif |
43 | 40 |
41 namespace v8 { | |
44 | 42 |
45 /** | 43 /** |
46 * CpuProfileNode represents a node in a call graph. | 44 * CpuProfileNode represents a node in a call graph. |
47 */ | 45 */ |
48 class V8_EXPORT CpuProfileNode { | 46 class V8_EXPORT CpuProfileNode { |
49 public: | 47 public: |
50 struct LineTick { | 48 struct LineTick { |
51 /** The 1-based number of the source line where the function originates. */ | 49 /** The 1-based number of the source line where the function originates. */ |
52 int line; | 50 int line; |
53 | 51 |
(...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. | 631 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. | 632 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. | 633 uint32_t size; // New value of size field for the interval with this index. |
636 }; | 634 }; |
637 | 635 |
638 | 636 |
639 } // namespace v8 | 637 } // namespace v8 |
640 | 638 |
641 | 639 |
642 #endif // V8_V8_PROFILER_H_ | 640 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |