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

Side by Side Diff: src/libsampler/sampler.cc

Issue 2931143002: Basic compilation on Fuchsia (Closed)
Patch Set: Created 3 years, 6 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/base/platform/platform-posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/libsampler/sampler.h" 5 #include "src/libsampler/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
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 FillRegisterState(context, &state); 408 FillRegisterState(context, &state);
409 SamplerManager::instance()->DoSample(state); 409 SamplerManager::instance()->DoSample(state);
410 } 410 }
411 411
412 void SignalHandler::FillRegisterState(void* context, RegisterState* state) { 412 void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
413 // Extracting the sample from the context is extremely machine dependent. 413 // Extracting the sample from the context is extremely machine dependent.
414 ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context); 414 ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
415 #if !(V8_OS_OPENBSD || (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_S390))) 415 #if !(V8_OS_OPENBSD || (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_S390)))
416 mcontext_t& mcontext = ucontext->uc_mcontext; 416 mcontext_t& mcontext = ucontext->uc_mcontext;
417 #endif 417 #endif
418 #if V8_OS_LINUX 418 #if V8_OS_LINUX || V8_OS_FUCHSIA
419 #if V8_HOST_ARCH_IA32 419 #if V8_HOST_ARCH_IA32
420 state->pc = reinterpret_cast<void*>(mcontext.gregs[REG_EIP]); 420 state->pc = reinterpret_cast<void*>(mcontext.gregs[REG_EIP]);
421 state->sp = reinterpret_cast<void*>(mcontext.gregs[REG_ESP]); 421 state->sp = reinterpret_cast<void*>(mcontext.gregs[REG_ESP]);
422 state->fp = reinterpret_cast<void*>(mcontext.gregs[REG_EBP]); 422 state->fp = reinterpret_cast<void*>(mcontext.gregs[REG_EBP]);
423 #elif V8_HOST_ARCH_X64 423 #elif V8_HOST_ARCH_X64
424 state->pc = reinterpret_cast<void*>(mcontext.gregs[REG_RIP]); 424 state->pc = reinterpret_cast<void*>(mcontext.gregs[REG_RIP]);
425 state->sp = reinterpret_cast<void*>(mcontext.gregs[REG_RSP]); 425 state->sp = reinterpret_cast<void*>(mcontext.gregs[REG_RSP]);
426 state->fp = reinterpret_cast<void*>(mcontext.gregs[REG_RBP]); 426 state->fp = reinterpret_cast<void*>(mcontext.gregs[REG_RBP]);
427 #elif V8_HOST_ARCH_ARM 427 #elif V8_HOST_ARCH_ARM
428 #if V8_LIBC_GLIBC && !V8_GLIBC_PREREQ(2, 4) 428 #if V8_LIBC_GLIBC && !V8_GLIBC_PREREQ(2, 4)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 #endif 654 #endif
655 SampleStack(state); 655 SampleStack(state);
656 } 656 }
657 ResumeThread(profiled_thread); 657 ResumeThread(profiled_thread);
658 } 658 }
659 659
660 #endif // USE_SIGNALS 660 #endif // USE_SIGNALS
661 661
662 } // namespace sampler 662 } // namespace sampler
663 } // namespace v8 663 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698