v8
3.14.5(node0.10.28)
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 | SetCodeEventHandler (uint32_t options, JitCodeEventHandler event_handler) |
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 () |
bool | is_logging_code_events () |
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 841 of file log.cc.
References Log::IsEnabled().
void ApiIndexedPropertyAccess | ( | const char * | tag, |
JSObject * | holder, | ||
uint32_t | index | ||
) |
Definition at line 822 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 803 of file log.cc.
References Log::IsEnabled().
Definition at line 809 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 667 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 832 of file log.cc.
References v8::internal::DISALLOW_NULLS, Log::IsEnabled(), v8::internal::ROBUST_STRING_TRAVERSAL, and String::ToCString().
Definition at line 887 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 911 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
Referenced by Logger::LogExistingFunction().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
String * | name | ||
) |
Definition at line 950 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendString(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
void CodeCreateEvent | ( | LogEventsAndTags | tag, |
Code * | code, | ||
SharedFunctionInfo * | shared, | ||
String * | name | ||
) |
Definition at line 994 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(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, 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 1039 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(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, 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 1087 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendInt(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
void CodeDeleteEvent | ( | Address | from | ) |
Definition at line 1167 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), v8::internal::NULL, and Logger::NameMap::Remove().
Definition at line 1156 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), Logger::NameMap::Move(), and v8::internal::NULL.
void CodeMovingGCEvent | ( | ) |
Definition at line 1117 of file log.cc.
References Log::IsEnabled(), and OS::SignalCodeMovingGC().
void DebugEvent | ( | const char * | event_type, |
Vector< uint16_t > | parameter | ||
) |
Definition at line 1300 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 1292 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
void DeleteEvent | ( | const char * | name, |
void * | object | ||
) |
Definition at line 856 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
|
static |
void EnableSlidingStateWindow | ( | ) |
Definition at line 1801 of file log.cc.
References v8::internal::NULL, and Logger::SlidingStateWindow.
Referenced by V8::EnableSlidingStateWindow().
void EnsureTickerStarted | ( | ) |
Definition at line 1769 of file log.cc.
References ASSERT, Sampler::IsActive(), v8::internal::NULL, and Sampler::Start().
Referenced by RuntimeProfiler::SetUp().
void EnsureTickerStopped | ( | ) |
Definition at line 1775 of file log.cc.
References Sampler::IsActive(), v8::internal::NULL, and Sampler::Stop().
Definition at line 895 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 645 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
void HeapSampleBeginEvent | ( | const char * | space, |
const char * | kind | ||
) |
Definition at line 1265 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and OS::TimeCurrentMillis().
void HeapSampleEndEvent | ( | const char * | space, |
const char * | kind | ||
) |
Definition at line 1276 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
void HeapSampleItemEvent | ( | const char * | type, |
int | number, | ||
int | bytes | ||
) |
Definition at line 1284 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 286 of file log.h.
Referenced by Logger::is_logging_code_events(), and CodeGenerator::ShouldGenerateLog().
|
inline |
Definition at line 290 of file log.h.
References Logger::is_logging(), and v8::internal::NULL.
Referenced by Logger::CodeCreateEvent(), Compiler::RecordFunctionCompilation(), and Logger::RegExpCodeCreateEvent().
bool IsProfilerPaused | ( | ) |
Definition at line 1344 of file log.cc.
References v8::internal::NULL, and Profiler::paused().
Referenced by V8::IsProfilerPaused().
void LogAccessorCallbacks | ( | ) |
Definition at line 1675 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 1599 of file log.cc.
References HEAP, Heap::kMakeHeapIterableMask, and v8::internal::NULL.
Referenced by Logger::SetCodeEventHandler().
void LogCompiledFunctions | ( | ) |
Definition at line 1655 of file log.cc.
References HEAP, Heap::kMakeHeapIterableMask, Logger::LogExistingFunction(), v8::internal::NULL, and Vector< T >::start().
Referenced by Logger::ResumeProfiler(), and Logger::SetCodeEventHandler().
void LogExistingFunction | ( | Handle< SharedFunctionInfo > | shared, |
Handle< Code > | code | ||
) |
Definition at line 1610 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 1391 of file log.cc.
References Logger::PauseProfiler().
Definition at line 759 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 847 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
|
static |
void PauseProfiler | ( | ) |
Definition at line 1349 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 1124 of file log.cc.
References HeapObject::address(), Logger::NameBuffer::AppendByte(), Logger::NameBuffer::AppendBytes(), Logger::NameBuffer::AppendString(), Serializer::enabled(), Code::ExecutableSize(), Logger::NameBuffer::get(), Logger::is_logging_code_events(), Log::IsEnabled(), Logger::LogMessageBuilder, v8::internal::NULL, Logger::NameBuffer::Reset(), and Logger::NameBuffer::size().
Definition at line 749 of file log.cc.
References Log::IsEnabled(), and Logger::LogMessageBuilder.
void ResourceEvent | ( | const char * | name, |
const char * | tag | ||
) |
Definition at line 1232 of file log.cc.
References OS::GetUserTime(), Log::IsEnabled(), Logger::LogMessageBuilder, and OS::TimeCurrentMillis().
void ResumeProfiler | ( | ) |
Definition at line 1368 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().
void SetCodeEventHandler | ( | uint32_t | options, |
JitCodeEventHandler | event_handler | ||
) |
Definition at line 1752 of file log.cc.
References v8::kJitCodeEventEnumExisting, Logger::LogCodeObjects(), Logger::LogCompiledFunctions(), and v8::internal::NULL.
Referenced by V8::SetJitCodeEventHandler().
Definition at line 903 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 1697 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 681 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 694 of file log.cc.
References Log::IsEnabled(), Logger::LogMessageBuilder, and V8PRIxPTR.
void SnapshotPositionEvent | ( | Address | addr, |
int | pos | ||
) |
Definition at line 1178 of file log.cc.
References Serializer::enabled(), Log::IsEnabled(), Logger::LogMessageBuilder, Logger::NameMap::Lookup(), and v8::internal::NULL.
Definition at line 1248 of file log.cc.
References JSObject::cast(), JSReceiver::class_name(), HEAP, Log::IsEnabled(), and Logger::LogMessageBuilder.
FILE * TearDown | ( | ) |
Definition at line 1780 of file log.cc.
References Log::Close(), Profiler::Disengage(), and v8::internal::NULL.
|
friend |
|
friend |
Definition at line 415 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 417 of file log.h.
Referenced by Logger::SetUp().
|
friend |
Definition at line 418 of file log.h.
Referenced by Logger::EnableSlidingStateWindow(), and Logger::SetUp().
|
friend |
|
static |
Definition at line 319 of file log.h.
Referenced by Logger::SetUp(), and TEST().