![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <log.h>
Public Member Functions | |
V8FileLogger (Isolate *isolate) | |
~V8FileLogger () override | |
bool | SetUp (Isolate *isolate) |
void | LateSetup (Isolate *isolate) |
V8_EXPORT_PRIVATE FILE * | TearDownAndGetLogFile () |
void | SetCodeEventHandler (uint32_t options, JitCodeEventHandler event_handler) |
sampler::Sampler * | sampler () |
V8_EXPORT_PRIVATE std::string | file_name () const |
V8_EXPORT_PRIVATE void | StopProfilerThread () |
V8_EXPORT_PRIVATE void | StringEvent (const char *name, const char *value) |
void | IntPtrTEvent (const char *name, intptr_t value) |
void | NewEvent (const char *name, void *object, size_t size) |
void | DeleteEvent (const char *name, void *object) |
void | FunctionEvent (const char *reason, int script_id, double time_delta_ms, int start_position, int end_position, Tagged< String > function_name) |
void | FunctionEvent (const char *reason, int script_id, double time_delta_ms, int start_position, int end_position, const char *function_name=nullptr, size_t function_name_length=0, bool is_one_byte=true) |
void | CompilationCacheEvent (const char *action, const char *cache_type, Tagged< SharedFunctionInfo > sfi) |
void | ScriptEvent (ScriptEventType type, int script_id) |
void | ScriptDetails (Tagged< Script > script) |
void | CodeCreateEvent (CodeTag tag, DirectHandle< AbstractCode > code, const char *name) override |
void | CodeCreateEvent (CodeTag tag, DirectHandle< AbstractCode > code, DirectHandle< Name > name) override |
void | CodeCreateEvent (CodeTag tag, DirectHandle< AbstractCode > code, DirectHandle< SharedFunctionInfo > shared, DirectHandle< Name > script_name) override |
void | CodeCreateEvent (CodeTag tag, DirectHandle< AbstractCode > code, DirectHandle< SharedFunctionInfo > shared, DirectHandle< Name > script_name, int line, int column) override |
void | CallbackEvent (DirectHandle< Name > name, Address entry_point) override |
void | GetterCallbackEvent (DirectHandle< Name > name, Address entry_point) override |
void | SetterCallbackEvent (DirectHandle< Name > name, Address entry_point) override |
void | RegExpCodeCreateEvent (DirectHandle< AbstractCode > code, DirectHandle< String > source, RegExpFlags flags) override |
void | CodeMoveEvent (Tagged< InstructionStream > from, Tagged< InstructionStream > to) override |
void | BytecodeMoveEvent (Tagged< BytecodeArray > from, Tagged< BytecodeArray > to) override |
void | SharedFunctionInfoMoveEvent (Address from, Address to) override |
void | NativeContextMoveEvent (Address from, Address to) override |
void | CodeMovingGCEvent () override |
void | CodeDisableOptEvent (DirectHandle< AbstractCode > code, DirectHandle< SharedFunctionInfo > shared) override |
void | CodeDeoptEvent (DirectHandle< Code > code, DeoptimizeKind kind, Address pc, int fp_to_sp_delta) override |
void | CodeDependencyChangeEvent (DirectHandle< Code > code, DirectHandle< SharedFunctionInfo > sfi, const char *reason) override |
void | FeedbackVectorEvent (Tagged< FeedbackVector > vector, Tagged< AbstractCode > code) |
void | WeakCodeClearEvent () override |
void | ProcessDeoptEvent (DirectHandle< Code > code, SourcePosition position, const char *kind, const char *reason) |
void | CodeLinePosInfoRecordEvent (Address code_start, Tagged< TrustedByteArray > source_position_table, JitCodeEvent::CodeType code_type) |
void | CodeNameEvent (Address addr, int pos, const char *code_name) |
void | ICEvent (const char *type, bool keyed, DirectHandle< Map > map, DirectHandle< Object > key, char old_state, char new_state, const char *modifier, const char *slow_stub_reason) |
void | MapEvent (const char *type, DirectHandle< Map > from, DirectHandle< Map > to, const char *reason=nullptr, DirectHandle< HeapObject > name_or_sfi=DirectHandle< HeapObject >()) |
void | MapCreate (Tagged< Map > map) |
void | MapDetails (Tagged< Map > map) |
void | MapMoveEvent (Tagged< Map > from, Tagged< Map > to) |
void | SharedLibraryEvent (const std::string &library_path, uintptr_t start, uintptr_t end, intptr_t aslr_slide) |
void | SharedLibraryEnd () |
void | CurrentTimeEvent () |
V8_EXPORT_PRIVATE void | TimerEvent (v8::LogEventStatus se, const char *name) |
V8_EXPORT_PRIVATE bool | is_logging () |
bool | is_listening_to_code_events () override |
bool | allows_code_compaction () override |
void | LogExistingFunction (DirectHandle< SharedFunctionInfo > shared, DirectHandle< AbstractCode > code) |
V8_EXPORT_PRIVATE void | LogCompiledFunctions (bool ensure_source_positions_available=true) |
V8_EXPORT_PRIVATE void | LogAccessorCallbacks () |
V8_EXPORT_PRIVATE void | LogCodeObjects () |
V8_EXPORT_PRIVATE void | LogBuiltins () |
void | LogAllMaps () |
![]() | |
virtual | ~LogEventListener ()=default |
Static Public Member Functions | |
static void | EnterExternal (Isolate *isolate) |
static void | LeaveExternal (Isolate *isolate) |
V8_NOINLINE static V8_PRESERVE_MOST void | CallEventLoggerInternal (Isolate *isolate, const char *name, v8::LogEventStatus se, bool expose_to_api) |
static V8_INLINE void | CallEventLogger (Isolate *isolate, const char *name, v8::LogEventStatus se, bool expose_to_api) |
static V8_INLINE CodeTag | ToNativeByScript (CodeTag tag, Tagged< Script > script) |
Static Public Attributes | |
static const LogSeparator | kNext = LogSeparator::kSeparator |
Private Attributes | |
Isolate * | isolate_ |
std::unique_ptr< Ticker > | ticker_ |
std::unique_ptr< Profiler > | profiler_ |
std::atomic< bool > | is_logging_ |
std::unique_ptr< LogFile > | log_file_ |
std::unique_ptr< LowLevelLogger > | ll_logger_ |
std::unique_ptr< JitLogger > | jit_logger_ |
std::set< int > | logged_source_code_ |
uint32_t | next_source_info_id_ = 0 |
bool | is_initialized_ |
ExistingCodeLogger | existing_code_logger_ |
base::ElapsedTimer | timer_ |
Friends | |
class | Profiler |
Additional Inherited Members | |
![]() | |
enum class | Event : uint8_t { LOG_EVENT_LIST =(DECLARE_ENUM) kLength } |
enum class | CodeTag : uint8_t { CODE_TYPE_LIST =(DECLARE_ENUM) kLength } |
|
explicit |
|
overridedefault |
|
inlineoverridevirtual |
Reimplemented from v8::internal::LogEventListener.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1683 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1649 of file log.cc.
|
private |
|
inlinestatic |
|
inlinestatic |
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1503 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1517 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1532 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1586 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1737 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1746 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1701 of file log.cc.
void v8::internal::V8FileLogger::CodeLinePosInfoRecordEvent | ( | Address | code_start, |
Tagged< TrustedByteArray > | source_position_table, | ||
JitCodeEvent::CodeType | code_type ) |
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1676 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1695 of file log.cc.
void v8::internal::V8FileLogger::CodeNameEvent | ( | Address | addr, |
int | pos, | ||
const char * | code_name ) |
void v8::internal::V8FileLogger::CompilationCacheEvent | ( | const char * | action, |
const char * | cache_type, | ||
Tagged< SharedFunctionInfo > | sfi ) |
void v8::internal::V8FileLogger::CurrentTimeEvent | ( | ) |
void v8::internal::V8FileLogger::DeleteEvent | ( | const char * | name, |
void * | object ) |
|
static |
void v8::internal::V8FileLogger::FeedbackVectorEvent | ( | Tagged< FeedbackVector > | vector, |
Tagged< AbstractCode > | code ) |
std::string v8::internal::V8FileLogger::file_name | ( | ) | const |
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1653 of file log.cc.
void v8::internal::V8FileLogger::ICEvent | ( | const char * | type, |
bool | keyed, | ||
DirectHandle< Map > | map, | ||
DirectHandle< Object > | key, | ||
char | old_state, | ||
char | new_state, | ||
const char * | modifier, | ||
const char * | slow_stub_reason ) |
|
private |
void v8::internal::V8FileLogger::IntPtrTEvent | ( | const char * | name, |
intptr_t | value ) |
|
inlineoverridevirtual |
Reimplemented from v8::internal::LogEventListener.
Definition at line 272 of file log.h.
bool v8::internal::V8FileLogger::is_logging | ( | ) |
void v8::internal::V8FileLogger::LateSetup | ( | Isolate * | isolate | ) |
|
static |
void v8::internal::V8FileLogger::LogAccessorCallbacks | ( | ) |
void v8::internal::V8FileLogger::LogAllMaps | ( | ) |
void v8::internal::V8FileLogger::LogBuiltins | ( | ) |
|
private |
void v8::internal::V8FileLogger::LogCodeObjects | ( | ) |
void v8::internal::V8FileLogger::LogCompiledFunctions | ( | bool | ensure_source_positions_available = true | ) |
void v8::internal::V8FileLogger::LogExistingFunction | ( | DirectHandle< SharedFunctionInfo > | shared, |
DirectHandle< AbstractCode > | code ) |
|
private |
|
private |
void v8::internal::V8FileLogger::MapEvent | ( | const char * | type, |
DirectHandle< Map > | from, | ||
DirectHandle< Map > | to, | ||
const char * | reason = nullptr, | ||
DirectHandle< HeapObject > | name_or_sfi = DirectHandle<HeapObject>() ) |
|
inlineoverridevirtual |
Implements v8::internal::LogEventListener.
void v8::internal::V8FileLogger::NewEvent | ( | const char * | name, |
void * | object, | ||
size_t | size ) |
void v8::internal::V8FileLogger::ProcessDeoptEvent | ( | DirectHandle< Code > | code, |
SourcePosition | position, | ||
const char * | kind, | ||
const char * | reason ) |
|
private |
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1663 of file log.cc.
|
private |
sampler::Sampler * v8::internal::V8FileLogger::sampler | ( | ) |
void v8::internal::V8FileLogger::ScriptEvent | ( | ScriptEventType | type, |
int | script_id ) |
void v8::internal::V8FileLogger::SetCodeEventHandler | ( | uint32_t | options, |
JitCodeEventHandler | event_handler ) |
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1658 of file log.cc.
|
overridevirtual |
Implements v8::internal::LogEventListener.
Definition at line 1690 of file log.cc.
void v8::internal::V8FileLogger::SharedLibraryEvent | ( | const std::string & | library_path, |
uintptr_t | start, | ||
uintptr_t | end, | ||
intptr_t | aslr_slide ) |
void v8::internal::V8FileLogger::StopProfilerThread | ( | ) |
void v8::internal::V8FileLogger::StringEvent | ( | const char * | name, |
const char * | value ) |
FILE * v8::internal::V8FileLogger::TearDownAndGetLogFile | ( | ) |
|
private |
|
private |
void v8::internal::V8FileLogger::TimerEvent | ( | v8::LogEventStatus | se, |
const char * | name ) |
|
static |
|
private |
|
private |
|
inlineoverridevirtual |
Implements v8::internal::LogEventListener.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |