From patchwork Fri Nov 5 20:43:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96B95C433FE for ; Fri, 5 Nov 2021 20:43:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 48A0161355 for ; Fri, 5 Nov 2021 20:43:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 48A0161355 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E453594009B; Fri, 5 Nov 2021 16:43:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF2A5940093; Fri, 5 Nov 2021 16:43:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D09DA94009B; Fri, 5 Nov 2021 16:43:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id C0EA9940093 for ; Fri, 5 Nov 2021 16:43:12 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 882DC779B0 for ; Fri, 5 Nov 2021 20:43:12 +0000 (UTC) X-FDA: 78776051424.24.5D78A56 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 727ABD0000A9 for ; Fri, 5 Nov 2021 20:42:55 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 540D261355; Fri, 5 Nov 2021 20:43:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144985; bh=I2DItkYvN5bnUgDVb2gxsHA4B4GOX2xKFZqeBeAEkHY=; h=Date:From:To:Subject:In-Reply-To:From; b=h5GqdKZ6A6sZ8rn+RoZMkM1IUptaslU9dd0bDvYFp4Czxkg5mPZpmGOWCqwTWWxl0 O+9qBz5eLWztDvhWstGtsfdZPonJaj31MutEneDNRhjTg/U0+MNALbqWxOy6RxvOxu 1YKMDQLXtccMuRAmb+/tl9YL7q1QXgrHmzeSZRKs= Date: Fri, 05 Nov 2021 13:43:04 -0700 From: Andrew Morton To: akpm@linux-foundation.org, changbin.du@intel.com, chansen3@cisco.com, koct9i@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, naoya.horiguchi@nec.com, torvalds@linux-foundation.org, wangbin224@huawei.com Subject: [patch 161/262] tools/vm/page-types.c: print file offset in hexadecimal Message-ID: <20211105204304.q6OqMQ7kF%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=h5GqdKZ6; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 727ABD0000A9 X-Stat-Signature: 9yhgz8r9s5cka75ybnbr6f4d34bqgzkd X-HE-Tag: 1636144975-410684 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Naoya Horiguchi Subject: tools/vm/page-types.c: print file offset in hexadecimal In page list mode (with -l and -L option), virtual address and physical address are printed in hexadecimal, but file offset is not, which is confusing, so let's align it. Link: https://lkml.kernel.org/r/20211004061325.1525902-4-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Cc: Bin Wang Cc: Changbin Du Cc: Christian Hansen Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton --- tools/vm/page-types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/tools/vm/page-types.c~tools-vm-page-typesc-print-file-offset-in-hexadecimal +++ a/tools/vm/page-types.c @@ -390,7 +390,7 @@ static void show_page_range(unsigned lon if (opt_pid) printf("%lx\t", voff); if (opt_file) - printf("%lu\t", voff); + printf("%lx\t", voff); if (opt_list_cgroup) printf("@%llu\t", (unsigned long long)cgroup0); if (opt_list_mapcnt) @@ -418,7 +418,7 @@ static void show_page(unsigned long voff if (opt_pid) printf("%lx\t", voffset); if (opt_file) - printf("%lu\t", voffset); + printf("%lx\t", voffset); if (opt_list_cgroup) printf("@%llu\t", (unsigned long long)cgroup); if (opt_list_mapcnt)