Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151257544
D9246.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9246.diff
View Options
Index: sys/kern/kern_linker.c
===================================================================
--- sys/kern/kern_linker.c
+++ sys/kern/kern_linker.c
@@ -1992,7 +1992,7 @@
TAILQ_FOREACH(lf, &linker_files, link) {
/* Save the info for this linker file. */
- kobase[i].pm_file = lf->filename;
+ kobase[i].pm_file = lf->pathname;
kobase[i].pm_address = (uintptr_t)lf->address;
i++;
}
Index: sys/kern/link_elf_obj.c
===================================================================
--- sys/kern/link_elf_obj.c
+++ sys/kern/link_elf_obj.c
@@ -481,6 +481,7 @@
Elf_Ehdr *hdr;
Elf_Shdr *shdr;
Elf_Sym *es;
+ char *fullpath, *freepath;
int nbytes, i, j;
vm_offset_t mapbase;
size_t mapsize;
@@ -557,7 +558,13 @@
goto out;
}
- lf = linker_make_file(filename, &link_elf_class);
+ /* Try to get the full path, hwpmc(4) will use it. */
+ fullpath = __DECONST(char *, filename);
+ freepath = NULL;
+ vn_fullpath(td, nd.ni_vp, &fullpath, &freepath);
+
+ lf = linker_make_file(fullpath, &link_elf_class);
+ free(freepath, M_TEMP);
if (!lf) {
error = ENOMEM;
goto out;
Index: usr.sbin/pmcstat/pmcstat_log.c
===================================================================
--- usr.sbin/pmcstat/pmcstat_log.c
+++ usr.sbin/pmcstat/pmcstat_log.c
@@ -646,7 +646,7 @@
* Look for kernel modules under FSROOT/KERNELPATH/NAME,
* and user mode executable objects under FSROOT/PATHNAME.
*/
- if (image->pi_iskernelmodule)
+ if (image->pi_iskernelmodule && path[0] != '/')
(void) snprintf(buffer, sizeof(buffer), "%s%s/%s",
args.pa_fsroot, args.pa_kernel, path);
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 4:03 AM (11 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31074084
Default Alt Text
D9246.diff (1 KB)
Attached To
Mode
D9246: hwpmc module log with full path
Attached
Detach File
Event Timeline
Log In to Comment