linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/damon: trace: print address range in hex
@ 2024-12-30 13:42 Akinobu Mita
  2024-12-30 13:42 ` [PATCH damo] _damo_records: support address range in hex format Akinobu Mita
  2024-12-30 18:28 ` [PATCH] mm/damon: trace: print address range in hex SeongJae Park
  0 siblings, 2 replies; 7+ messages in thread
From: Akinobu Mita @ 2024-12-30 13:42 UTC (permalink / raw)
  To: damon; +Cc: linux-mm, akinobu.mita, SeongJae Park

Currently, the address ranges are displayed in decimal format in
tracepoints for DAMON, but hexadecimal format is easier to compare with
address ranges in /proc/<pid>/numa_maps.

Existing tools such as damo need to be able to handle changing the format
of address ranges, so display address ranges in hexadecimal with a "0x"
prefix.

Cc: SeongJae Park <sj@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 include/trace/events/damon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h
index da4bd9fd1162..8df59ef18660 100644
--- a/include/trace/events/damon.h
+++ b/include/trace/events/damon.h
@@ -41,7 +41,7 @@ TRACE_EVENT_CONDITION(damos_before_apply,
 		__entry->nr_regions = nr_regions;
 	),
 
-	TP_printk("ctx_idx=%u scheme_idx=%u target_idx=%lu nr_regions=%u %lu-%lu: %u %u",
+	TP_printk("ctx_idx=%u scheme_idx=%u target_idx=%lu nr_regions=%u 0x%lx-0x%lx: %u %u",
 			__entry->context_idx, __entry->scheme_idx,
 			__entry->target_idx, __entry->nr_regions,
 			__entry->start, __entry->end,
@@ -73,7 +73,7 @@ TRACE_EVENT(damon_aggregated,
 		__entry->age = r->age;
 	),
 
-	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u",
+	TP_printk("target_id=%lu nr_regions=%u 0x%lx-0x%lx: %u %u",
 			__entry->target_id, __entry->nr_regions,
 			__entry->start, __entry->end,
 			__entry->nr_accesses, __entry->age)
-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-01 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-30 13:42 [PATCH] mm/damon: trace: print address range in hex Akinobu Mita
2024-12-30 13:42 ` [PATCH damo] _damo_records: support address range in hex format Akinobu Mita
2024-12-30 18:35   ` SeongJae Park
2024-12-30 18:28 ` [PATCH] mm/damon: trace: print address range in hex SeongJae Park
2024-12-30 18:39   ` SeongJae Park
2024-12-31 12:56     ` Akinobu Mita
2025-01-01 17:43       ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox