Index: src/cpu-profiler.h |
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h |
index 4dc5643aa1bc73fe8ccbcba72492e07f0d71ed2a..140de3b906084df41fe9e10d2549bd24195b805e 100644 |
--- a/src/cpu-profiler.h |
+++ b/src/cpu-profiler.h |
@@ -23,12 +23,13 @@ class CpuProfile; |
class CpuProfilesCollection; |
class ProfileGenerator; |
-#define CODE_EVENTS_TYPE_LIST(V) \ |
- V(CODE_CREATION, CodeCreateEventRecord) \ |
- V(CODE_MOVE, CodeMoveEventRecord) \ |
- V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \ |
- V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \ |
- V(REPORT_BUILTIN, ReportBuiltinEventRecord) |
+#define CODE_EVENTS_TYPE_LIST(V) \ |
+ V(CODE_CREATION, CodeCreateEventRecord) \ |
+ V(CODE_MOVE, CodeMoveEventRecord) \ |
+ V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \ |
+ V(CODE_DEOPT, CodeDeoptEventRecord) \ |
+ V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \ |
+ V(REPORT_BUILTIN, ReportBuiltinEventRecord) |
class CodeEventRecord { |
@@ -75,6 +76,16 @@ class CodeDisableOptEventRecord : public CodeEventRecord { |
}; |
+class CodeDeoptEventRecord : public CodeEventRecord { |
+ public: |
+ Address start; |
+ const char* deopt_reason; |
+ int raw_position; |
+ |
+ INLINE(void UpdateCodeMap(CodeMap* code_map)); |
+}; |
+ |
+ |
class SharedFunctionInfoMoveEventRecord : public CodeEventRecord { |
public: |
Address from; |
@@ -137,6 +148,7 @@ class ProfilerEventsProcessor : public base::Thread { |
// Puts current stack into tick sample events buffer. |
void AddCurrentStack(Isolate* isolate); |
+ void AddDeoptStack(Isolate* isolate, Address from, int fp_to_sp_delta); |
// Tick sample events are filled directly in the buffer of the circular |
// queue (because the structure is of fixed width, but usually not all |
@@ -233,6 +245,8 @@ class CpuProfiler : public CodeEventListener { |
virtual void CodeMovingGCEvent() {} |
virtual void CodeMoveEvent(Address from, Address to); |
virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared); |
+ virtual void CodeDeoptEvent(Code* code, int bailout_id, Address pc, |
+ int fp_to_sp_delta); |
virtual void CodeDeleteEvent(Address from); |
virtual void GetterCallbackEvent(Name* name, Address entry_point); |
virtual void RegExpCodeCreateEvent(Code* code, String* source); |