Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1091)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 10695206: Revert 12083: Implements a new API to set a function entry hook for profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 957f63183c62a6494962eb8e5647953606849835..ecdb3926c04dfb321a739312128ed5991904d5af 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -6420,68 +6420,6 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
__ ret(0);
}
-
-void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
- if (entry_hook_ != NULL) {
- ProfileEntryHookStub stub;
- masm->CallStub(&stub);
- }
-}
-
-
-void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
- // Save volatile registers.
-#ifdef _WIN64
- const int kNumSavedRegisters = 1;
-
- __ push(rcx);
-#else
- const int kNumSavedRegisters = 3;
-
- __ push(rcx);
- __ push(rdi);
- __ push(rsi);
-#endif
-
- // Calculate the original stack pointer and store it in the second arg.
-#ifdef _WIN64
- __ lea(rdx, Operand(rsp, kNumSavedRegisters * kPointerSize));
-#else
- __ lea(rsi, Operand(rsp, kNumSavedRegisters * kPointerSize));
-#endif
-
- // Calculate the function address to the first arg.
-#ifdef _WIN64
- __ movq(rcx, Operand(rdx, 0));
- __ subq(rcx, Immediate(Assembler::kShortCallInstructionLength));
-#else
- __ movq(rdi, Operand(rsi, 0));
- __ subq(rdi, Immediate(Assembler::kShortCallInstructionLength));
-#endif
-
- // Reserve stack for the first 4 args and align the stack.
- __ movq(kScratchRegister, rsp);
- __ subq(rsp, Immediate(4 * kPointerSize));
- int frame_alignment = OS::ActivationFrameAlignment();
- ASSERT(IsPowerOf2(frame_alignment));
- __ and_(rsp, Immediate(-frame_alignment));
-
- // Call the entry hook.
- int64_t hook_location = reinterpret_cast<int64_t>(&entry_hook_);
- __ movq(rax, hook_location, RelocInfo::NONE);
- __ call(Operand(rax, 0));
- __ movq(rsp, kScratchRegister);
-
- // Restore volatile regs.
-#ifdef _WIN64
- __ pop(rcx);
-#else
- __ pop(rsi);
- __ pop(rdi);
- __ pop(rcx);
-#endif
-}
-
#undef __
} } // namespace v8::internal
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698