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

Unified Diff: src/profiler/profile-generator.h

Issue 2561773002: Revert of Merged: [cpu-profiler] use new source position information for deoptimization in cpu profiler (Closed)
Patch Set: Created 4 years 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/profiler/cpu-profiler-inl.h ('k') | src/profiler/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/profile-generator.h
diff --git a/src/profiler/profile-generator.h b/src/profiler/profile-generator.h
index 1b3cad6dc3ee7a2aa804103884d369ee769c9143..f26f4f239c9b6b3a5c7326d69f9d7f6839c9691c 100644
--- a/src/profiler/profile-generator.h
+++ b/src/profiler/profile-generator.h
@@ -48,6 +48,13 @@
JITLineInfoTable* line_info = NULL,
Address instruction_start = NULL);
~CodeEntry();
+
+ // Container describing inlined frames at eager deopt points. Is eventually
+ // being translated into v8::CpuProfileDeoptFrame by the profiler.
+ struct DeoptInlinedFrame {
+ int position;
+ int script_id;
+ };
const char* name_prefix() const { return name_prefix_; }
bool has_name_prefix() const { return name_prefix_[0] != '\0'; }
@@ -65,15 +72,18 @@
}
const char* bailout_reason() const { return bailout_reason_; }
- void set_deopt_info(const char* deopt_reason, int deopt_id) {
+ void set_deopt_info(const char* deopt_reason, SourcePosition position,
+ int deopt_id) {
DCHECK(!has_deopt_info());
deopt_reason_ = deopt_reason;
+ deopt_position_ = position;
deopt_id_ = deopt_id;
}
CpuProfileDeoptInfo GetDeoptInfo();
bool has_deopt_info() const { return deopt_id_ != kNoDeoptimizationId; }
void clear_deopt_info() {
deopt_reason_ = kNoDeoptReason;
+ deopt_position_ = SourcePosition::Unknown();
deopt_id_ = kNoDeoptimizationId;
}
@@ -89,10 +99,10 @@
int GetSourceLine(int pc_offset) const;
- void AddInlineStack(int pc_offset, std::vector<CodeEntry*> inline_stack);
+ void AddInlineStack(int pc_offset, std::vector<CodeEntry*>& inline_stack);
const std::vector<CodeEntry*>* GetInlineStack(int pc_offset) const;
- void AddDeoptInlinedFrames(int deopt_id, std::vector<CpuProfileDeoptFrame>);
+ void AddDeoptInlinedFrames(int deopt_id, std::vector<DeoptInlinedFrame>&);
bool HasDeoptInlinedFramesFor(int deopt_id) const;
Address instruction_start() const { return instruction_start_; }
@@ -157,12 +167,13 @@
int position_;
const char* bailout_reason_;
const char* deopt_reason_;
+ SourcePosition deopt_position_;
int deopt_id_;
JITLineInfoTable* line_info_;
Address instruction_start_;
// Should be an unordered_map, but it doesn't currently work on Win & MacOS.
std::map<int, std::vector<CodeEntry*>> inline_locations_;
- std::map<int, std::vector<CpuProfileDeoptFrame>> deopt_inlined_frames_;
+ std::map<int, std::vector<DeoptInlinedFrame>> deopt_inlined_frames_;
DISALLOW_COPY_AND_ASSIGN(CodeEntry);
};
« no previous file with comments | « src/profiler/cpu-profiler-inl.h ('k') | src/profiler/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698