6#if defined(DART_HOST_OS_LINUX)
22class ThreadInterrupterLinux :
public AllStatic {
24 static void ThreadInterruptSignalHandler(
int signal,
27 if (signal != SIGPROF) {
31 if (thread ==
nullptr) {
34 ThreadInterruptScope signal_handler_scope;
36 ucontext_t* context =
reinterpret_cast<ucontext_t*
>(context_);
37 mcontext_t mcontext = context->uc_mcontext;
38 InterruptedThreadState its;
49 if (FLAG_trace_thread_interrupter) {
51 reinterpret_cast<void*
>(thread->id()));
53 int result = pthread_kill(thread->id(), SIGPROF);
57void ThreadInterrupter::InstallSignalHandler() {
61void ThreadInterrupter::RemoveSignalHandler() {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static void SampleThread(Thread *thread, const InterruptedThreadState &state)
static uintptr_t GetDartStackPointer(const mcontext_t &mcontext)
static uintptr_t GetCStackPointer(const mcontext_t &mcontext)
static uintptr_t GetFramePointer(const mcontext_t &mcontext)
static uintptr_t GetProgramCounter(const mcontext_t &mcontext)
static void Install(SignalAction action)
static uintptr_t GetLinkRegister(const mcontext_t &mcontext)
static void InterruptThread(OSThread *thread)
static Thread * Current()
DECLARE_FLAG(bool, show_invisible_frames)