// Compute the forwarding pointers in each space.
EncodeForwardingAddressesInPagedSpace<MCAllocateFromOldPointerSpace,
- IgnoreNonLiveObject>(
+ ReportDeleteIfNeeded>(
Heap::old_pointer_space());
EncodeForwardingAddressesInPagedSpace<MCAllocateFromOldDataSpace,
ASSERT(!HeapObject::FromAddress(new_addr)->IsCode());
+ HeapObject* copied_to = HeapObject::FromAddress(new_addr);
+ if (copied_to->IsJSFunction()) {
+ LOG(FunctionMoveEvent(old_addr, new_addr));
+ }
+
return obj_size;
}
Code::cast(copied_to)->Relocate(new_addr - old_addr);
// Notify the logger that compiled code has moved.
LOG(CodeMoveEvent(old_addr, new_addr));
- } else if (copied_to->IsJSFunction()) {
- LOG(FunctionMoveEvent(old_addr, new_addr));
}
return obj_size;
}
#endif
+ HeapObject* copied_to = HeapObject::FromAddress(new_addr);
+ if (copied_to->IsJSFunction()) {
+ LOG(FunctionMoveEvent(old_addr, new_addr));
+ }
+
return obj_size;
}
" JSTrace();"
"};\n"
"OuterJSTrace();");
+ // The last JS function called.
+ CHECK_EQ(GetGlobalJSFunction("JSFuncDoTrace")->address(),
+ sample.function);
CHECK_GT(sample.frames_count, 1);
// Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace"
CheckRetAddrIsInJSFunction("JSTrace",