Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Consistently use %#jx instead of 0x%jx or just %jx i...



details:   https://anonhg.NetBSD.org/src/rev/5b0024964288
branches:  trunk
changeset: 1019529:5b0024964288
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 13 15:29:55 2021 +0000

description:
Consistently use %#jx instead of 0x%jx or just %jx in UVMHIST_LOG formats

diffstat:

 sys/uvm/pmap/pmap_segtab.c |   6 +++---
 sys/uvm/uvm_amap.c         |   8 ++++----
 sys/uvm/uvm_aobj.c         |   6 +++---
 sys/uvm/uvm_bio.c          |  16 ++++++++--------
 sys/uvm/uvm_device.c       |   6 +++---
 sys/uvm/uvm_km.c           |   6 +++---
 sys/uvm/uvm_map.c          |  14 +++++++-------
 sys/uvm/uvm_swap.c         |  26 +++++++++++++-------------
 sys/uvm/uvm_vnode.c        |  10 +++++-----
 9 files changed, 49 insertions(+), 49 deletions(-)

diffs (truncated from 424 to 300 lines):

diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/pmap/pmap_segtab.c
--- a/sys/uvm/pmap/pmap_segtab.c        Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/pmap/pmap_segtab.c        Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_segtab.c,v 1.26 2020/10/08 14:02:40 skrll Exp $   */
+/*     $NetBSD: pmap_segtab.c,v 1.27 2021/03/13 15:29:55 skrll Exp $   */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.26 2020/10/08 14:02:40 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.27 2021/03/13 15:29:55 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -265,7 +265,7 @@
        UVMHIST_FUNC(__func__);
        UVMHIST_CALLARGS(pmapsegtabhist, "pm=%#jx stpp=%#jx free=%jd",
            (uintptr_t)pmap, (uintptr_t)stp_p, free_stp, 0);
