View | Details | Raw Unified | Return to bug 242533 | Differences between
and this patch

Collapse All | Expand All

(-)devel/libgtop/files/patch-sysdeps_freebsd_procmap.c (-7 / +14 lines)
Lines 1-5 Link Here
1
--- sysdeps/freebsd/procmap.c.orig	2017-08-07 18:43:41.000000000 -0400
1
--- sysdeps/freebsd/procmap.c.orig	2017-08-07 18:43:41.000000000 -0400
2
+++ sysdeps/freebsd/procmap.c	2019-12-26 16:37:29.791528000 -0500
2
+++ sysdeps/freebsd/procmap.c	2020-01-10 22:59:48.661882000 +0900
3
@@ -52,6 +52,8 @@
3
@@ -52,6 +52,8 @@
4
 #include <sys/mount.h>
4
 #include <sys/mount.h>
5
 #include <ufs/ufs/quota.h>
5
 #include <ufs/ufs/quota.h>
Lines 9-15 Link Here
9
 #include <fs/devfs/devfs.h>
9
 #include <fs/devfs/devfs.h>
10
 #if (__FreeBSD_version >= 600006) || defined(__FreeBSD_kernel__)
10
 #if (__FreeBSD_version >= 600006) || defined(__FreeBSD_kernel__)
11
 #include <fs/devfs/devfs_int.h>
11
 #include <fs/devfs/devfs_int.h>
12
@@ -95,6 +97,8 @@
12
@@ -95,12 +97,14 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, s
13
         struct cdev_priv priv;
13
         struct cdev_priv priv;
14
 #if __FreeBSD_version < 800039
14
 #if __FreeBSD_version < 800039
15
         struct cdev si;
15
         struct cdev si;
Lines 18-24 Link Here
18
 #endif
18
 #endif
19
 
19
 
20
         *inum = 0;
20
         *inum = 0;
21
@@ -231,6 +235,32 @@
21
         *dev = 0;
22
 
23
-        if (kvm_read (server->machine->kd, (gulong) &vnode->v_tag,
24
+        if (kvm_read (server->machine->kd, (gulong) &vnode->v_lock.lock_object.lo_name,
25
  	             (char *) &tagptr, sizeof (tagptr)) != sizeof (tagptr) ||
26
             kvm_read (server->machine->kd, (gulong) tagptr,
27
 		     (char *) tagstr, sizeof (tagstr)) != sizeof (tagstr))
28
@@ -231,6 +235,32 @@ _glibtop_init_proc_map_p (glibtop *server)
22
         server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
29
         server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
23
 }
30
 }
24
 
31
 
Lines 51-57 Link Here
51
 /* Provides detailed information about a process. */
58
 /* Provides detailed information about a process. */
52
 
59
 
53
 glibtop_map_entry *
60
 glibtop_map_entry *
54
@@ -238,13 +268,12 @@
61
@@ -238,13 +268,12 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_
55
                         pid_t pid)
62
                         pid_t pid)
56
 {
63
 {
57
         struct kinfo_proc *pinfo;
64
         struct kinfo_proc *pinfo;
Lines 67-73 Link Here
67
 
74
 
68
         memset (buf, 0, sizeof (glibtop_proc_map));
75
         memset (buf, 0, sizeof (glibtop_proc_map));
69
 
76
 
70
@@ -273,16 +302,6 @@
77
@@ -273,16 +302,6 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_
71
                 return NULL;
78
                 return NULL;
72
         }
79
         }
73
 
80
 
Lines 84-90 Link Here
84
         /* Walk through the `vm_map_entry' list ... */
91
         /* Walk through the `vm_map_entry' list ... */
85
 
92
 
86
         /* I tested this a few times with `mmap'; as soon as you write
93
         /* I tested this a few times with `mmap'; as soon as you write
87
@@ -292,21 +311,17 @@
94
@@ -292,21 +311,17 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_
88
         maps = g_array_sized_new(FALSE, FALSE, sizeof(glibtop_map_entry),
95
         maps = g_array_sized_new(FALSE, FALSE, sizeof(glibtop_map_entry),
89
                                  vmspace.vm_map.nentries);
96
                                  vmspace.vm_map.nentries);
90
 
97
 
Lines 113-119 Link Here
113
 
120
 
114
                 if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
121
                 if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
115
                         continue;
122
                         continue;
116
@@ -377,7 +392,7 @@
123
@@ -377,7 +392,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_
117
                 if (entry.protection & VM_PROT_EXECUTE)
124
                 if (entry.protection & VM_PROT_EXECUTE)
118
                         mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
125
                         mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
119
 
126
 

Return to bug 242533