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

Unified 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: unnecessary typedef was removed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index f9439c2e629445c610b226438a21f82b2687b8de..4d8dc22fb2047e686a18f9d18cce1e86476198a2 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -5,6 +5,7 @@
#ifndef V8_V8_PROFILER_H_
#define V8_V8_PROFILER_H_
+#include <vector>
#include "v8.h"
/**
@@ -17,6 +18,30 @@ struct HeapStatsUpdate;
typedef uint32_t SnapshotObjectId;
+
+struct CpuProfileDeoptFrame {
+ int script_id;
+ size_t position;
+};
+
+
+#ifdef V8_OS_WIN
+template class V8_EXPORT std::vector<CpuProfileDeoptFrame>;
+#endif
+
+
+struct V8_EXPORT CpuProfileDeoptInfo {
+ /** A pointer to a static string owned by v8. */
+ const char* deopt_reason;
+ std::vector<CpuProfileDeoptFrame> stack;
+};
+
+
+#ifdef V8_OS_WIN
+template class V8_EXPORT std::vector<CpuProfileDeoptInfo>;
+#endif
+
+
/**
* CpuProfileNode represents a node in a call graph.
*/
@@ -85,6 +110,9 @@ class V8_EXPORT CpuProfileNode {
/** Retrieves a child node by index. */
const CpuProfileNode* GetChild(int index) const;
+ /** Retrieves deopt infos for the node. */
+ const std::vector<CpuProfileDeoptInfo>& GetDeoptInfos() const;
+
static const int kNoLineNumberInfo = Message::kNoLineNumberInfo;
static const int kNoColumnNumberInfo = Message::kNoColumnInfo;
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698