summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc
diff options
context:
space:
mode:
authorvangyzen <vangyzen@FreeBSD.org>2015-06-02 18:37:04 +0000
committervangyzen <vangyzen@FreeBSD.org>2015-06-02 18:37:04 +0000
commit597cee37df5aa788ec64acb3a9802ae6668615ef (patch)
tree79268f7612e1040e6175651adea6aad1b5dd2a45 /sys/dev/hwpmc
parent18d09912312dbabae1bbb38494755bfd77a4192c (diff)
downloadFreeBSD-src-597cee37df5aa788ec64acb3a9802ae6668615ef.zip
FreeBSD-src-597cee37df5aa788ec64acb3a9802ae6668615ef.tar.gz
Provide vnode in memory map info for files on tmpfs
When providing memory map information to userland, populate the vnode pointer for tmpfs files. Set the memory mapping to appear as a vnode type, to match FreeBSD 9 behavior. This fixes the use of tmpfs files with the dtrace pid provider, procstat -v, procfs, linprocfs, pmc (pmcstat), and ptrace (PT_VM_ENTRY). Submitted by: Eric Badger <eric@badgerio.us> (initial revision) Obtained from: Dell Inc. PR: 198431 MFC after: 2 weeks Reviewed by: jhb Approved by: kib (mentor)
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index d1b56f1..131eb35 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -1655,7 +1655,8 @@ pmc_log_process_mappings(struct pmc_owner *po, struct proc *p)
continue;
}
- if (lobj->type != OBJT_VNODE || lobj->handle == NULL) {
+ vp = vm_object_vnode(lobj);
+ if (vp == NULL) {
if (lobj != obj)
VM_OBJECT_RUNLOCK(lobj);
VM_OBJECT_RUNLOCK(obj);
@@ -1667,7 +1668,7 @@ pmc_log_process_mappings(struct pmc_owner *po, struct proc *p)
* vnode, so we don't emit redundant MAP-IN
* directives.
*/
- if (entry->start == last_end && lobj->handle == last_vp) {
+ if (entry->start == last_end && vp == last_vp) {
last_end = entry->end;
if (lobj != obj)
VM_OBJECT_RUNLOCK(lobj);
@@ -1690,7 +1691,6 @@ pmc_log_process_mappings(struct pmc_owner *po, struct proc *p)
last_timestamp = map->timestamp;
vm_map_unlock_read(map);
- vp = lobj->handle;
vref(vp);
if (lobj != obj)
VM_OBJECT_RUNLOCK(lobj);
OpenPOWER on IntegriCloud