From patchwork Wed Feb 16 08:30:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: haoxin X-Patchwork-Id: 12748185 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF37DC433F5 for ; Wed, 16 Feb 2022 08:30:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 542806B007E; Wed, 16 Feb 2022 03:30:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44F0C6B0080; Wed, 16 Feb 2022 03:30:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22D9C6B0081; Wed, 16 Feb 2022 03:30:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id EA34C6B007E for ; Wed, 16 Feb 2022 03:30:53 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AA5A0181AC9C6 for ; Wed, 16 Feb 2022 08:30:53 +0000 (UTC) X-FDA: 79147972386.14.C97CE6A Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by imf20.hostedemail.com (Postfix) with ESMTP id 5B3521C0008 for ; Wed, 16 Feb 2022 08:30:51 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0V4cXjzP_1645000248; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0V4cXjzP_1645000248) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Feb 2022 16:30:49 +0800 From: Xin Hao To: sj@kernel.org Cc: xhao@linux.alibaba.com, rongwei.wang@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH V1 5/5] mm/damon/tracepoint: Add 'damon_region' NUMA access statistics support Date: Wed, 16 Feb 2022 16:30:41 +0800 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 5B3521C0008 X-Stat-Signature: y6cmjqwuynwormrtk39ekhpkahpmfhip X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf20.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.45 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com X-HE-Tag: 1645000251-355469 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: This patch is used to support 'damon_region' NUMA access for tracepoint, The purpose of this is to facilitate users to obtain the numa access status of 'damon_region' through perf or damo tools. Signed-off-by: Xin Hao Signed-off-by: Rongwei Wang --- include/trace/events/damon.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h index c79f1d4c39af..687b7aba751e 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -23,6 +23,8 @@ TRACE_EVENT(damon_aggregated, __field(unsigned long, end) __field(unsigned int, nr_accesses) __field(unsigned int, age) + __field(unsigned long, local) + __field(unsigned long, remote) ), TP_fast_assign( @@ -32,12 +34,15 @@ TRACE_EVENT(damon_aggregated, __entry->end = r->ar.end; __entry->nr_accesses = r->nr_accesses; __entry->age = r->age; + __entry->local = r->local; + __entry->remote = r->remote; ), - TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u", + TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u %lu %lu", __entry->target_id, __entry->nr_regions, __entry->start, __entry->end, - __entry->nr_accesses, __entry->age) + __entry->nr_accesses, __entry->age, + __entry->local, __entry->remote) ); #endif /* _TRACE_DAMON_H */