Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp271651imb; Thu, 28 Feb 2019 23:41:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzrrc/4ubnzAK1SKQQa/UTDV9nLCR+C4gBNV1a48y9G+Gx9ikp6Elj0bU1ZZftBPyKzIR9o X-Received: by 2002:a65:42c6:: with SMTP id l6mr3558982pgp.344.1551426085680; Thu, 28 Feb 2019 23:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551426085; cv=none; d=google.com; s=arc-20160816; b=t2GuPTTAee6KTufuW4twxtHgoGvFg/Ya3DFZVgx82gQFgznPcNXoVixs16UG8Z5zHq J9AJb4wmJks3tDPf0CywW79qpQCEHIUri0RWXr38zCdkm4TGdpTWBNYCUQky1qRcZ1z/ e+qAOrvQXOqV4+FQBMgBPHFjoDQ2VyXV9iTl3S/76OmQhPYNdo4drxzvK0XWu0qMgA3U KSWa5xxi37gjU+YNjwGq/CdhYBaG+smTv43EkiK4/cSJClCBQYb/TALbkDPoBq0eanl+ RIMjuF9TCGHJuEE95mI7n4Csr7XxzAECbNXxcCzy85O6x0Rl0oKZ88cUHcbEy/fs+499 kSIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ifV3V9huHyD5u8TqmYIPKoWrC3WTwwBCy7SXCckE2ss=; b=MAvf0qLG63EbfM9zwIGrcRTngFeec/ePJeUNcCKZidmPcBlKbqdSGfodwKFGxxDUsA iuEt5NxkB7CY432MluW6GWhj+LhsAnBdolwD6KXPGDTUS2qAA6VOfuGfi+WTSNb8UbzE d8H9MDFwF9cmiVz5LzQPFvExbm5t9roAhYHBZv8O97CirVhnUELg+SjZN9uM7jLEBgMQ ML7rThmiqFCfYCEg4MPQPveJBSp81l9vZJZOdilvUB0Jk3Uf4h7amH/R2KTZoYV6UO4f 2mjpgkVK9J2ZNUvTF+Ok9dUoRsYIxFNzNgw55BoXeH23DC2vkrMNtoy3Jda6ghUVvh2W eHig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=osqhW6Yi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q36si519972pgl.346.2019.02.28.23.41.10; Thu, 28 Feb 2019 23:41:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=osqhW6Yi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732772AbfCAHjO (ORCPT + 99 others); Fri, 1 Mar 2019 02:39:14 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33933 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732707AbfCAHjN (ORCPT ); Fri, 1 Mar 2019 02:39:13 -0500 Received: by mail-pg1-f195.google.com with SMTP id i130so11050321pgd.1 for ; Thu, 28 Feb 2019 23:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ifV3V9huHyD5u8TqmYIPKoWrC3WTwwBCy7SXCckE2ss=; b=osqhW6YiRr3Sz+qMynvqndb8/UtqfH511IuNANtjrelzFFBLgoMa9cDUcvIedYrPSv 11XwcCTMEiul4VCZYpTQzlB3e6lnFq4j15N01JfcopdwHq4IOVfw/qw1uURc4GbzpalF UBSrvjkorlLRWMlN3r2asBps94EyZHtVX4a++RJHT1iSPjC4CdFaMwpRHfI57vBWLrYj e4WU5NRte3y8Ru1DbqQnuWxzuiOKRVNgrxbrqLYliROQrT31MeyRfU7mj/xZZUrkooGR BjMGnkhFKtJ/acxME1oizYa11gfaUaC7BiTb+fWdXUw7wyDltwpt1c7tj2BQSE5NSF4R y4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ifV3V9huHyD5u8TqmYIPKoWrC3WTwwBCy7SXCckE2ss=; b=qGf8MkXwLO/9RuoUcQVCw8/xkl9epTWW49pB4gs68XwdHggrQmkQM19HG5oAn+YABr Qpf2BHgMh4cSY03IWtdkB7GwCxBru4r7hWki+EYVcMDrCpBYCA+YxJJjS3sjh7bB3Wv7 Ud3ZVVv8uCTAVHO4IsV+Wys4ANd6qhey9UyPTRLIwR5tEVRNUxT7DoL8FxtIDY170VP3 3MjzKKEU67Q7WTrdbbTboPe13VpoMrYu0hMQ1EankEk/xEDRIZEmX3V9HmtN27a7vnZ5 gR5VWw990Pc14r4jTQzVqVoyKp7NAkmR3czCQFcyiuxWyDv6OqumtKWN11mIKgBycz4W nvnA== X-Gm-Message-State: APjAAAU3Xiweg0WL3GCuXVBVjjBdIUcD3G4jqmXZTdphLMS5uXXTvYOY 9W1Gz5V3AVSnt9Z6kvYOLvHOX7TlDr4= X-Received: by 2002:a62:1e82:: with SMTP id e124mr4175052pfe.258.1551425953284; Thu, 28 Feb 2019 23:39:13 -0800 (PST) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id c3sm33455385pfg.53.2019.02.28.23.39.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 23:39:12 -0800 (PST) From: Yafang Shao To: vbabka@suse.cz, mhocko@suse.com, jrdr.linux@gmail.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com, Yafang Shao Subject: [PATCH] mm: vmscan: show zone type in kswapd tracepoints Date: Fri, 1 Mar 2019 15:38:54 +0800 Message-Id: <1551425934-28068-1-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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