Index: src/log.h |
=================================================================== |
--- src/log.h (revision 13419) |
+++ src/log.h (working copy) |
@@ -162,7 +162,8 @@ |
// Sets the current code event handler. |
void SetCodeEventHandler(uint32_t options, |
- JitCodeEventHandler event_handler); |
+ JitCodeEventHandler event_handler, |
+ bool support_moved_code); |
void EnsureTickerStarted(); |
void EnsureTickerStopped(); |
@@ -246,6 +247,16 @@ |
void CodeMoveEvent(Address from, Address to); |
// Emits a code delete event. |
void CodeDeleteEvent(Address from); |
+ // Emits a code line info add event. |
+ void CodeLinePosInfoAddEvent(void* line_info, |
+ int pc_offset, |
+ int position, |
+ JitCodeEvent::PositionType position_type); |
danno
2013/02/01 13:43:10
It seems like passing types associated with JitCod
|
+ // Emits a code line info start to record event |
+ void* CodeStartLinePosInfoRecordEvent(); |
+ // Emits a code line info finish record event. |
+ // It's the callee's responsibility to dispose the parameter line_info data. |
+ void CodeEndLinePosInfoRecordEvent(Code* code, void* line_info); |
void SharedFunctionInfoMoveEvent(Address from, Address to); |
@@ -315,6 +326,18 @@ |
return logging_nesting_ > 0; |
} |
+ bool is_code_event_handler_enabled() { |
+ return code_event_handler_ != NULL; |
+ } |
+ |
+ bool is_moved_code_supported() { |
+ if (is_code_event_handler_enabled()) { |
+ return support_moved_code_; |
+ } else { |
+ return true; |
+ } |
+ } |
+ |
bool is_logging_code_events() { |
return is_logging() || code_event_handler_ != NULL; |
} |
@@ -358,10 +381,18 @@ |
~Logger(); |
// Issue code notifications. |
- void IssueCodeAddedEvent(Code* code, const char* name, size_t name_len); |
+ void IssueCodeAddedEvent(Code* code, |
+ Script* script, |
+ const char* name, |
+ size_t name_len); |
void IssueCodeMovedEvent(Address from, Address to); |
void IssueCodeRemovedEvent(Address from); |
- |
+ void IssueAddCodeLinePosInfoEvent(void* line_info, |
+ int pc_offset, |
+ int position, |
+ JitCodeEvent::PositionType position_Type); |
+ void* IssueStartCodePosInfoEvent(); |
+ void IssueEndCodePosInfoEvent(Code* code, void* line_info); |
// Emits the profiler's first message. |
void ProfilerBeginEvent(); |
@@ -461,6 +492,9 @@ |
// The code event handler - if any. |
JitCodeEventHandler code_event_handler_; |
+ // Whether the code move is supported when JitCodeEventHandler is set. |
+ bool support_moved_code_; |
+ |
// Support for 'incremental addresses' in compressed logs: |
// LogMessageBuilder::AppendAddress(Address addr) |
Address last_address_; |