linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xin Hao <xhao@linux.alibaba.com>
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	[thread overview]
Message-ID: <ccf161f17c8e5d39d5d41003a4ec8b1d01c2aa8e.1645024354.git.xhao@linux.alibaba.com> (raw)
In-Reply-To: <cover.1645024354.git.xhao@linux.alibaba.com>

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 <xhao@linux.alibaba.com>
Signed-off-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
---
 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 */
-- 
2.27.0



  parent reply	other threads:[~2022-02-16  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16  8:30 [RFC PATCH V1 0/5] mm/damon: Add NUMA access statistics function support Xin Hao
2022-02-16  8:30 ` [RFC PATCH V1 1/5] mm/damon: Add NUMA local and remote variables in 'damon_region' Xin Hao
2022-02-16  8:30 ` [RFC PATCH V1 2/5] mm/damon: Add 'damon_region' NUMA fault simulation support Xin Hao
2022-02-16  8:30 ` [RFC PATCH V1 3/5] mm/damon: Add 'damon_region' NUMA access statistics core implementation Xin Hao
2022-02-16  8:30 ` [RFC PATCH V1 4/5] mm/damon/dbgfs: Add numa simulate switch Xin Hao
2022-02-16  8:30 ` Xin Hao [this message]
2022-02-17  8:29 ` [RFC PATCH V1 0/5] mm/damon: Add NUMA access statistics function support SeongJae Park
2022-02-18  2:21   ` Xin Hao
2022-02-18  8:03     ` SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccf161f17c8e5d39d5d41003a4ec8b1d01c2aa8e.1645024354.git.xhao@linux.alibaba.com \
    --to=xhao@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rongwei.wang@linux.alibaba.com \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).