v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Logger Class Reference

#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)
 
Samplersampler ()
 
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
 

Detailed Description

Definition at line 167 of file log.h.

Member Enumeration Documentation

Enumerator
NUMBER_OF_LOG_EVENTS 

Definition at line 170 of file log.h.

enum StartEnd
Enumerator
START 
END 

Definition at line 310 of file log.h.

Member Function Documentation

void addCodeEventListener ( CodeEventListener listener)
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 
)
void ApiIndexedSecurityCheck ( uint32_t  index)

Definition at line 1241 of file log.cc.

References Log::IsEnabled().

void ApiObjectAccess ( const char *  tag,
JSObject obj 
)
void CallbackEvent ( Name name,
Address  entry_point 
)

Definition at line 1355 of file log.cc.

References PROFILER_LOG.

Referenced by Logger::LogExistingFunction().

void CodeCreateEvent ( LogEventsAndTags  tag,
Code code,
const char *  source 
)
void CodeCreateEvent ( LogEventsAndTags  tag,
Code code,
Name name 
)
void CodeCreateEvent ( LogEventsAndTags  tag,
Code code,
int  args_count 
)
void CodeDeleteEvent ( Address  from)
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 
)

Definition at line 1587 of file log.cc.

References JIT_LOG.

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.

void CodeMoveEvent ( Address  from,
Address  to 
)

Definition at line 1536 of file log.cc.

References CALL_LISTENERS, Logger::is_logging_code_events(), and PROFILER_LOG.

void CodeMovingGCEvent ( )
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 
)
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.

void DeleteEventStatic ( const char *  name,
void *  object 
)
static

Definition at line 1322 of file log.cc.

static void EmptyLogInternalEvents ( const char *  name,
int  se 
)
inlinestatic

Definition at line 319 of file log.h.

void EnterExternal ( Isolate isolate)
static
void GetterCallbackEvent ( Name name,
Address  entry_point 
)

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 *)
void IntEvent ( const char *  name,
int  value 
)

Definition at line 991 of file log.cc.

void IntPtrTEvent ( const char *  name,
intptr_t  value 
)

Definition at line 996 of file log.cc.

bool is_logging ( )
inline

Definition at line 354 of file log.h.

Referenced by Logger::is_logging_code_events(), and CodeGenerator::ShouldGenerateLog().

void LeaveExternal ( Isolate isolate)
static
void LogCodeObjects ( )
void LogFailure ( )

Definition at line 1764 of file log.cc.

References Logger::StopProfiler().

void LogInternalEvents ( const char *  name,
int  se 
)
static

Definition at line 1127 of file log.cc.

References LOG, and Logger::TimerEvent().

void LogRuntime ( Vector< const char >  format,
Handle< JSArray args 
)
void NewEvent ( const char *  name,
void *  object,
size_t  size 
)

Definition at line 1300 of file log.cc.

References Log::IsEnabled(), and V8PRIxPTR.

void NewEventStatic ( const char *  name,
void *  object,
size_t  size 
)
static

Definition at line 1317 of file log.cc.

void RegExpCodeCreateEvent ( Code code,
String source 
)
void RegExpCompileEvent ( Handle< JSRegExp regexp,
bool  in_cache 
)

Definition at line 1190 of file log.cc.

References Log::IsEnabled().

void removeCodeEventListener ( CodeEventListener listener)
void ResourceEvent ( const char *  name,
const char *  tag 
)

Definition at line 1638 of file log.cc.

References OS::GetUserTime(), Log::IsEnabled(), and OS::TimeCurrentMillis().

Sampler * sampler ( )

Definition at line 2118 of file log.cc.

void SetterCallbackEvent ( Name name,
Address  entry_point 
)

Definition at line 1367 of file log.cc.

References PROFILER_LOG.

Referenced by Logger::LogAccessorCallbacks().

void SharedFunctionInfoMoveEvent ( Address  from,
Address  to 
)

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 978 of file log.cc.

Referenced by TEST().

void SuspectReadEvent ( Name name,
Object obj 
)
FILE * TearDown ( )
void TimerEvent ( StartEnd  se,
const char *  name 
)

Friends And Related Function Documentation

friend class CpuProfiler
friend

Definition at line 462 of file log.h.

friend class EventLog
friend

Definition at line 441 of file log.h.

friend class Isolate
friend

Definition at line 442 of file log.h.

friend class LoggerTestHelper
friend

Definition at line 446 of file log.h.

friend class Profiler
friend

Definition at line 444 of file log.h.

Referenced by Logger::SetUp().

friend class TimeLog
friend

Definition at line 443 of file log.h.

friend class VMState
friend

Definition at line 445 of file log.h.

Field Documentation

const int kSamplingIntervalMs = 1
static

Definition at line 384 of file log.h.

Referenced by Logger::SetUp().


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