Summary: | pmcstat(8) doesn't search symbols under /boot/modules | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Jan Beich <jbeich> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | CC: | jhb, markj, ngie | ||||
Priority: | Normal | ||||||
Version: | 10.0-CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Jan Beich
2011-12-25 01:50:10 UTC
I'm not able to reproduce this at the moment. Any tips on how? Or maybe you could test out this patch: http://people.freebsd.org/~lulf/patches/pmcstat_modules.diff Comment on attachment 120742 [details] pmcstat_modules.diff (In reply to Jan Beich from comment #0) > $ pmcstat -R /tmp/all.pmc -G all.graph > pmcstat: WARNING: Cannot determine the type of "/boot/kernel/nvidia.ko". I can't reproduce the warnings, too. After applying the patch all.graph now contains references to nvidia.ko. Also, tested with a few more modules moved from /boot/kernel to /boot/modules. Thanks. This also bit us at $work after the `kern.bootfile` check was added to pmcstat in r282643 as loader doesn't keep the file extension for compressed kernels. I think that it would be wiser for `kern.bootfile` to maybe be replaced with `kern.module_path`. jhb: what do you think? To be clear, prior to r282643, pmcstat always used /boot/kernel/kernel no matter what you booted (/boot/foo/kernel, or /boot/kernel/kernel.gz). OTOH, it's not clear to me why pmcstat needs to do its own manual search in the module path to begin with. The kernel stores the full path to each module (it's output if you use kldstat -v). That is what kgdb uses to find module symbols rather than trying to guess by doing its own lookup. It would be very trivial to fix pmc to export the full path instead. Just change the hwpmc hook in sys/kern/kern_linker.c to use 'lf->pathname' instead of 'lf->filename'. pmcstat could then use that path if it exists (or perhaps accept a '--sysroot' type option similar to solib-prefix in gdb for use when doing offline analysis on another machine) For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open" For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open" |