v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <log.h>
Data Structures | |
class | TimerEventScope |
Public Types | |
enum | LogEventsAndTags { NUMBER_OF_LOG_EVENTS } |
enum | StartEnd { START, END } |
Public Member Functions | |
bool | SetUp (Isolate *isolate) |
void | SetCodeEventHandler (uint32_t options, JitCodeEventHandler event_handler) |
Sampler * | sampler () |
FILE * | TearDown () |
void | StringEvent (const char *name, const char *value) |
void | IntEvent (const char *name, int value) |
void | IntPtrTEvent (const char *name, intptr_t value) |
void | HandleEvent (const char *name, Object **location) |
void | NewEvent (const char *name, void *object, size_t size) |
void | DeleteEvent (const char *name, void *object) |
void | ResourceEvent (const char *name, const char *tag) |
void | SuspectReadEvent (Name *name, Object *obj) |
void | DebugTag (const char *call_site_tag) |
void | DebugEvent (const char *event_type, Vector< uint16_t > parameter) |
void | ApiNamedSecurityCheck (Object *key) |
void | ApiIndexedSecurityCheck (uint32_t index) |
void | ApiNamedPropertyAccess (const char *tag, JSObject *holder, Object *name) |
void | ApiIndexedPropertyAccess (const char *tag, JSObject *holder, uint32_t index) |
void | ApiObjectAccess (const char *tag, JSObject *obj) |
void | ApiEntryCall (const char *name) |
void | addCodeEventListener (CodeEventListener *listener) |
void | removeCodeEventListener (CodeEventListener *listener) |
bool | hasCodeEventListener (CodeEventListener *listener) |
void | CallbackEvent (Name *name, Address entry_point) |
void | GetterCallbackEvent (Name *name, Address entry_point) |
void | SetterCallbackEvent (Name *name, Address entry_point) |
void | CodeCreateEvent (LogEventsAndTags tag, Code *code, const char *source) |
void | CodeCreateEvent (LogEventsAndTags tag, Code *code, Name *name) |
void | CodeCreateEvent (LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *name) |
void | CodeCreateEvent (LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *source, int line, int column) |
void | CodeCreateEvent (LogEventsAndTags tag, Code *code, int args_count) |
void | CodeMovingGCEvent () |
void | RegExpCodeCreateEvent (Code *code, String *source) |
void | CodeMoveEvent (Address from, Address to) |
void | CodeDeleteEvent (Address from) |
void | CodeLinePosInfoAddPositionEvent (void *jit_handler_data, int pc_offset, int position) |
void | CodeLinePosInfoAddStatementPositionEvent (void *jit_handler_data, int pc_offset, int position) |
void | CodeStartLinePosInfoRecordEvent (PositionsRecorder *pos_recorder) |
void | CodeEndLinePosInfoRecordEvent (Code *code, void *jit_handler_data) |
void | SharedFunctionInfoMoveEvent (Address from, Address to) |
void | CodeNameEvent (Address addr, int pos, const char *code_name) |
void | SnapshotPositionEvent (Address addr, int pos) |
void | HeapSampleBeginEvent (const char *space, const char *kind) |
void | HeapSampleEndEvent (const char *space, const char *kind) |
void | HeapSampleItemEvent (const char *type, int number, int bytes) |
void | HeapSampleJSConstructorEvent (const char *constructor, int number, int bytes) |
void | HeapSampleJSRetainersEvent (const char *constructor, const char *event) |
void | HeapSampleJSProducerEvent (const char *constructor, Address *stack) |
void | HeapSampleStats (const char *space, const char *kind, intptr_t capacity, intptr_t used) |
void | SharedLibraryEvent (const char *library_path, uintptr_t start, uintptr_t end) |
void | SharedLibraryEvent (const wchar_t *library_path, uintptr_t start, uintptr_t end) |
void | CodeDeoptEvent (Code *code) |
void | TimerEvent (StartEnd se, const char *name) |
void | RegExpCompileEvent (Handle< JSRegExp > regexp, bool in_cache) |
void | LogRuntime (Vector< const char > format, Handle< JSArray > args) |
bool | is_logging () |
bool | is_logging_code_events () |
void | StopProfiler () |
void | LogExistingFunction (Handle< SharedFunctionInfo > shared, Handle< Code > code) |
void | LogCompiledFunctions () |
void | LogAccessorCallbacks () |
void | LogCodeObjects () |
INLINE (static LogEventsAndTags ToNativeByScript(LogEventsAndTags, Script *)) | |
void | LogFailure () |
Static Public Member Functions | |
static void | NewEventStatic (const char *name, void *object, size_t size) |
static void | DeleteEventStatic (const char *name, void *object) |
static void | EnterExternal (Isolate *isolate) |
static void | LeaveExternal (Isolate *isolate) |
static void | EmptyLogInternalEvents (const char *name, int se) |
static void | LogInternalEvents (const char *name, int se) |
Static Public Attributes | |
static const int | kSamplingIntervalMs = 1 |
Friends | |
class | EventLog |
class | Isolate |
class | TimeLog |
class | Profiler |
template<StateTag Tag> | |
class | VMState |
class | LoggerTestHelper |
class | CpuProfiler |
enum LogEventsAndTags |
void addCodeEventListener | ( | CodeEventListener * | listener | ) |
Definition at line 953 of file log.cc.
References ASSERT, and Logger::hasCodeEventListener().
Referenced by CodeAddressMap::CodeAddressMap(), Logger::SetCodeEventHandler(), and Logger::SetUp().
void ApiEntryCall | ( | const char * | name | ) |
Definition at line 1294 of file log.cc.
References Log::IsEnabled().
void ApiIndexedPropertyAccess | ( | const char * | tag, |
JSObject * | holder, | ||
uint32_t | index | ||
) |
Definition at line 1274 of file log.cc.
References JSReceiver::class_name(), v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
void ApiIndexedSecurityCheck | ( | uint32_t | index | ) |
Definition at line 1241 of file log.cc.
References Log::IsEnabled().
Definition at line 1247 of file log.cc.
References ASSERT, Symbol::cast(), String::cast(), JSReceiver::class_name(), v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Name::Hash(), Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, ToCString(), and String::ToCString().
void ApiNamedSecurityCheck | ( | Object * | key | ) |
Definition at line 1039 of file log.cc.
References Symbol::cast(), String::cast(), v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Name::Hash(), Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, ToCString(), and String::ToCString().
void ApiObjectAccess | ( | const char * | tag, |
JSObject * | obj | ||
) |
Definition at line 1285 of file log.cc.
References v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Definition at line 1355 of file log.cc.
References PROFILER_LOG.
Referenced by Logger::LogExistingFunction().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
const char * | source | ||
) |
Definition at line 1386 of file log.cc.
References CALL_LISTENERS, Logger::is_logging_code_events(), Log::IsEnabled(), and PROFILER_LOG.
Referenced by Logger::CodeCreateEvent(), and Logger::LogExistingFunction().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
Name * | name | ||
) |
Definition at line 1403 of file log.cc.
References CALL_LISTENERS, Symbol::cast(), String::cast(), Logger::CodeCreateEvent(), Logger::is_logging_code_events(), Log::IsEnabled(), and PROFILER_LOG.
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
SharedFunctionInfo * | shared, | ||
CompilationInfo * | info, | ||
Name * | name | ||
) |
Definition at line 1426 of file log.cc.
References HeapObject::address(), Builtins::builtin(), Isolate::builtins(), CALL_LISTENERS, Symbol::cast(), String::cast(), Logger::CodeCreateEvent(), v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Logger::is_logging_code_events(), Log::IsEnabled(), PROFILER_LOG, v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
SharedFunctionInfo * | shared, | ||
CompilationInfo * | info, | ||
Name * | source, | ||
int | line, | ||
int | column | ||
) |
Definition at line 1460 of file log.cc.
References HeapObject::address(), CALL_LISTENERS, Symbol::cast(), String::cast(), Logger::CodeCreateEvent(), SharedFunctionInfo::DebugName(), v8::internal::DISALLOW_NULLS, SmartPointerBase< Deallocator, T >::get(), Logger::is_logging_code_events(), Log::IsEnabled(), PROFILER_LOG, v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
int | args_count | ||
) |
Definition at line 1492 of file log.cc.
References CALL_LISTENERS, Logger::CodeCreateEvent(), Logger::is_logging_code_events(), Log::IsEnabled(), and PROFILER_LOG.
void CodeDeleteEvent | ( | Address | from | ) |
Definition at line 1545 of file log.cc.
References CALL_LISTENERS, Logger::is_logging_code_events(), Log::IsEnabled(), and PROFILER_LOG.
void CodeDeoptEvent | ( | Code * | code | ) |
Definition at line 1091 of file log.cc.
References ASSERT, Code::CodeSize(), and Log::IsEnabled().
void CodeEndLinePosInfoRecordEvent | ( | Code * | code, |
void * | jit_handler_data | ||
) |
void CodeLinePosInfoAddPositionEvent | ( | void * | jit_handler_data, |
int | pc_offset, | ||
int | position | ||
) |
Definition at line 1560 of file log.cc.
References JIT_LOG, and JitCodeEvent::POSITION.
void CodeLinePosInfoAddStatementPositionEvent | ( | void * | jit_handler_data, |
int | pc_offset, | ||
int | position | ||
) |
Definition at line 1570 of file log.cc.
References JIT_LOG, and JitCodeEvent::STATEMENT_POSITION.
Definition at line 1536 of file log.cc.
References CALL_LISTENERS, Logger::is_logging_code_events(), and PROFILER_LOG.
void CodeMovingGCEvent | ( | ) |
Definition at line 1509 of file log.cc.
References CALL_LISTENERS, Logger::is_logging_code_events(), Log::IsEnabled(), PROFILER_LOG, and OS::SignalCodeMovingGC().
void CodeNameEvent | ( | Address | addr, |
int | pos, | ||
const char * | code_name | ||
) |
Definition at line 1593 of file log.cc.
References v8::internal::NULL.
void CodeStartLinePosInfoRecordEvent | ( | PositionsRecorder * | pos_recorder | ) |
Definition at line 1580 of file log.cc.
References v8::internal::NULL, and JitLogger::StartCodePosInfoEvent().
void DebugEvent | ( | const char * | event_type, |
Vector< uint16_t > | parameter | ||
) |
Definition at line 1710 of file log.cc.
References SimpleStringBuilder::AddCharacter(), v8::internal::DeleteArray(), Log::IsEnabled(), Vector< T >::length(), and OS::TimeCurrentMillis().
void DebugTag | ( | const char * | call_site_tag | ) |
Definition at line 1702 of file log.cc.
References Log::IsEnabled().
void DeleteEvent | ( | const char * | name, |
void * | object | ||
) |
Definition at line 1309 of file log.cc.
References Log::IsEnabled(), and V8PRIxPTR.
|
static |
|
inlinestatic |
|
static |
Definition at line 1113 of file log.cc.
References ASSERT, v8::internal::EXTERNAL, v8::internal::JS, LOG, Logger::START, Logger::TimerEvent(), and Logger::TimerEventScope::v8_external.
Definition at line 1361 of file log.cc.
References PROFILER_LOG.
Referenced by Logger::LogAccessorCallbacks().
void HandleEvent | ( | const char * | name, |
Object ** | location | ||
) |
Definition at line 1017 of file log.cc.
References Log::IsEnabled(), and V8PRIxPTR.
bool hasCodeEventListener | ( | CodeEventListener * | listener | ) |
Definition at line 965 of file log.cc.
Referenced by Logger::addCodeEventListener(), and Logger::removeCodeEventListener().
void HeapSampleBeginEvent | ( | const char * | space, |
const char * | kind | ||
) |
Definition at line 1675 of file log.cc.
References Log::IsEnabled(), and OS::TimeCurrentMillis().
void HeapSampleEndEvent | ( | const char * | space, |
const char * | kind | ||
) |
Definition at line 1686 of file log.cc.
References Log::IsEnabled().
void HeapSampleItemEvent | ( | const char * | type, |
int | number, | ||
int | bytes | ||
) |
Definition at line 1694 of file log.cc.
References Log::IsEnabled().
void HeapSampleJSConstructorEvent | ( | const char * | constructor, |
int | number, | ||
int | bytes | ||
) |
void HeapSampleJSProducerEvent | ( | const char * | constructor, |
Address * | stack | ||
) |
void HeapSampleJSRetainersEvent | ( | const char * | constructor, |
const char * | event | ||
) |
void HeapSampleStats | ( | const char * | space, |
const char * | kind, | ||
intptr_t | capacity, | ||
intptr_t | used | ||
) |
INLINE | ( | static LogEventsAndTags | ToNativeByScriptLogEventsAndTags, Script * | ) |
|
inline |
Definition at line 354 of file log.h.
Referenced by Logger::is_logging_code_events(), and CodeGenerator::ShouldGenerateLog().
|
inline |
Definition at line 358 of file log.h.
References Logger::is_logging(), and v8::internal::NULL.
Referenced by Logger::CodeCreateEvent(), Logger::CodeDeleteEvent(), Logger::CodeMoveEvent(), Logger::CodeMovingGCEvent(), Compiler::RecordFunctionCompilation(), Logger::RegExpCodeCreateEvent(), and Logger::SharedFunctionInfoMoveEvent().
|
static |
Definition at line 1120 of file log.cc.
References ASSERT, Logger::END, v8::internal::EXTERNAL, v8::internal::JS, LOG, Logger::TimerEvent(), and Logger::TimerEventScope::v8_external.
void LogAccessorCallbacks | ( | ) |
Definition at line 1971 of file log.cc.
References Name::cast(), ExecutableAccessorInfo::cast(), Heap::CollectAllGarbage(), Logger::GetterCallbackEvent(), Isolate::heap(), Heap::kMakeHeapIterableMask, v8::internal::NULL, obj, PROFILE, and Logger::SetterCallbackEvent().
Referenced by TEST().
void LogCodeObjects | ( | ) |
Definition at line 1890 of file log.cc.
References Heap::CollectAllGarbage(), Isolate::heap(), Heap::kMakeHeapIterableMask, v8::internal::NULL, and obj.
Referenced by Logger::SetCodeEventHandler().
void LogCompiledFunctions | ( | ) |
Definition at line 1950 of file log.cc.
References Isolate::builtins(), Heap::CollectAllGarbage(), Isolate::heap(), Heap::kMakeHeapIterableMask, Logger::LogExistingFunction(), v8::internal::NULL, and Vector< T >::start().
Referenced by Logger::SetCodeEventHandler(), and TEST().
void LogExistingFunction | ( | Handle< SharedFunctionInfo > | shared, |
Handle< Code > | code | ||
) |
Definition at line 1902 of file log.cc.
References Logger::CallbackEvent(), Script::cast(), String::cast(), CallHandlerInfo::cast(), Logger::CodeCreateEvent(), v8::internal::GetScriptColumnNumber(), v8::internal::GetScriptLineNumber(), Isolate::heap(), v8::internal::NULL, and PROFILE.
Referenced by Logger::LogCompiledFunctions().
void LogFailure | ( | ) |
Definition at line 1764 of file log.cc.
References Logger::StopProfiler().
|
static |
Definition at line 1127 of file log.cc.
References LOG, and Logger::TimerEvent().
Definition at line 1200 of file log.cc.
References ASSERT, Smi::cast(), String::cast(), Object::GetElementNoExceptionThrown(), Log::IsEnabled(), Vector< T >::length(), obj, UNREACHABLE, and Smi::value().
void NewEvent | ( | const char * | name, |
void * | object, | ||
size_t | size | ||
) |
Definition at line 1300 of file log.cc.
References Log::IsEnabled(), and V8PRIxPTR.
|
static |
Definition at line 1519 of file log.cc.
References CALL_LISTENERS, Logger::is_logging_code_events(), Log::IsEnabled(), and PROFILER_LOG.
Definition at line 1190 of file log.cc.
References Log::IsEnabled().
void removeCodeEventListener | ( | CodeEventListener * | listener | ) |
Definition at line 959 of file log.cc.
References ASSERT, and Logger::hasCodeEventListener().
Referenced by Logger::SetCodeEventHandler(), Logger::TearDown(), and CodeAddressMap::~CodeAddressMap().
void ResourceEvent | ( | const char * | name, |
const char * | tag | ||
) |
Definition at line 1638 of file log.cc.
References OS::GetUserTime(), Log::IsEnabled(), and OS::TimeCurrentMillis().
void SetCodeEventHandler | ( | uint32_t | options, |
JitCodeEventHandler | event_handler | ||
) |
Definition at line 2098 of file log.cc.
References Logger::addCodeEventListener(), v8::kJitCodeEventEnumExisting, Logger::LogCodeObjects(), Logger::LogCompiledFunctions(), v8::internal::NULL, and Logger::removeCodeEventListener().
Referenced by V8::SetJitCodeEventHandler().
Definition at line 1367 of file log.cc.
References PROFILER_LOG.
Referenced by Logger::LogAccessorCallbacks().
bool SetUp | ( | Isolate * | isolate | ) |
Definition at line 2050 of file log.cc.
References Logger::addCodeEventListener(), Profiler::Engage(), SmartPointerBase< ArrayDeallocator< T >, T >::get(), Log::Initialize(), Log::InitLogAtStart(), Logger::kSamplingIntervalMs, and Logger::Profiler.
Definition at line 1616 of file log.cc.
References Logger::is_logging_code_events(), and PROFILER_LOG.
void SharedLibraryEvent | ( | const char * | library_path, |
uintptr_t | start, | ||
uintptr_t | end | ||
) |
Definition at line 1065 of file log.cc.
References Log::IsEnabled(), and V8PRIxPTR.
void SharedLibraryEvent | ( | const wchar_t * | library_path, |
uintptr_t | start, | ||
uintptr_t | end | ||
) |
Definition at line 1078 of file log.cc.
References Log::IsEnabled(), and V8PRIxPTR.
void SnapshotPositionEvent | ( | Address | addr, |
int | pos | ||
) |
Definition at line 1603 of file log.cc.
References Log::IsEnabled(), and LL_LOG.
void StopProfiler | ( | ) |
Definition at line 1753 of file log.cc.
References Log::IsEnabled(), v8::internal::NULL, and Profiler::pause().
Referenced by Logger::LogFailure(), and TEST().
void StringEvent | ( | const char * | name, |
const char * | value | ||
) |
Definition at line 1654 of file log.cc.
References JSObject::cast(), Symbol::cast(), String::cast(), JSReceiver::class_name(), Isolate::heap(), and Log::IsEnabled().
FILE * TearDown | ( | ) |
Definition at line 2123 of file log.cc.
References Log::Close(), Profiler::Disengage(), v8::internal::NULL, and Logger::removeCodeEventListener().
void TimerEvent | ( | StartEnd | se, |
const char * | name | ||
) |
Definition at line 1101 of file log.cc.
References ASSERT, Log::IsEnabled(), and Logger::START.
Referenced by Logger::EnterExternal(), Logger::LeaveExternal(), and Logger::LogInternalEvents().
|
friend |
|
friend |
Definition at line 444 of file log.h.
Referenced by Logger::SetUp().
|
static |
Definition at line 384 of file log.h.
Referenced by Logger::SetUp().