Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index f9439c2e629445c610b226438a21f82b2687b8de..a5e7d95e067f7c9209dbffc6e511fee7353b0944 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -17,6 +17,33 @@ struct HeapStatsUpdate; |
typedef uint32_t SnapshotObjectId; |
+ |
+class V8_EXPORT CpuProfileDeoptInfo { |
+ public: |
+ struct Frame { |
+ int script_id; |
+ unsigned int position; |
yurys
2015/03/30 13:20:18
unsigned
|
+ }; |
+ |
+ /** Retrieves the reason of deopt. */ |
+ const char* GetDeoptReason() const; |
+ |
+ /** |
+ * Retrieves a height of inlined functions stack for the location |
+ * where the deopt happened. I.e. if function A inlined B which inlined C |
+ * and the deopt happened in the code which belongs to the inlined C |
+ * then we will get 3 frames. The first for C where deopt happened. |
alph
2015/03/30 13:10:33
... then there will be 3 frames.
|
+ * The second for B where C was inlined and the third for A where B was |
+ * inlined. If there were no inlines then there will be the only frame |
+ * for A with the location of the deopt. |
+ */ |
+ unsigned GetFramesCount() const; |
yurys
2015/03/30 13:20:18
Why not return a pointer/reference to std::vector<
|
+ |
+ /** Returns the deopt frame and a few inline frames.*/ |
alph
2015/03/30 13:10:33
drop 'a few'
|
+ bool GetCallFrames(Frame* frames, unsigned int length) const; |
yurys
2015/03/30 13:20:18
ditto
|
+}; |
+ |
+ |
/** |
* CpuProfileNode represents a node in a call graph. |
*/ |
@@ -85,6 +112,12 @@ class V8_EXPORT CpuProfileNode { |
/** Retrieves a child node by index. */ |
const CpuProfileNode* GetChild(int index) const; |
+ /** Retrieves a number of deopts happened on the node. */ |
+ unsigned GetDeoptCount() const; |
+ |
+ /** Retrieves a particular deopt for the node. */ |
+ const CpuProfileDeoptInfo* GetDeoptInfo(unsigned index) const; |
+ |
static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; |
static const int kNoColumnNumberInfo = Message::kNoColumnInfo; |
}; |