![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <log.h>
Data Structures | |
| class | NameBuffer |
| class | NameMap |
Public Types | |
| enum | LogEventsAndTags { NUMBER_OF_LOG_EVENTS } |
Public Member Functions | |
| bool | SetUp () |
| void | EnsureTickerStarted () |
| void | EnsureTickerStopped () |
| Sampler * | sampler () |
| FILE * | TearDown () |
| void | EnableSlidingStateWindow () |
| 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 (String *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 | CallbackEvent (String *name, Address entry_point) |
| void | GetterCallbackEvent (String *name, Address entry_point) |
| void | SetterCallbackEvent (String *name, Address entry_point) |
| void | CodeCreateEvent (LogEventsAndTags tag, Code *code, const char *source) |
| void | CodeCreateEvent (LogEventsAndTags tag, Code *code, String *name) |
| void | CodeCreateEvent (LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, String *name) |
| void | CodeCreateEvent (LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, String *source, int line) |
| 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 | SharedFunctionInfoMoveEvent (Address from, Address to) |
| 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 | RegExpCompileEvent (Handle< JSRegExp > regexp, bool in_cache) |
| void | LogRuntime (Vector< const char > format, JSArray *args) |
| bool | is_logging () |
| void | PauseProfiler () |
| void | ResumeProfiler () |
| bool | IsProfilerPaused () |
| 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 Public Attributes | |
| static const int | kSamplingIntervalMs = 1 |
Friends | |
| class | EventLog |
| class | Isolate |
| class | LogMessageBuilder |
| class | TimeLog |
| class | Profiler |
| class | SlidingStateWindow |
| class | StackTracer |
| class | VMState |
| class | LoggerTestHelper |
| class | CpuProfiler |
| enum LogEventsAndTags |
| void ApiEntryCall | ( | const char * | name | ) |
Definition at line 794 of file log.cc.
References Log::IsEnabled().
| void ApiIndexedPropertyAccess | ( | const char * | tag, |
| JSObject * | holder, | ||
| uint32_t | index | ||
| ) |
Definition at line 775 of file log.cc.
References JSReceiver::class_name(), v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
| void ApiIndexedSecurityCheck | ( | uint32_t | index | ) |
Definition at line 756 of file log.cc.
References Log::IsEnabled().
Definition at line 762 of file log.cc.
References ASSERT, String::cast(), JSReceiver::class_name(), v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
| void ApiNamedSecurityCheck | ( | Object * | key | ) |
Definition at line 620 of file log.cc.
References String::cast(), v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
| void ApiObjectAccess | ( | const char * | tag, |
| JSObject * | obj | ||
| ) |
Definition at line 785 of file log.cc.
References v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Definition at line 840 of file log.cc.
References v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Referenced by Logger::LogExistingFunction().
| void CodeCreateEvent | ( | LogEventsAndTags | tag, |
| Code * | code, | ||
| const char * | source | ||
| ) |
Definition at line 864 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
Referenced by Logger::LogExistingFunction().
| void CodeCreateEvent | ( | LogEventsAndTags | tag, |
| Code * | code, | ||
| String * | name | ||
| ) |
Definition at line 899 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendString(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
| void CodeCreateEvent | ( | LogEventsAndTags | tag, |
| Code * | code, | ||
| SharedFunctionInfo * | shared, | ||
| String * | name | ||
| ) |
Definition at line 939 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendString(), v8::internal::DISALLOW_NULLS, Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), v8::internal::ROBUST_STRING_TRAVERSAL, Logger::NameBuffer::size(), and String::ToCString().
| void CodeCreateEvent | ( | LogEventsAndTags | tag, |
| Code * | code, | ||
| SharedFunctionInfo * | shared, | ||
| String * | source, | ||
| int | line | ||
| ) |
Definition at line 980 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendInt(), Logger::NameBuffer::AppendString(), SharedFunctionInfo::DebugName(), v8::internal::DISALLOW_NULLS, Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), v8::internal::ROBUST_STRING_TRAVERSAL, Logger::NameBuffer::size(), and String::ToCString().
| void CodeCreateEvent | ( | LogEventsAndTags | tag, |
| Code * | code, | ||
| int | args_count | ||
| ) |
Definition at line 1024 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendInt(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
| void CodeDeleteEvent | ( | Address | from | ) |
Definition at line 1095 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), v8::internal::NULL, and Logger::NameMap::Remove().
Definition at line 1085 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), Logger::NameMap::Move(), and v8::internal::NULL.
| void CodeMovingGCEvent | ( | ) |
Definition at line 1050 of file log.cc.
References Log::IsEnabled(), and OS::SignalCodeMovingGC().
| void DebugEvent | ( | const char * | event_type, |
| Vector< uint16_t > | parameter | ||
| ) |
Definition at line 1227 of file log.cc.
References SimpleStringBuilder::AddCharacter(), v8::internal::DeleteArray(), Log::IsEnabled(), Vector< T >::length(), Logger::LogMessageBuilder, and OS::TimeCurrentMillis().
| void DebugTag | ( | const char * | call_site_tag | ) |
Definition at line 1219 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
| void DeleteEvent | ( | const char * | name, |
| void * | object | ||
| ) |
Definition at line 809 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
|
static |
| void EnableSlidingStateWindow | ( | ) |
Definition at line 1716 of file log.cc.
References v8::internal::NULL, and Logger::SlidingStateWindow.
Referenced by V8::EnableSlidingStateWindow().
| void EnsureTickerStarted | ( | ) |
Definition at line 1684 of file log.cc.
References ASSERT, Sampler::IsActive(), v8::internal::NULL, and Sampler::Start().
Referenced by RuntimeProfiler::SetUp().
| void EnsureTickerStopped | ( | ) |
Definition at line 1690 of file log.cc.
References Sampler::IsActive(), v8::internal::NULL, and Sampler::Stop().
Definition at line 848 of file log.cc.
References v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Referenced by Logger::LogAccessorCallbacks().
| void HandleEvent | ( | const char * | name, |
| Object ** | location | ||
| ) |
Definition at line 598 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
| void HeapSampleBeginEvent | ( | const char * | space, |
| const char * | kind | ||
| ) |
Definition at line 1192 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and OS::TimeCurrentMillis().
| void HeapSampleEndEvent | ( | const char * | space, |
| const char * | kind | ||
| ) |
Definition at line 1203 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
| void HeapSampleItemEvent | ( | const char * | type, |
| int | number, | ||
| int | bytes | ||
| ) |
Definition at line 1211 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
| 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 273 of file log.h.
Referenced by CodeGenerator::ShouldGenerateLog().
| bool IsProfilerPaused | ( | ) |
Definition at line 1271 of file log.cc.
References v8::internal::NULL, and Profiler::paused().
Referenced by V8::IsProfilerPaused().
| void LogAccessorCallbacks | ( | ) |
Definition at line 1602 of file log.cc.
References String::cast(), AccessorInfo::cast(), Logger::GetterCallbackEvent(), HEAP, ISOLATE, Heap::kMakeHeapIterableMask, v8::internal::NULL, PROFILE, and Logger::SetterCallbackEvent().
Referenced by Logger::ResumeProfiler().
| void LogCodeObjects | ( | ) |
Definition at line 1526 of file log.cc.
References HEAP, Heap::kMakeHeapIterableMask, and v8::internal::NULL.
| void LogCompiledFunctions | ( | ) |
Definition at line 1582 of file log.cc.
References HEAP, Heap::kMakeHeapIterableMask, Logger::LogExistingFunction(), v8::internal::NULL, and Vector< T >::start().
Referenced by Logger::ResumeProfiler().
| void LogExistingFunction | ( | Handle< SharedFunctionInfo > | shared, |
| Handle< Code > | code | ||
| ) |
Definition at line 1537 of file log.cc.
References Logger::CallbackEvent(), Script::cast(), String::cast(), CallHandlerInfo::cast(), Logger::CodeCreateEvent(), v8::internal::GetScriptLineNumber(), ISOLATE, and PROFILE.
Referenced by Logger::LogCompiledFunctions().
| void LogFailure | ( | ) |
Definition at line 1318 of file log.cc.
References Logger::PauseProfiler().
Definition at line 712 of file log.cc.
References ASSERT, Smi::cast(), JSRegExp::cast(), String::cast(), Object::GetElement(), Log::IsEnabled(), Vector< T >::length(), Logger::LogMessageBuilder, and UNREACHABLE.
| void NewEvent | ( | const char * | name, |
| void * | object, | ||
| size_t | size | ||
| ) |
Definition at line 800 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
|
static |
| void PauseProfiler | ( | ) |
Definition at line 1276 of file log.cc.
References RuntimeProfiler::IsEnabled(), Log::IsEnabled(), ISOLATE, LOG, v8::internal::NULL, Profiler::pause(), and Sampler::Stop().
Referenced by Logger::LogFailure(), and V8::PauseProfiler().
Definition at line 1057 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendString(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
Definition at line 702 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
| void ResourceEvent | ( | const char * | name, |
| const char * | tag | ||
| ) |
Definition at line 1159 of file log.cc.
References OS::GetUserTime(), Log::IsEnabled(), Logger::LogMessageBuilder, and OS::TimeCurrentMillis().
| void ResumeProfiler | ( | ) |
Definition at line 1295 of file log.cc.
References Profiler::Engage(), Sampler::IsActive(), Log::IsEnabled(), ISOLATE, LOG, Logger::LogAccessorCallbacks(), Logger::LogCompiledFunctions(), v8::internal::NULL, Profiler::resume(), and Sampler::Start().
Referenced by V8::ResumeProfiler().
Definition at line 856 of file log.cc.
References v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Referenced by Logger::LogAccessorCallbacks().
| bool SetUp | ( | ) |
Definition at line 1624 of file log.cc.
References Profiler::Engage(), Log::Initialize(), Logger::kSamplingIntervalMs, v8::internal::NULL, Profiler::pause(), Logger::Profiler, and Logger::SlidingStateWindow.
| void SharedLibraryEvent | ( | const char * | library_path, |
| uintptr_t | start, | ||
| uintptr_t | end | ||
| ) |
Definition at line 634 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
| void SharedLibraryEvent | ( | const wchar_t * | library_path, |
| uintptr_t | start, | ||
| uintptr_t | end | ||
| ) |
Definition at line 647 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
| void SnapshotPositionEvent | ( | Address | addr, |
| int | pos | ||
| ) |
Definition at line 1105 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameMap::Lookup(), and v8::internal::NULL.
Definition at line 1175 of file log.cc.
References JSObject::cast(), JSReceiver::class_name(), HEAP, Log::IsEnabled(), and Logger::LogMessageBuilder.
| FILE * TearDown | ( | ) |
Definition at line 1695 of file log.cc.
References Log::Close(), Profiler::Disengage(), and v8::internal::NULL.
|
friend |
|
friend |
Definition at line 393 of file log.h.
Referenced by Logger::CodeCreateEvent(), Logger::DebugEvent(), Logger::DebugTag(), Logger::DeleteEvent(), Logger::HandleEvent(), Logger::HeapSampleBeginEvent(), Logger::HeapSampleEndEvent(), Logger::HeapSampleItemEvent(), Logger::LogRuntime(), Logger::NewEvent(), Logger::RegExpCodeCreateEvent(), Logger::RegExpCompileEvent(), Logger::ResourceEvent(), Logger::SharedLibraryEvent(), Logger::SnapshotPositionEvent(), and Logger::SuspectReadEvent().
|
friend |
Definition at line 395 of file log.h.
Referenced by Logger::SetUp().
|
friend |
Definition at line 396 of file log.h.
Referenced by Logger::EnableSlidingStateWindow(), and Logger::SetUp().
|
friend |
|
static |
Definition at line 302 of file log.h.
Referenced by Logger::SetUp(), and TEST().