lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1551425934-28068-1-git-send-email-laoar.shao@gmail.com>
Date:   Fri,  1 Mar 2019 15:38:54 +0800
From:   Yafang Shao <laoar.shao@...il.com>
To:     vbabka@...e.cz, mhocko@...e.com, jrdr.linux@...il.com
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, shaoyafang@...iglobal.com,
        Yafang Shao <laoar.shao@...il.com>
Subject: [PATCH] mm: vmscan: show zone type in kswapd tracepoints

If we want to know the zone type, we have to check whether
CONFIG_ZONE_DMA, CONFIG_ZONE_DMA32 and CONFIG_HIGHMEM are set or not,
that's not so convenient.

We'd better show the zone type directly.

Signed-off-by: Yafang Shao <laoar.shao@...il.com>
---
 include/trace/events/vmscan.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index a1cb913..4c8880b 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -73,7 +73,10 @@
 		__entry->order	= order;
 	),
 
-	TP_printk("nid=%d zid=%d order=%d", __entry->nid, __entry->zid, __entry->order)
+	TP_printk("nid=%d zid=%-8s order=%d",
+		__entry->nid,
+		__print_symbolic(__entry->zid, ZONE_TYPE),
+		__entry->order)
 );
 
 TRACE_EVENT(mm_vmscan_wakeup_kswapd,
@@ -96,9 +99,9 @@
 		__entry->gfp_flags	= gfp_flags;
 	),
 
-	TP_printk("nid=%d zid=%d order=%d gfp_flags=%s",
+	TP_printk("nid=%d zid=%-8s order=%d gfp_flags=%s",
 		__entry->nid,
-		__entry->zid,
+		__print_symbolic(__entry->zid, ZONE_TYPE),
 		__entry->order,
 		show_gfp_flags(__entry->gfp_flags))
 );
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