V8 Project
v8::internal::JitLogger Class Reference
+ Inheritance diagram for v8::internal::JitLogger:
+ Collaboration diagram for v8::internal::JitLogger:

Public Member Functions

 JitLogger (JitCodeEventHandler code_event_handler)
 
virtual void CodeMoveEvent (Address from, Address to)
 
virtual void CodeDisableOptEvent (Code *code, SharedFunctionInfo *shared)
 
virtual void CodeDeleteEvent (Address from)
 
virtual void AddCodeLinePosInfoEvent (void *jit_handler_data, int pc_offset, int position, JitCodeEvent::PositionType position_type)
 
void * StartCodePosInfoEvent ()
 
void EndCodePosInfoEvent (Code *code, void *jit_handler_data)
 
- Public Member Functions inherited from v8::internal::CodeEventLogger
 CodeEventLogger ()
 
virtual ~CodeEventLogger ()
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, const char *comment)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, Name *name)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, int args_count)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *name)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *source, int line, int column)
 
virtual void RegExpCodeCreateEvent (Code *code, String *source)
 
virtual void CallbackEvent (Name *name, Address entry_point)
 
virtual void GetterCallbackEvent (Name *name, Address entry_point)
 
virtual void SetterCallbackEvent (Name *name, Address entry_point)
 
virtual void SharedFunctionInfoMoveEvent (Address from, Address to)
 
virtual void CodeMovingGCEvent ()
 
- Public Member Functions inherited from v8::internal::CodeEventListener
virtual ~CodeEventListener ()
 

Private Member Functions

virtual void LogRecordedBuffer (Code *code, SharedFunctionInfo *shared, const char *name, int length)
 

Private Attributes

JitCodeEventHandler code_event_handler_
 

Detailed Description

Definition at line 472 of file log.cc.

Constructor & Destructor Documentation

◆ JitLogger()

v8::internal::JitLogger::JitLogger ( JitCodeEventHandler  code_event_handler)
explicit

Definition at line 498 of file log.cc.

499  : code_event_handler_(code_event_handler) {
500 }
JitCodeEventHandler code_event_handler_
Definition: log.cc:494

Member Function Documentation

◆ AddCodeLinePosInfoEvent()

void v8::internal::JitLogger::AddCodeLinePosInfoEvent ( void *  jit_handler_data,
int  pc_offset,
int  position,
JitCodeEvent::PositionType  position_type 
)
virtual

Definition at line 554 of file log.cc.

558  {
559  JitCodeEvent event;
560  memset(&event, 0, sizeof(event));
562  event.user_data = jit_handler_data;
563  event.line_info.offset = pc_offset;
564  event.line_info.pos = position;
565  event.line_info.position_type = position_type;
566 
567  code_event_handler_(&event);
568 }
@ CODE_ADD_LINE_POS_INFO
Definition: v8.h:4276

References v8::JitCodeEvent::CODE_ADD_LINE_POS_INFO, and code_event_handler_.

◆ CodeDeleteEvent()

void v8::internal::JitLogger::CodeDeleteEvent ( Address  from)
virtual

Implements v8::internal::CodeEventListener.

Definition at line 543 of file log.cc.

543  {
544  Code* from_code = Code::cast(HeapObject::FromAddress(from));
545 
546  JitCodeEvent event;
547  event.type = JitCodeEvent::CODE_REMOVED;
548  event.code_start = from_code->instruction_start();
549  event.code_len = from_code->instruction_size();
550 
551  code_event_handler_(&event);
552 }
static HeapObject * FromAddress(Address address)
Definition: objects-inl.h:1464
@ CODE_REMOVED
Definition: v8.h:4275

References code_event_handler_, v8::JitCodeEvent::CODE_REMOVED, v8::internal::HeapObject::FromAddress(), v8::internal::Code::instruction_size(), v8::internal::Code::instruction_start(), and v8::JitCodeEvent::type.

+ Here is the call graph for this function:

◆ CodeDisableOptEvent()

