On Fri, Jun 08, 2018 at 04:58:03AM +0000, Matt Macy wrote: > Author: mmacy > Date: Fri Jun 8 04:58:03 2018 > New Revision: 334827 > URL: https://svnweb.freebsd.org/changeset/base/334827 > > Log: > hwpmc: simplify calling convention for hwpmc interrupt handling > > pmc_process_interrupt takes 5 arguments when only 3 are needed. > cpu is always available in curcpu and inuserspace can always be > derived from the passed trapframe. > > While facially a reasonable cleanup this change was motivated > by the need to workaround a compiler bug.
What is the compiler bug? Do you have disassembly of the subroutines in question? > > core2_intr(cpu, tf) -> > pmc_process_interrupt(cpu, ring, pmc, tf, inuserspace) -> > pmc_add_sample(cpu, ring, pm, tf, inuserspace) > > In the process of optimizing the tail call the tf pointer was getting > clobbered: > > (kgdb) up > at /storage/mmacy/devel/freebsd/sys/dev/hwpmc/hwpmc_mod.c:4709 > 4709 pmc_save_kernel_callchain(ps->ps_pc, > (kgdb) up > 1205 error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, > > resulting in a crash in pmc_save_kernel_callchain. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"