Commit 6951a5fa authored by yangguo@chromium.org's avatar yangguo@chromium.org

MIPS: Also time external callbacks from generated code.

Port r13078 (73f25483)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11316236
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b43ec511
......@@ -3976,6 +3976,14 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
Addu(s2, s2, Operand(1));
sw(s2, MemOperand(s3, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(this, StackFrame::MANUAL);
PushSafepointRegisters();
PrepareCallCFunction(0, a0);
CallCFunction(ExternalReference::log_enter_external_function(isolate()), 0);
PopSafepointRegisters();
}
// The O32 ABI requires us to pass a pointer in a0 where the returned struct
// (4 bytes) will be placed. This is also built into the Simulator.
// Set up the pointer to the returned value (a0). It was allocated in
......@@ -3988,6 +3996,14 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
DirectCEntryStub stub;
stub.GenerateCall(this, function);
if (FLAG_log_timer_events) {
FrameScope frame(this, StackFrame::MANUAL);
PushSafepointRegisters();
PrepareCallCFunction(0, a0);
CallCFunction(ExternalReference::log_leave_external_function(isolate()), 0);
PopSafepointRegisters();
}
// As mentioned above, on MIPS a pointer is returned - we need to dereference
// it to get the actual return value (which is also a pointer).
lw(v0, MemOperand(v0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment