From 09e97c41f2b827f09990226e64b60f9e8eaf14ae Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 9 Nov 2011 11:57:05 +0000 Subject: [PATCH] MIPS: Enable the V8 profiler on MIPS. BUG= TEST= Review URL: http://codereview.chromium.org/8507008 Patch from Gergely Kis . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/platform-linux.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/platform-linux.cc b/src/platform-linux.cc index 90f45dd..4271a70 100644 --- a/src/platform-linux.cc +++ b/src/platform-linux.cc @@ -964,7 +964,6 @@ static int GetThreadID() { static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { -#ifndef V8_HOST_ARCH_MIPS USE(info); if (signal != SIGPROF) return; Isolate* isolate = Isolate::UncheckedCurrent(); @@ -1006,15 +1005,14 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { sample->pc = reinterpret_cast
(mcontext.arm_pc); sample->sp = reinterpret_cast
(mcontext.arm_sp); sample->fp = reinterpret_cast
(mcontext.arm_fp); -#endif +#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) #elif V8_HOST_ARCH_MIPS - sample.pc = reinterpret_cast
(mcontext.pc); - sample.sp = reinterpret_cast
(mcontext.gregs[29]); - sample.fp = reinterpret_cast
(mcontext.gregs[30]); -#endif + sample->pc = reinterpret_cast
(mcontext.pc); + sample->sp = reinterpret_cast
(mcontext.gregs[29]); + sample->fp = reinterpret_cast
(mcontext.gregs[30]); +#endif // V8_HOST_ARCH_* sampler->SampleStack(sample); sampler->Tick(sample); -#endif } -- 2.7.4