-       UVMHIST_LOG(pmapsegtabhist, " callback=%#jx flags=%jx va=%#jx vinc=%#jx",
+       UVMHIST_LOG(pmapsegtabhist, " callback=%#jx flags=%#jx va=%#jx vinc=%#jx",
            (uintptr_t)callback, flags, (uintptr_t)va, (uintptr_t)vinc);
        for (size_t i = (va / vinc) & (PMAP_SEGTABSIZE - 1);
             i < PMAP_SEGTABSIZE;
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c        Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_amap.c        Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap.c,v 1.125 2020/09/21 18:41:59 chs Exp $       */
+/*     $NetBSD: uvm_amap.c,v 1.126 2021/03/13 15:29:55 skrll Exp $     */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.125 2020/09/21 18:41:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.126 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -827,7 +827,7 @@
        vsize_t len;
 
        UVMHIST_FUNC(__func__);
-       UVMHIST_CALLARGS(maphist, "  (map=%#j, entry=%#j, flags=%jd)",
+       UVMHIST_CALLARGS(maphist, "  (map=%#jx, entry=%#jx, flags=%#jx)",
            (uintptr_t)map, (uintptr_t)entry, flags, -2);
 
        KASSERT(map != kernel_map);     /* we use nointr pool */
@@ -903,7 +903,7 @@
                return;
        }
 
-       UVMHIST_LOG(maphist,"  amap=%#j, ref=%jd, must copy it",
+       UVMHIST_LOG(maphist,"  amap=%#jx, ref=%jd, must copy it",
            (uintptr_t)srcamap, srcamap->am_ref, 0, 0);
 
        /*
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_aobj.c        Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.152 2020/11/04 01:30:19 chs Exp $       */
+/*     $NetBSD: uvm_aobj.c,v 1.153 2021/03/13 15:29:55 skrll Exp $     */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.152 2020/11/04 01:30:19 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.153 2021/03/13 15:29:55 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -810,7 +810,7 @@
        struct uvm_page_array a;
 
        UVMHIST_FUNC(__func__);
-       UVMHIST_CALLARGS(pdhist, "aobj=%#jx offset=%jd, flags=%jd",
+       UVMHIST_CALLARGS(pdhist, "aobj=%#jx offset=%jd, flags=%#jx",
                    (uintptr_t)uobj, offset, flags,0);
 
        /*
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_bio.c Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_bio.c,v 1.124 2020/11/10 04:27:22 chs Exp $        */
+/*     $NetBSD: uvm_bio.c,v 1.125 2021/03/13 15:29:55 skrll Exp $      */
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.124 2020/11/10 04:27:22 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.125 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -342,7 +342,7 @@
         */
 
        access_type = umap->writelen ? VM_PROT_WRITE : VM_PROT_READ;
-       UVMHIST_LOG(ubchist, "va 0x%jx ubc_offset 0x%jx access_type %jd",
+       UVMHIST_LOG(ubchist, "va %#jx ubc_offset %#jx access_type %jd",
            va, ubc_offset, access_type, 0);
 
        if ((access_type & VM_PROT_WRITE) != 0) {
@@ -374,9 +374,9 @@
        memset(pgs, 0, sizeof (pgs));
        rw_enter(uobj->vmobjlock, RW_WRITER);
 
-       UVMHIST_LOG(ubchist, "slot_offset 0x%jx writeoff 0x%jx writelen 0x%jx ",
+       UVMHIST_LOG(ubchist, "slot_offset %#jx writeoff %#jx writelen %#jx ",
            slot_offset, umap->writeoff, umap->writelen, 0);
-       UVMHIST_LOG(ubchist, "getpages uobj %#jx offset 0x%jx npages %jd",
+       UVMHIST_LOG(ubchist, "getpages uobj %#jx offset %#jx npages %jd",
            (uintptr_t)uobj, umap->offset + slot_offset, npages, 0);
 
        error = (*uobj->pgops->pgo_get)(uobj, umap->offset + slot_offset, pgs,
@@ -409,7 +409,7 @@
        va = ufi->orig_rvaddr;
        eva = ufi->orig_rvaddr + (npages << PAGE_SHIFT);
 
-       UVMHIST_LOG(ubchist, "va 0x%jx eva 0x%jx", va, eva, 0, 0);
+       UVMHIST_LOG(ubchist, "va %#jx eva %#jx", va, eva, 0, 0);
 
        /*
         * Note: normally all returned pages would have the same UVM object.
@@ -483,7 +483,7 @@
        voff_t umap_offset;
        int error;
        UVMHIST_FUNC(__func__);
-       UVMHIST_CALLARGS(ubchist, "uobj %#jx offset 0x%jx len 0x%jx",
+       UVMHIST_CALLARGS(ubchist, "uobj %#jx offset %#jx len %#jx",
            (uintptr_t)uobj, offset, *lenp, 0);
 
        KASSERT(*lenp > 0);
@@ -560,7 +560,7 @@
        umap->refcount++;
        umap->advice = advice;
        rw_exit(ubc_object.uobj.vmobjlock);
-       UVMHIST_LOG(ubchist, "umap %#jx refs %jd va %#jx flags 0x%jx",
+       UVMHIST_LOG(ubchist, "umap %#jx refs %jd va %#jx flags %#jx",
            (uintptr_t)umap, umap->refcount, (uintptr_t)va, flags);
 
        if (flags & UBC_FAULTBUSY) {
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_device.c
--- a/sys/uvm/uvm_device.c      Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_device.c      Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_device.c,v 1.71 2020/07/09 05:57:15 skrll Exp $    */
+/*     $NetBSD: uvm_device.c,v 1.72 2021/03/13 15:29:55 skrll Exp $    */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.71 2020/07/09 05:57:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.72 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -364,7 +364,7 @@
        dev_t device;
        vm_prot_t mapprot;
        UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist);
-       UVMHIST_LOG(maphist,"  flags=%jd", flags,0,0,0);
+       UVMHIST_LOG(maphist,"  flags=%#jx", flags,0,0,0);
 
        /*
         * we do not allow device mappings to be mapped copy-on-write
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c  Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_km.c  Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_km.c,v 1.159 2020/07/09 05:57:15 skrll Exp $       */
+/*     $NetBSD: uvm_km.c,v 1.160 2021/03/13 15:29:55 skrll Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -152,7 +152,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.159 2020/07/09 05:57:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.160 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -618,7 +618,7 @@
        kva = vm_map_min(map);  /* hint */
        size = round_page(size);
        obj = (flags & UVM_KMF_PAGEABLE) ? uvm_kernel_object : NULL;
-       UVMHIST_LOG(maphist,"  (map=%#jx, obj=%#jx, size=%#jx, flags=%jd)",
+       UVMHIST_LOG(maphist,"  (map=%#jx, obj=%#jx, size=%#jx, flags=%#jx)",
            (uintptr_t)map, (uintptr_t)obj, size, flags);
 
        /*
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_map.c Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.385 2020/07/09 05:57:15 skrll Exp $      */
+/*     $NetBSD: uvm_map.c,v 1.386 2021/03/13 15:29:55 skrll Exp $      */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.385 2020/07/09 05:57:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.386 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -806,7 +806,7 @@
 uvm_mapent_free(struct vm_map_entry *me)
 {
        UVMHIST_FUNC(__func__);
-       UVMHIST_CALLARGS(maphist,"<- freeing map entry=%#jx [flags=%jd]",
+       UVMHIST_CALLARGS(maphist,"<- freeing map entry=%#jx [flags=%#jx]",
                (uintptr_t)me, me->flags, 0, 0);
        pool_cache_put(&uvm_map_entry_cache, me);
 }
@@ -2115,9 +2115,9 @@
        SAVE_HINT(map, map->hint, entry);
        *result = hint;
        UVMHIST_LOG(maphist,"<- got it!  (result=%#jx)", hint, 0,0,0);
-       KASSERTMSG( topdown || hint >= orig_hint, "hint: %jx, orig_hint: %jx",
+       KASSERTMSG( topdown || hint >= orig_hint, "hint: %#jx, orig_hint: %#jx",
            (uintmax_t)hint, (uintmax_t)orig_hint);
-       KASSERTMSG(!topdown || hint <= orig_hint, "hint: %jx, orig_hint: %jx",
+       KASSERTMSG(!topdown || hint <= orig_hint, "hint: %#jx, orig_hint: %#jx",
            (uintmax_t)hint, (uintmax_t)orig_hint);
        KASSERT(entry->end <= hint);
        KASSERT(hint + length <= entry->next->start);
@@ -4811,7 +4811,7 @@
        void (*unlock_fn)(struct vm_map *);
 
        UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist);
-       UVMHIST_LOG(maphist,"(map=%#jx,va=%jx)", (uintptr_t)map, va, 0, 0);
+       UVMHIST_LOG(maphist,"(map=%#jx,va=%#jx)", (uintptr_t)map, va, 0, 0);
 
        const vaddr_t start = trunc_page(va);
        const vaddr_t end = round_page(va+1);
@@ -4969,7 +4969,7 @@
 
        if (result) {
                UVMHIST_LOG(maphist,
-                   "<- done OK (type=%jd,owner=#%jx,offset=%jx)",
+                   "<- done OK (type=%jd,owner=%#jx,offset=%#jx)",
                    UVM_VOADDR_GET_TYPE(voaddr),
                    UVM_VOADDR_GET_OBJECT(voaddr),
                    voaddr->offset, 0);
diff -r 6d5eeab06d7a -r 5b0024964288 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Sat Mar 13 15:29:13 2021 +0000
+++ b/sys/uvm/uvm_swap.c        Sat Mar 13 15:29:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.202 2021/02/19 13:20:43 hannken Exp $   */
+/*     $NetBSD: uvm_swap.c,v 1.203 2021/03/13 15:29:55 skrll Exp $     */
 
 /*
  * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.202 2021/02/19 13:20:43 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.203 2021/03/13 15:29:55 skrll Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_compat_netbsd.h"
@@ -933,7 +933,7 @@
                goto bad;
        }
 
-       UVMHIST_LOG(pdhist, "  dev=%jx: size=%jd addr=%jd", dev, size, addr, 0);
+       UVMHIST_LOG(pdhist, "  dev=%#jx: size=%jd addr=%jd", dev, size, addr, 0);
 
        /*
         * now we need to allocate an extent to manage this swap device
@@ -1052,7 +1052,7 @@
        int error = 0;
 
        UVMHIST_FUNC(__func__);
-       UVMHIST_CALLARGS(pdhist, "  dev=%jx, npages=%jd", sdp->swd_dev,npages, 0, 0);
+       UVMHIST_CALLARGS(pdhist, "  dev=%#jx, npages=%jd", sdp->swd_dev,npages, 0, 0);



Home | Main Index | Thread Index | Old Index