virtual void v8::internal::JitLogger::CodeDisableOptEvent ( Code code,
SharedFunctionInfo shared 
)
inlinevirtual

Implements v8::internal::CodeEventListener.

Definition at line 477 of file log.cc.

477 { }

◆ CodeMoveEvent()

void v8::internal::JitLogger::CodeMoveEvent ( Address  from,
Address  to 
)
virtual

Implements v8::internal::CodeEventListener.

Definition at line 523 of file log.cc.

523  {
524  Code* from_code = Code::cast(HeapObject::FromAddress(from));
525 
526  JitCodeEvent event;
527  event.type = JitCodeEvent::CODE_MOVED;
528  event.code_start = from_code->instruction_start();
529  event.code_len = from_code->instruction_size();
530 
531  // Calculate the header size.
532  const size_t header_size =
533  from_code->instruction_start() - reinterpret_cast<byte*>(from_code);
534 
535  // Calculate the new start address of the instructions.
536  event.new_code_start =
537  reinterpret_cast<byte*>(HeapObject::FromAddress(to)) + header_size;
538 
539  code_event_handler_(&event);
540 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file

References code_event_handler_, v8::JitCodeEvent::CODE_MOVED, v8::internal::HeapObject::FromAddress(), v8::internal::Code::instruction_size(), v8::internal::Code::instruction_start(), to(), and v8::JitCodeEvent::type.

+ Here is the call graph for this function:

◆ EndCodePosInfoEvent()

void v8::internal::JitLogger::EndCodePosInfoEvent ( Code code,
void *  jit_handler_data 
)

Definition at line 581 of file log.cc.

581  {
582  JitCodeEvent event;
583  memset(&event, 0, sizeof(event));
585  event.code_start = code->instruction_start();
586  event.user_data = jit_handler_data;
587 
588  code_event_handler_(&event);
589 }
@ CODE_END_LINE_INFO_RECORDING
Definition: v8.h:4278

References v8::JitCodeEvent::CODE_END_LINE_INFO_RECORDING, code_event_handler_, and v8::internal::Code::instruction_start().

+ Here is the call graph for this function:

◆ LogRecordedBuffer()

void v8::internal::JitLogger::LogRecordedBuffer ( Code code,
SharedFunctionInfo shared,
const char *  name,
int  length 
)
privatevirtual

Implements v8::internal::CodeEventLogger.

Definition at line 503 of file log.cc.

506  {
507  JitCodeEvent event;
508  memset(&event, 0, sizeof(event));
509  event.type = JitCodeEvent::CODE_ADDED;
510  event.code_start = code->instruction_start();
511  event.code_len = code->instruction_size();
512  Handle<SharedFunctionInfo> shared_function_handle;
513  if (shared && shared->script()->IsScript()) {
514  shared_function_handle = Handle<SharedFunctionInfo>(shared);
515  }
516  event.script = ToApiHandle<v8::UnboundScript>(shared_function_handle);
517  event.name.str = name;
518  event.name.len = length;
519  code_event_handler_(&event);
520 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name

References v8::JitCodeEvent::CODE_ADDED, code_event_handler_, v8::internal::Code::instruction_size(), v8::internal::Code::instruction_start(), and name.

+ Here is the call graph for this function:

◆ StartCodePosInfoEvent()

void * v8::internal::JitLogger::StartCodePosInfoEvent ( )

Definition at line 571 of file log.cc.

571  {
572  JitCodeEvent event;
573  memset(&event, 0, sizeof(event));
575 
576  code_event_handler_(&event);
577  return event.user_data;
578 }
@ CODE_START_LINE_INFO_RECORDING
Definition: v8.h:4277

References code_event_handler_, and v8::JitCodeEvent::CODE_START_LINE_INFO_RECORDING.

Referenced by v8::internal::Logger::CodeStartLinePosInfoRecordEvent().

+ Here is the caller graph for this function:

Member Data Documentation

◆ code_event_handler_

JitCodeEventHandler v8::internal::JitLogger::code_event_handler_
private

The documentation for this class was generated from the following file: