diff options
author | Jim Warner <james.warner@comcast.net> | 2021-04-30 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2021-05-02 20:08:38 +1000 |
commit | bf0b3b6522d9ad0d026edaff83f5bf9c8bce1bd8 (patch) | |
tree | fdb85c73445d628c33fb53cdee4dc36c39d70db0 | |
parent | 9bdc1ca295d1608251980beddb2d87a7ede056ff (diff) | |
download | procps-ng-bf0b3b6522d9ad0d026edaff83f5bf9c8bce1bd8.tar.gz |
library: rename/reposition two enumerators, <pids> api
The two special hugetlbfs items were misnamed. The TBL
reference (table) should be TLB (transaction lookaside
buffer). Besides, I never liked their position anyway!
[ and one macro argument tweak is being snuck in too ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
-rw-r--r-- | proc/pids.c | 8 | ||||
-rw-r--r-- | proc/pids.h | 4 | ||||
-rw-r--r-- | proc/readproc.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/proc/pids.c b/proc/pids.c index 472e6af..8cc86c7 100644 --- a/proc/pids.c +++ b/proc/pids.c @@ -241,11 +241,11 @@ DUP_set(SIGIGNORE, sigignore) DUP_set(SIGNALS, signal) DUP_set(SIGPENDING, _sigpnd) REG_set(SMAP_ANONYMOUS, ul_int, smap_Anonymous) -REG_set(SMAP_HUGETBL_PRV, ul_int, smap_Private_Hugetlb) -REG_set(SMAP_HUGETBL_SHR, ul_int, smap_Shared_Hugetlb) REG_set(SMAP_HUGE_ANON, ul_int, smap_AnonHugePages) REG_set(SMAP_HUGE_FILE, ul_int, smap_FilePmdMapped) REG_set(SMAP_HUGE_SHMEM, ul_int, smap_ShmemPmdMapped) +REG_set(SMAP_HUGE_TLBPRV, ul_int, smap_Private_Hugetlb) +REG_set(SMAP_HUGE_TLBSHR, ul_int, smap_Shared_Hugetlb) REG_set(SMAP_LAZY_FREE, ul_int, smap_LazyFree) REG_set(SMAP_LOCKED, ul_int, smap_Locked) REG_set(SMAP_PRV_CLEAN, ul_int, smap_Private_Clean) @@ -519,11 +519,11 @@ static struct { { RS(SIGNALS), f_status, FF(str), QS(str), 0, TS(str) }, { RS(SIGPENDING), f_status, FF(str), QS(str), 0, TS(str) }, { RS(SMAP_ANONYMOUS), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, - { RS(SMAP_HUGETBL_PRV), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, - { RS(SMAP_HUGETBL_SHR), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_HUGE_ANON), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_HUGE_FILE), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_HUGE_SHMEM), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, + { RS(SMAP_HUGE_TLBPRV), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, + { RS(SMAP_HUGE_TLBSHR), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_LAZY_FREE), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_LOCKED), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(SMAP_PRV_CLEAN), f_smaps, NULL, QS(ul_int), 0, TS(ul_int) }, diff --git a/proc/pids.h b/proc/pids.h index 4076502..b34174d 100644 --- a/proc/pids.h +++ b/proc/pids.h @@ -126,11 +126,11 @@ enum pids_item { PIDS_SIGNALS, // str status: ShdPnd PIDS_SIGPENDING, // str status: SigPnd PIDS_SMAP_ANONYMOUS, // ul_int smaps_rollup: Anonymous - PIDS_SMAP_HUGETBL_PRV, // ul_int smaps_rollup: Private_Hugetlb - PIDS_SMAP_HUGETBL_SHR, // ul_int smaps_rollup: Shared_Hugetlb PIDS_SMAP_HUGE_ANON, // ul_int smaps_rollup: AnonHugePages PIDS_SMAP_HUGE_FILE, // ul_int smaps_rollup: FilePmdMapped PIDS_SMAP_HUGE_SHMEM, // ul_int smaps_rollup: ShmemPmdMapped + PIDS_SMAP_HUGE_TLBPRV, // ul_int smaps_rollup: Private_Hugetlb + PIDS_SMAP_HUGE_TLBSHR, // ul_int smaps_rollup: Shared_Hugetlb PIDS_SMAP_LAZY_FREE, // ul_int smaps_rollup: LazyFree PIDS_SMAP_LOCKED, // ul_int smaps_rollup: Locked PIDS_SMAP_PRV_CLEAN, // ul_int smaps_rollup: Private_Clean diff --git a/proc/readproc.c b/proc/readproc.c index 4975981..711b54b 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -659,7 +659,7 @@ static void smaps2proc (const char* s, proc_t *restrict P) { // a smaptab entry generator #define mkENT(F) { #F ":", -1, (int)((void*)&q->smap_ ## F - (void*)&q->fZERO) } // make a target field - #define mkOBJ(e) ( (unsigned long *)((void *)&P->fZERO + smaptab[e].offs) ) + #define mkOBJ(X) ( (unsigned long *)((void *)&P->fZERO + smaptab[X].offs) ) static const proc_t *q; static struct { const char *item; |