linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: SeongJae Park <sj@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH] mm/damon: trace: print address range in hex
Date: Mon, 30 Dec 2024 10:28:13 -0800	[thread overview]
Message-ID: <20241230182813.14349-1-sj@kernel.org> (raw)
In-Reply-To: <20241230134221.166041-1-akinobu.mita@gmail.com>

Hello Akinobu,

On Mon, 30 Dec 2024 22:42:20 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote:

> 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.

I agree that it could be easier for the use case.  But, I think writing and
using a script converting formats for DAMON tracepoint output or numa_maps
could also be a way to resolve the issue.  Do you have any problem at using
such solution?

> 
> Existing tools such as damo need to be able to handle changing the format
> of address ranges,

Thank you for taking care of damo, too!

> so display address ranges in hexadecimal with a "0x"
> prefix.

This is a user-visible behavioral change.  I understand it is an improvement
for your use case, but could be a degradation for some use cases.  Also the
change could confuse or break old use cases.  I understand that 'damo' users
will not get such problems thanks to your work, but not every DAMON users use
'damo'.

So I'd like to add this change only if there is some critical issue or benefit
that we cannot fix or achieve without this change.  As of now, I don't see such
things since I think you could use some user-space tools for your use case.
Please let me know if there is something that I'm missing.


Thanks,
SJ

> 
> 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


  parent reply	other threads:[~2024-12-30 18:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:35   ` SeongJae Park
2024-12-30 18:28 ` SeongJae Park [this message]
2024-12-30 18:39   ` [PATCH] mm/damon: trace: print address range in hex SeongJae Park
2024-12-31 12:56     ` Akinobu Mita
2025-01-01 17:43       ` 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=20241230182813.14349-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akinobu.mita@gmail.com \
    --cc=damon@lists.linux.dev \
    --cc=linux-mm@kvack.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