From: SeongJae Park <sj@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Akinobu Mita <akinobu.mita@gmail.com>,
damon@lists.linux.dev, linux-perf-users@vger.kernel.org
Subject: Re: [RFC PATCH v3 0/4] mm/damon: introduce perf event based access check
Date: Wed, 29 Apr 2026 07:34:34 -0700 [thread overview]
Message-ID: <20260429143437.94020-1-sj@kernel.org> (raw)
In-Reply-To: <afG6sg3juuJrDEbO@z2>
On Wed, 29 Apr 2026 01:00:50 -0700 Namhyung Kim <namhyung@kernel.org> wrote:
> Hello,
>
> On Sat, Apr 25, 2026 at 09:33:07PM +0900, Akinobu Mita wrote:
> > 2026年4月25日(土) 8:31 SeongJae Park <sj@kernel.org>:
[...]
> > import perf
> >
> > if __name__ == '__main__':
> > evlist = perf.parse_events("mem-loads")
> > for evsel in evlist:
> > print(f"{evsel}: type={evsel.type} config={evsel.config}")
>
> It'd be great if we could have something like this. Currently we have
> libperf (in C) in tools/lib/perf but it doesn't have the parser yet.
>
> Anyway there are vendor-contributed event/metric description in JSON
> under tools/perf/pmu-events/arch directory. You may extract the event
> encoding from the JSON and convert it using the sysfs format info.
>
> On Alderlake, the 'mem_trans_retired.load_latency_gt_1024' is defined
> like below:
>
> tools/perf/pmu-events/arch/x86/alderlake/memory.json +128
>
> {
> "BriefDescription": "Counts randomly selected loads when the latency from first dispatch to completion is greater than 1024 cycles.",
> "Counter": "1,2,3,4,5,6,7",
> "Data_LA": "1",
> "EventCode": "0xcd",
> "EventName": "MEM_TRANS_RETIRED.LOAD_LATENCY_GT_1024",
> "MSRIndex": "0x3F6",
> "MSRValue": "0x400",
> "PublicDescription": "Counts randomly selected loads when the latency from first dispatch to completion is greater than 1024 cycles. Reported latency may be longer than just the memory latency.",
> "SampleAfterValue": "53",
> "UMask": "0x1",
> "Unit": "cpu_core"
> },
>
> I think MSRValue is for attr.config1.
Oh great. Thank you for kindly sharing this Namhyung! This makes me feel perf
event based DAMON monitoring even more promising!
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-04-29 14:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 0:42 [RFC PATCH v3 0/4] mm/damon: introduce perf event based access check Akinobu Mita
2026-04-23 0:42 ` [RFC PATCH v3 1/4] mm/damon/core: add code borrowed from report-based monitoring work Akinobu Mita
2026-04-23 1:21 ` sashiko-bot
2026-04-23 0:42 ` [RFC PATCH v3 2/4] mm/damon/core: add common code for perf event based access check Akinobu Mita
2026-04-23 1:58 ` sashiko-bot
2026-04-23 0:42 ` [RFC PATCH v3 3/4] mm/damon/vaddr: support " Akinobu Mita
2026-04-23 2:48 ` sashiko-bot
2026-04-23 0:42 ` [RFC PATCH v3 4/4] mm/damon/paddr: " Akinobu Mita
2026-04-23 3:22 ` sashiko-bot
2026-04-23 4:34 ` [RFC PATCH v3 0/4] mm/damon: introduce " SeongJae Park
2026-04-24 3:27 ` Akinobu Mita
2026-04-24 23:31 ` SeongJae Park
2026-04-25 12:33 ` Akinobu Mita
2026-04-25 15:33 ` SeongJae Park
2026-04-29 8:00 ` Namhyung Kim
2026-04-29 14:34 ` SeongJae Park [this message]
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=20260429143437.94020-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=damon@lists.linux.dev \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.