SIGTRAP 信号处理器: 统计 perf_event 产生的 SIGTRAP 数量 si_code == TRAP_PERF (6) 表示该信号来自 perf_event overflow
| 604 | // SIGTRAP 信号处理器: 统计 perf_event 产生的 SIGTRAP 数量 |
| 605 | // si_code == TRAP_PERF (6) 表示该信号来自 perf_event overflow |
| 606 | static void tp_sigtrap_handler(int sig, siginfo_t *info, void *ucontext) |
| 607 | { |
| 608 | (void)sig; |
| 609 | (void)ucontext; |
| 610 | |
| 611 | tp_sigtrap_count++; |
| 612 | __atomic_store_n(&tp_last_sigtrap_ns, get_time_ns(), __ATOMIC_RELEASE); |
| 613 | if (!info || info->si_code != TRAP_PERF) |
| 614 | log_warn("[tp] unexpected SIGTRAP si_code=%d", info ? info->si_code : -1); |
| 615 | } |
| 616 | |
| 617 | static const char *tp_futex_wait_state_string(int futex_ret, int futex_errno) |
| 618 | { |
nothing calls this directly
no test coverage detected