diff options
author | jeff <jeff@FreeBSD.org> | 2008-07-25 05:49:48 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2008-07-25 05:49:48 +0000 |
commit | 29a49e66e0b61ac69c9ee4a2ea8cbd70a46f35a5 (patch) | |
tree | f528d8b6bd48fb1a2991662da9715a921a591705 /sys/dev | |
parent | 6224f97108062149a33a366e4083dfd1fa5ee0d0 (diff) | |
download | FreeBSD-src-29a49e66e0b61ac69c9ee4a2ea8cbd70a46f35a5.zip FreeBSD-src-29a49e66e0b61ac69c9ee4a2ea8cbd70a46f35a5.tar.gz |
- Provide kernelname as the name for process with P_KTHREAD set as
otherwise their textvp is NULL.
Reviewed by: jkoshy
Sponsored by: Nokia
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index b98ecbf..62a1c8f 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -966,7 +966,11 @@ pmc_attach_one_process(struct proc *p, struct pmc *pm) /* issue an attach event to a configured log file */ if (pm->pm_owner->po_flags & PMC_PO_OWNS_LOGFILE) { pmc_getfilename(p->p_textvp, &fullpath, &freepath); - pmclog_process_pmcattach(pm, p->p_pid, fullpath); + if (p->p_flag & P_KTHREAD) { + fullpath = kernelname; + freepath = NULL; + } else + pmclog_process_pmcattach(pm, p->p_pid, fullpath); if (freepath) FREE(freepath, M_TEMP); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) |