66 const char* func_name,
69 CHECK(func->IsFunction());
71 return IsAddressWithinFuncCode(js_func, addr);
81 CHECK(frame_iterator.frame()->is_exit());
82 frame_iterator.Advance();
83 CHECK(frame_iterator.frame()->is_construct());
84 frame_iterator.Advance();
86 CHECK(calling_frame->is_java_script());
88 #if defined(V8_HOST_ARCH_32_BIT)
90 args.
This()->Set(v8_str(
"low_bits"), v8_num(low_bits >> 1));
91 #elif defined(V8_HOST_ARCH_64_BIT)
92 uint64_t
fp =
reinterpret_cast<uint64_t
>(calling_frame->fp());
95 args.
This()->Set(v8_str(
"low_bits"), v8_num(low_bits));
96 args.
This()->Set(v8_str(
"high_bits"), v8_num(high_bits));
98 #error Host architecture is neither 32-bit nor 64-bit.
106 const char* constructor_name) {
109 constructor_template->
SetClassName(v8_str(
"FPGrabber"));
111 context->
Global()->Set(v8_str(constructor_name), fun);
119 const char* func_name,
120 const char* trace_func_name) {
124 " fp = new FPGrabber();"
125 " %s(fp.low_bits, fp.high_bits);"
127 func_name, trace_func_name);
134 CompileRun(trace_call_buf.
start());
144 i::FLAG_use_inlining =
false;
155 CreateTraceCallerFunction(context,
"JSFuncDoTrace",
"trace");
157 "function JSTrace() {"
178 CHECK(IsAddressWithinFuncCode(
179 context,
"JSFuncDoTrace", sample.
stack[base + 0]));
180 CHECK(IsAddressWithinFuncCode(context,
"JSTrace", sample.
stack[base + 1]));
192 i::FLAG_use_inlining =
false;
203 CreateTraceCallerFunction(context,
"JSFuncDoTrace",
"js_trace");
205 "function JSTrace() {"
208 "function OuterJSTrace() {"
230 CHECK(IsAddressWithinFuncCode(context,
"JSTrace", sample.
stack[base + 0]));
231 CHECK(IsAddressWithinFuncCode(
232 context,
"OuterJSTrace", sample.
stack[base + 1]));
236 static void CFuncDoTrace(
byte dummy_parameter) {
239 fp =
reinterpret_cast<Address>(__builtin_frame_address(0));
240 #elif defined _MSC_VER
243 fp = &dummy_parameter - 2 *
sizeof(
void*);
245 #error Unexpected platform.
251 static int CFunc(
int depth) {
256 return CFunc(depth - 1) + 1;
280 CompileRun(
"a = 1; b = a + 1;");
282 CompileRun(
"js_entry_sp();");
284 CompileRun(
"js_entry_sp_level2();");
#define CHECK_EQ(expected, value)
V8_INLINE Isolate * GetIsolate() const
V8_INLINE ReturnValue< T > GetReturnValue() const
Address external_callback
kSerializedDataOffset Object
bool has_external_callback
static void InitTraceEnv(TickSample *sample)
static v8::Local< v8::Context > NewContext(CcTestExtensionFlags extensions, v8::Isolate *isolate=CcTest::isolate())
v8::Isolate * GetIsolate()
void SetClassName(Handle< String > name)
static Address GetJsEntrySp()
HANDLE HANDLE LPSTACKFRAME64 StackFrame
static void JSTrace(const v8::FunctionCallbackInfo< v8::Value > &args)
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=0, Handle< Value > data=Handle< Value >(), Handle< Signature > signature=Handle< Signature >(), int length=0)
V8_INLINE Local< Object > This() const
Address stack[kMaxFramesCount]
void CreateFramePointerGrabberConstructor(v8::Local< v8::Context > context, const char *constructor_name)
static v8::internal::Handle< To > OpenHandle(v8::Local< From > handle)
static int SNPrintF(Vector< char > str, const char *format,...)
V8_INLINE bool IsEmpty() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
Local< Function > GetFunction()
static void DoTrace(Address fp)
static void Trace(const v8::FunctionCallbackInfo< v8::Value > &args)
static v8::Isolate * isolate()