v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
Public Types | |
typedef std::map< size_t, SymbolInfo > | SymbolMap |
typedef std::map< i::Address, SymbolInfo * > | SymbolLocationMap |
typedef std::map< std::pair < SymbolInfo *, SymbolInfo * > , int > | InvocationMap |
Public Member Functions | |
SetFunctionEntryHookTest () | |
~SetFunctionEntryHookTest () | |
void | Reset () |
void | RunTest () |
void | OnJitEvent (const v8::JitCodeEvent *event) |
void | OnEntryHook (uintptr_t function, uintptr_t return_addr_location) |
void | RunLoopInNewEnv (v8::Isolate *isolate) |
void | InsertSymbolAt (i::Address addr, SymbolInfo *symbol) |
SymbolInfo * | FindSymbolForAddr (i::Address addr) |
int | CountInvocations (const char *caller_name, const char *function_name) |
Static Public Member Functions | |
static void | JitEvent (const v8::JitCodeEvent *event) |
static void | EntryHook (uintptr_t function, uintptr_t return_addr_location) |
static void | RuntimeCallback (const v8::FunctionCallbackInfo< v8::Value > &args) |
Data Fields | |
i::Handle< i::JSFunction > | foo_func_ |
i::Handle< i::JSFunction > | bar_func_ |
SymbolMap | symbols_ |
SymbolLocationMap | symbol_locations_ |
InvocationMap | invocations_ |
Static Public Attributes | |
static SetFunctionEntryHookTest * | instance_ = NULL |
Definition at line 13654 of file test-api.cc.
typedef std::map<std::pair<SymbolInfo*, SymbolInfo*>, int> InvocationMap |
Definition at line 13705 of file test-api.cc.
typedef std::map<i::Address, SymbolInfo*> SymbolLocationMap |
Definition at line 13704 of file test-api.cc.
typedef std::map<size_t, SymbolInfo> SymbolMap |
Definition at line 13703 of file test-api.cc.
|
inline |
Definition at line 13656 of file test-api.cc.
|
inline |
Definition at line 13660 of file test-api.cc.
int CountInvocations | ( | const char * | caller_name, |
const char * | function_name | ||
) |
Definition at line 13846 of file test-api.cc.
References invocations_, SymbolInfo::name, and NULL.
Referenced by RunTest().
|
inlinestatic |
Definition at line 13678 of file test-api.cc.
References CHECK, instance_, NULL, and OnEntryHook().
Referenced by RunTest().
SymbolInfo * FindSymbolForAddr | ( | i::Address | addr | ) |
Definition at line 13825 of file test-api.cc.
References NULL, and symbol_locations_.
Referenced by OnEntryHook().
void InsertSymbolAt | ( | i::Address | addr, |
SymbolInfo * | symbol | ||
) |
Definition at line 13723 of file test-api.cc.
References SymbolInfo::size, and symbol_locations_.
Referenced by OnJitEvent().
|
inlinestatic |
Definition at line 13671 of file test-api.cc.
References CHECK, instance_, NULL, and OnJitEvent().
Referenced by RunTest().
void OnEntryHook | ( | uintptr_t | function, |
uintptr_t | return_addr_location | ||
) |
Definition at line 13793 of file test-api.cc.
References bar_func_, CHECK, FindSymbolForAddr(), foo_func_, Code::GetCodeFromTargetAddress(), Code::instruction_start(), invocations_, Handle< T >::is_null(), NULL, and symbol_locations_.
Referenced by EntryHook().
void OnJitEvent | ( | const v8::JitCodeEvent * | event | ) |
Definition at line 13750 of file test-api.cc.
References CHECK, CHECK_NE, JitCodeEvent::CODE_ADDED, JitCodeEvent::code_len, JitCodeEvent::CODE_MOVED, JitCodeEvent::code_start, SymbolInfo::id, InsertSymbolAt(), JitCodeEvent::name_t::len, JitCodeEvent::name, SymbolInfo::name, JitCodeEvent::new_code_start, NULL, SymbolInfo::size, JitCodeEvent::name_t::str, symbol_locations_, symbols_, and JitCodeEvent::type.
Referenced by JitEvent().
|
inline |
Definition at line 13664 of file test-api.cc.
References invocations_, symbol_locations_, and symbols_.
Referenced by RunTest().
void RunLoopInNewEnv | ( | v8::Isolate * | isolate | ) |
Definition at line 13876 of file test-api.cc.
References ASSERT, bar_func_, Handle< T >::cast(), Number::Cast(), CHECK, CHECK_EQ, foo_func_, Handle< T >::is_null(), FunctionTemplate::New(), Utils::OpenHandle(), RuntimeCallback(), and Number::Value().
Referenced by RunTest().
void RunTest | ( | ) |
Definition at line 13919 of file test-api.cc.
References CHECK, CHECK_EQ, CHECK_NE, CountInvocations(), Isolate::Dispose(), EntryHook(), invocations_, JitEvent(), v8::kJitCodeEventDefault, Isolate::New(), NULL, Reset(), RunLoopInNewEnv(), V8::SetFunctionEntryHook(), and V8::SetJitCodeEventHandler().
Referenced by TEST().
|
inlinestatic |
Definition at line 13684 of file test-api.cc.
References CHECK, FunctionCallbackInfo< T >::GetReturnValue(), instance_, and NULL.
Referenced by RunLoopInNewEnv().
i::Handle<i::JSFunction> bar_func_ |
Definition at line 13701 of file test-api.cc.
Referenced by OnEntryHook(), and RunLoopInNewEnv().
i::Handle<i::JSFunction> foo_func_ |
Definition at line 13700 of file test-api.cc.
Referenced by OnEntryHook(), and RunLoopInNewEnv().
|
static |
Definition at line 13710 of file test-api.cc.
Referenced by EntryHook(), JitEvent(), RuntimeCallback(), SetFunctionEntryHookTest(), and ~SetFunctionEntryHookTest().
InvocationMap invocations_ |
Definition at line 13708 of file test-api.cc.
Referenced by CountInvocations(), OnEntryHook(), Reset(), and RunTest().
SymbolLocationMap symbol_locations_ |
Definition at line 13707 of file test-api.cc.
Referenced by FindSymbolForAddr(), InsertSymbolAt(), OnEntryHook(), OnJitEvent(), and Reset().
SymbolMap symbols_ |
Definition at line 13706 of file test-api.cc.
Referenced by OnJitEvent(), and Reset().