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

Unified Diff: runtime/vm/deopt_instructions.h

Issue 1557533002: Eliminate excessive increment of deoptimization counters (e.g., with deep recursion of deoptimized … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 5 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 | « runtime/vm/deferred_objects.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.h
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h
index 79c206e3a88bef172348039c1695881632d4796b..acbf92bb57892d79d0cbd1145af2721175cddb7f 100644
--- a/runtime/vm/deopt_instructions.h
+++ b/runtime/vm/deopt_instructions.h
@@ -23,6 +23,7 @@ class StackFrame;
class TimelineEvent;
// Holds all data relevant for execution of deoptimization instructions.
+// Structure is allocated in C-heap.
class DeoptContext {
public:
enum DestFrameOptions {
@@ -30,12 +31,14 @@ class DeoptContext {
kDestIsAllocated // Write deopt frame to a buffer.
};
+ // If 'deoptimizing_code' is false, only frame is being deoptimized.
DeoptContext(const StackFrame* frame,
const Code& code,
DestFrameOptions dest_options,
fpu_register_t* fpu_registers,
intptr_t* cpu_registers,
- bool is_lazy_deopt);
+ bool is_lazy_deopt,
+ bool deoptimizing_code);
virtual ~DeoptContext();
// Returns the offset of the dest fp from the dest sp. Used in
@@ -97,6 +100,8 @@ class DeoptContext {
bool is_lazy_deopt() const { return is_lazy_deopt_; }
+ bool deoptimizing_code() const { return deoptimizing_code_; }
+
ICData::DeoptReasonId deopt_reason() const { return deopt_reason_; }
bool HasDeoptFlag(ICData::DeoptFlags flag) {
return (deopt_flags_ & flag) != 0;
@@ -232,6 +237,7 @@ class DeoptContext {
DeferredObject** deferred_objects_;
const bool is_lazy_deopt_;
+ const bool deoptimizing_code_;
DISALLOW_COPY_AND_ASSIGN(DeoptContext);
};
« no previous file with comments | « runtime/vm/deferred_objects.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698