tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: Fixing signal records when ktrace'ing under netbsd32 emulation
couple of comments about the patch itself, not the potentially
intrusiveness of it (which i'm not sure is that bad):
> - ktrpsig(signo, SIGACTION_PS(ps, signo).sa_handler,
> - mask, ksi);
> + if (__predict_false(p->p_emul->e_ktrpsig))
> + p->p_emul->e_ktrpsig(signo,
> + SIGACTION_PS(ps, signo).sa_handler,
> + mask, ksi);
i don't think __predict_false() is useful here. we're already in
the slowpath, so this really only hurts readability.
> Index: compat/netbsd32/netbsd32_netbsd.c
[ ... ]
> +void
> +netbsd32_ktrpsig(int sig, sig_t action, const sigset_t *mask,
> + const ksiginfo_t *ksi)
> +{
> + struct ktrace_entry *kte;
> + lwp_t *l = curlwp;
> + struct {
> + struct netbsd32_ktr_psig kp;
> + siginfo32_t si;
> + } *kbuf;
> +
> + if (!KTRPOINT(l->l_proc, KTR_PSIG))
> + return;
netbsd32_netbsd.c is supposed to only be for "simple" conversions,
this should all live in netbsd32_signal.c. (then the new
netbsd32_ksi_to_ksi32() can also become static.)
thanks!
.mrg.
Home |
Main Index |
Thread Index |
Old Index