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

Unified Diff: src/profile-generator.h

Issue 1012633002: CpuProfiler: Push inlining data forward to cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaselined 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
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 7ea168bcdafbb3f1994dfc16e9d4eaf8f11698c7..ae5a7c27b3e9dc8b12f71680e7ba3b09151ba939 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -36,6 +36,21 @@ 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;
+ void AddInlineFrame(int script_id, int position) {
+ Frame frame = {script_id, position};
+ stack.push_back(frame);
+ }
+};
+
+
class CodeEntry {
public:
// CodeEntry doesn't own name strings, just references them.
@@ -65,11 +80,14 @@ class CodeEntry {
}
const char* bailout_reason() const { return bailout_reason_; }
- void set_deopt_info(const char* deopt_reason, SourcePosition position) {
+ void set_deopt_info(const char* deopt_reason, SourcePosition position,
+ int pc_offset) {
DCHECK(deopt_position_.IsUnknown());
deopt_reason_ = deopt_reason;
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(); }
@@ -86,6 +104,15 @@ class CodeEntry {
void set_no_frame_ranges(List<OffsetRange>* ranges) {
no_frame_ranges_ = ranges;
}
+ void set_inlined_function_infos(std::vector<InlinedFunctionInfo>* infos) {
+ DCHECK(!inlined_function_infos_);
+ inlined_function_infos_ = infos;
+ }
+ std::vector<InlinedFunctionInfo>* ReleaseInlinedFunctionInfos() {
+ std::vector<InlinedFunctionInfo>* tmp = inlined_function_infos_;
+ inlined_function_infos_ = NULL;
+ return tmp;
+ }
void SetBuiltinId(Builtins::Name id);
Builtins::Name builtin_id() const {
@@ -121,9 +148,12 @@ class CodeEntry {
const char* bailout_reason_;
const char* deopt_reason_;
SourcePosition deopt_position_;
+ int pc_offset_;
JITLineInfoTable* line_info_;
Address instruction_start_;
+ std::vector<InlinedFunctionInfo>* inlined_function_infos_;
+
DISALLOW_COPY_AND_ASSIGN(CodeEntry);
};
@@ -131,17 +161,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);
@@ -160,7 +179,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);
@@ -183,7 +202,8 @@ class ProfileNode {
unsigned id_;
HashMap line_ticks_;
- List<DeoptInfo> deopt_infos_;
+ std::vector<DeoptInfo> deopt_infos_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileNode);
};
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698