OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 int GetChildrenCount() const; | 109 int GetChildrenCount() const; |
110 | 110 |
111 /** Retrieves a child node by index. */ | 111 /** Retrieves a child node by index. */ |
112 const CpuProfileNode* GetChild(int index) const; | 112 const CpuProfileNode* GetChild(int index) const; |
113 | 113 |
114 static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; | 114 static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; |
115 }; | 115 }; |
116 | 116 |
117 | 117 |
118 /** | 118 /** |
119 * CpuProfile contains a CPU profile in a form of two call trees: | 119 * CpuProfile contains a CPU profile in a form of top-down call tree |
120 * - top-down (from main() down to functions that do all the work); | 120 * (from main() down to functions that do all the work). |
121 * - bottom-up call graph (in backward direction). | |
122 */ | 121 */ |
123 class V8EXPORT CpuProfile { | 122 class V8EXPORT CpuProfile { |
124 public: | 123 public: |
125 /** Returns CPU profile UID (assigned by the profiler.) */ | 124 /** Returns CPU profile UID (assigned by the profiler.) */ |
126 unsigned GetUid() const; | 125 unsigned GetUid() const; |
127 | 126 |
128 /** Returns CPU profile title. */ | 127 /** Returns CPU profile title. */ |
129 Handle<String> GetTitle() const; | 128 Handle<String> GetTitle() const; |
130 | 129 |
131 /** Returns the root node of the bottom up call tree. */ | |
132 const CpuProfileNode* GetBottomUpRoot() const; | |
133 | |
134 /** Returns the root node of the top down call tree. */ | 130 /** Returns the root node of the top down call tree. */ |
135 const CpuProfileNode* GetTopDownRoot() const; | 131 const CpuProfileNode* GetTopDownRoot() const; |
136 | 132 |
137 /** | 133 /** |
138 * Deletes the profile and removes it from CpuProfiler's list. | 134 * Deletes the profile and removes it from CpuProfiler's list. |
139 * All pointers to nodes previously returned become invalid. | 135 * All pointers to nodes previously returned become invalid. |
140 * Profiles with the same uid but obtained using different | 136 * Profiles with the same uid but obtained using different |
141 * security token are not deleted, but become inaccessible | 137 * security token are not deleted, but become inaccessible |
142 * using FindProfile method. It is embedder's responsibility | 138 * using FindProfile method. It is embedder's responsibility |
143 * to call Delete on these profiles. | 139 * to call Delete on these profiles. |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 }; | 568 }; |
573 | 569 |
574 | 570 |
575 } // namespace v8 | 571 } // namespace v8 |
576 | 572 |
577 | 573 |
578 #undef V8EXPORT | 574 #undef V8EXPORT |
579 | 575 |
580 | 576 |
581 #endif // V8_V8_PROFILER_H_ | 577 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |