Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: include/v8-profiler.h

Issue 1045753002: CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: size_t Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-cpu-profiler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "v8.h" 8 #include "v8.h"
9 9
10 /** 10 /**
11 * Profiler support for the V8 JavaScript engine. 11 * Profiler support for the V8 JavaScript engine.
12 */ 12 */
13 namespace v8 { 13 namespace v8 {
14 14
15 class HeapGraphNode; 15 class HeapGraphNode;
16 struct HeapStatsUpdate; 16 struct HeapStatsUpdate;
17 17
18 typedef uint32_t SnapshotObjectId; 18 typedef uint32_t SnapshotObjectId;
19 19
20
21 class V8_EXPORT CpuProfileDeoptInfo {
22 public:
23 struct Frame {
24 int script_id;
25 unsigned int position;
26 };
27
28 const char* GetDeoptReason() const;
29 unsigned GetFramesCount() const;
30 bool GetCallFrames(Frame* frames, unsigned int length) const;
31 };
32
33
20 /** 34 /**
21 * CpuProfileNode represents a node in a call graph. 35 * CpuProfileNode represents a node in a call graph.
22 */ 36 */
23 class V8_EXPORT CpuProfileNode { 37 class V8_EXPORT CpuProfileNode {
24 public: 38 public:
25 struct LineTick { 39 struct LineTick {
26 /** The 1-based number of the source line where the function originates. */ 40 /** The 1-based number of the source line where the function originates. */
27 int line; 41 int line;
28 42
29 /** The count of samples associated with the source line. */ 43 /** The count of samples associated with the source line. */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 92
79 /** Returns id of the node. The id is unique within the tree */ 93 /** Returns id of the node. The id is unique within the tree */
80 unsigned GetNodeId() const; 94 unsigned GetNodeId() const;
81 95
82 /** Returns child nodes count of the node. */ 96 /** Returns child nodes count of the node. */
83 int GetChildrenCount() const; 97 int GetChildrenCount() const;
84 98
85 /** Retrieves a child node by index. */ 99 /** Retrieves a child node by index. */
86 const CpuProfileNode* GetChild(int index) const; 100 const CpuProfileNode* GetChild(int index) const;
87 101
102 /** Retrieves a child node by index. */
alph 2015/03/30 12:31:21 The comment belongs to the second function.
loislo 2015/03/30 13:04:22 done.
103 unsigned GetDeoptCount() const;
104
105 const CpuProfileDeoptInfo* GetDeoptInfo(unsigned index) const;
106
88 static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; 107 static const int kNoLineNumberInfo = Message::kNoLineNumberInfo;
89 static const int kNoColumnNumberInfo = Message::kNoColumnInfo; 108 static const int kNoColumnNumberInfo = Message::kNoColumnInfo;
90 }; 109 };
91 110
92 111
93 /** 112 /**
94 * CpuProfile contains a CPU profile in a form of top-down call tree 113 * CpuProfile contains a CPU profile in a form of top-down call tree
95 * (from main() down to functions that do all the work). 114 * (from main() down to functions that do all the work).
96 */ 115 */
97 class V8_EXPORT CpuProfile { 116 class V8_EXPORT CpuProfile {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 uint32_t index; // Index of the time interval that was changed. 624 uint32_t index; // Index of the time interval that was changed.
606 uint32_t count; // New value of count field for the interval with this index. 625 uint32_t count; // New value of count field for the interval with this index.
607 uint32_t size; // New value of size field for the interval with this index. 626 uint32_t size; // New value of size field for the interval with this index.
608 }; 627 };
609 628
610 629
611 } // namespace v8 630 } // namespace v8
612 631
613 632
614 #endif // V8_V8_PROFILER_H_ 633 #endif // V8_V8_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698