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

Side by Side Diff: src/sampler.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/globals.h ('k') | src/serialize.cc » ('j') | src/serialize.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/sampler.h" 5 #include "src/sampler.h"
6 6
7 #if V8_OS_POSIX && !V8_OS_CYGWIN 7 #if V8_OS_POSIX && !V8_OS_CYGWIN
8 8
9 #define USE_SIGNALS 9 #define USE_SIGNALS
10 10
11 #include <errno.h> 11 #include <errno.h>
12 #include <pthread.h> 12 #include <pthread.h>
13 #include <signal.h> 13 #include <signal.h>
14 #include <sys/time.h> 14 #include <sys/time.h>
15 15
16 #if !V8_OS_QNX && !V8_OS_NACL 16 #if !V8_OS_QNX && !V8_OS_NACL && !V8_OS_AIX
17 #include <sys/syscall.h> // NOLINT 17 #include <sys/syscall.h> // NOLINT
18 #endif 18 #endif
19 19
20 #if V8_OS_MACOSX 20 #if V8_OS_MACOSX
21 #include <mach/mach.h> 21 #include <mach/mach.h>
22 // OpenBSD doesn't have <ucontext.h>. ucontext_t lives in <signal.h> 22 // OpenBSD doesn't have <ucontext.h>. ucontext_t lives in <signal.h>
23 // and is a typedef for struct sigcontext. There is no uc_mcontext. 23 // and is a typedef for struct sigcontext. There is no uc_mcontext.
24 #elif(!V8_OS_ANDROID || defined(__BIONIC_HAVE_UCONTEXT_T)) && \ 24 #elif(!V8_OS_ANDROID || defined(__BIONIC_HAVE_UCONTEXT_T)) && \
25 !V8_OS_OPENBSD && !V8_OS_NACL 25 !V8_OS_OPENBSD && !V8_OS_NACL
26 #include <ucontext.h> 26 #include <ucontext.h>
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 #elif V8_OS_QNX 472 #elif V8_OS_QNX
473 #if V8_HOST_ARCH_IA32 473 #if V8_HOST_ARCH_IA32
474 state.pc = reinterpret_cast<Address>(mcontext.cpu.eip); 474 state.pc = reinterpret_cast<Address>(mcontext.cpu.eip);
475 state.sp = reinterpret_cast<Address>(mcontext.cpu.esp); 475 state.sp = reinterpret_cast<Address>(mcontext.cpu.esp);
476 state.fp = reinterpret_cast<Address>(mcontext.cpu.ebp); 476 state.fp = reinterpret_cast<Address>(mcontext.cpu.ebp);
477 #elif V8_HOST_ARCH_ARM 477 #elif V8_HOST_ARCH_ARM
478 state.pc = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_PC]); 478 state.pc = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_PC]);
479 state.sp = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_SP]); 479 state.sp = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_SP]);
480 state.fp = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_FP]); 480 state.fp = reinterpret_cast<Address>(mcontext.cpu.gpr[ARM_REG_FP]);
481 #endif // V8_HOST_ARCH_* 481 #endif // V8_HOST_ARCH_*
482 #endif // V8_OS_QNX 482 #elif V8_OS_AIX
483 state.pc = reinterpret_cast<Address>(mcontext.jmp_context.iar);
484 state.sp = reinterpret_cast<Address>(mcontext.jmp_context.gpr[1]);
485 state.fp = reinterpret_cast<Address>(mcontext.jmp_context.gpr[31]);
486 #endif // V8_OS_AIX
483 #endif // USE_SIMULATOR 487 #endif // USE_SIMULATOR
484 sampler->SampleStack(state); 488 sampler->SampleStack(state);
485 } 489 }
486 #endif // V8_OS_NACL 490 #endif // V8_OS_NACL
487 491
488 #endif 492 #endif
489 493
490 494
491 class SamplerThread : public base::Thread { 495 class SamplerThread : public base::Thread {
492 public: 496 public:
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 #endif // USE_SIMULATOR 769 #endif // USE_SIMULATOR
766 SampleStack(state); 770 SampleStack(state);
767 } 771 }
768 ResumeThread(profiled_thread); 772 ResumeThread(profiled_thread);
769 } 773 }
770 774
771 #endif // USE_SIGNALS 775 #endif // USE_SIGNALS
772 776
773 777
774 } } // namespace v8::internal 778 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/serialize.cc » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698