an attempt to 'kldload hwpmc.ko' fails with 'link_elf: symbol lapic undefined' on this hardware. it's unsupported by hwpmc anyway (k6-2), but i guess it should fail in slightly more 'informative' way.
Responsible Changed From-To: freebsd-bugs->jkoshy Take ownership.
Do you have 'device apic' in your kernel config? We need a way to communicate the configuration options for a kernel to the modules being built for it. If this were possible we could avoid compiling the code that uses the local apic when the base kernel doesn't have APIC support enabled.
Building a kernel 6.0-RELEASE with PMC and without APIC failed: -------------------------------------------- linking kernel hwpmc_x86.o(.text+0x5): In function `pmc_x86_lapic_enable_pmc_interrupt': : undefined reference to `lapic' hwpmc_x86.o(.text+0x206): In function `pmc_md_initialize': : undefined reference to `lapic' *** Error code 1 Stop in /usr/obj/usr/src/sys/KERNEL. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. -------------------------------------------- So it seems look like APIC is mandatory for PMC... and this should be mentioned in KERNEL file.
> So it seems look like APIC is mandatory for PMC... and this should be > mentioned in KERNEL file. I've added a mention to the 'NOTES' file that additional architecture specific configuration options are documented in the hwpmc(4) manual page. Regards, Koshy <jkoshy@freebsd.org>
State Changed From-To: open->suspended 'sys/conf/NOTES' now warns that hwpmc may require additional architecture specific configuration options, and that these are documented in the hwpmc(4) manual page. I'm changing the state of the PR to 'suspended' till I find a way of compiling the hwpmc module to match the kernel it is going to run under. I.e., if 'device apic' is missing in an i386 kernel configuration file then compiled hwpmc.ko should not refer to the 'lapic' symbol (and therefore not support sampling either).
State Changed From-To: suspended->suspended commit bit has been taken in for safekeeping.
Responsible Changed From-To: jkoshy->freebsd-bugs
The issue is noted in hwpmc(4) as well as NOTES. Closing old hwpmc bug.