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

Unified Diff: src/profile-generator.h

Issue 1013143003: CpuProfiler: push the collected information about deopts to cpu profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 9 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
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 4f44c4c8abc9ba55ec1411234662307c73734fa0..e013e29c5db77a1e9852c5a9ef691f789cb96e77 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -36,6 +36,17 @@ class JITLineInfoTable : public Malloced {
DISALLOW_COPY_AND_ASSIGN(JITLineInfoTable);
};
+
+struct DeoptInfo {
+ const char* deopt_reason;
+ struct Frame {
+ int script_id;
+ int position;
+ };
+ std::vector<Frame> stack;
+};
+
+
class CodeEntry {
public:
// CodeEntry doesn't own name strings, just references them.
@@ -72,6 +83,7 @@ class CodeEntry {
deopt_position_ = position;
pc_offset_ = pc_offset;
}
+ DeoptInfo GetDeoptInfo();
const char* deopt_reason() const { return deopt_reason_; }
SourcePosition deopt_position() const { return deopt_position_; }
bool has_deopt_info() const { return !deopt_position_.IsUnknown(); }
@@ -88,6 +100,13 @@ class CodeEntry {
void set_no_frame_ranges(List<OffsetRange>* ranges) {
no_frame_ranges_ = ranges;
}
+ void set_inlined_function_infos(
+ const std::vector<InlinedFunctionInfo>& infos) {
+ inlined_function_infos_ = infos;
+ }
+ const std::vector<InlinedFunctionInfo> inlined_function_infos() {
+ return inlined_function_infos_;
+ }
void SetBuiltinId(Builtins::Name id);
Builtins::Name builtin_id() const {
@@ -127,6 +146,8 @@ class CodeEntry {
JITLineInfoTable* line_info_;
Address instruction_start_;
+ std::vector<InlinedFunctionInfo> inlined_function_infos_;
+
DISALLOW_COPY_AND_ASSIGN(CodeEntry);
};
@@ -134,17 +155,6 @@ class CodeEntry {
class ProfileTree;
class ProfileNode {
- private:
- struct DeoptInfo {
- DeoptInfo(const char* deopt_reason, SourcePosition deopt_position)
- : deopt_reason(deopt_reason), deopt_position(deopt_position) {}
- DeoptInfo(const DeoptInfo& info)
- : deopt_reason(info.deopt_reason),
- deopt_position(info.deopt_position) {}
- const char* deopt_reason;
- SourcePosition deopt_position;
- };
-
public:
inline ProfileNode(ProfileTree* tree, CodeEntry* entry);
@@ -163,7 +173,7 @@ class ProfileNode {
bool GetLineTicks(v8::CpuProfileNode::LineTick* entries,
unsigned int length) const;
void CollectDeoptInfo(CodeEntry* entry);
- const List<DeoptInfo>& deopt_infos() const { return deopt_infos_; }
+ const std::vector<DeoptInfo>& deopt_infos() const { return deopt_infos_; }
void Print(int indent);
@@ -186,7 +196,8 @@ class ProfileNode {
unsigned id_;
HashMap line_ticks_;
- List<DeoptInfo> deopt_infos_;
+ std::vector<DeoptInfo> deopt_infos_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileNode);
};
« src/compiler.h ('K') | « src/hydrogen.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698