From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Leo Yan <leo.yan@linaro.org>, Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [BUG] perf kmem: Broken because of missing tracepoints
Date: Fri, 6 Jan 2023 18:34:32 +0530 [thread overview]
Message-ID: <c4c5c3cb-f1a8-84ee-0dc8-8be0d63c820d@amd.com> (raw)
In-Reply-To: <Y7ewMG+0YKp9pgud@leoy-yangtze.lan>
On 06-Jan-23 10:52 AM, Leo Yan wrote:
> Hi Ravi, Arnaldo,
>
> On Thu, Jan 05, 2023 at 01:27:30PM -0300, Arnaldo Carvalho de Melo wrote:
>> Em Thu, Jan 05, 2023 at 07:03:25PM +0530, Ravi Bangoria escreveu:
>>> Hello,
>>>
>>> Two tracepoints, kmem:kmalloc_node and kmem:kmem_cache_alloc_node used by perf-
>>> kmem tool were removed from kernel by commit 11e9734bcb6a7 ("mm/slab_common:
>>> unify NUMA and UMA version of tracepoints"). This causes issue while running
>>> perf kmem on latest kernel:
>>>
>>> $ sudo ./perf kmem record
>>> event syntax error: 'kmem:kmalloc_node'
>>> \___ unknown tracepoint
>>>
>>> $ sudo ./perf kmem record
>>> event syntax error: 'kmem:kmem_cache_alloc_node'
>>> \___ unknown tracepoint
>>>
>>> Haven't got a chance to debug further. Anyone aware of this?
>>
>> I didn't notice this so far, would be good to have a fix soon.
>
> I looked a bit for the issue, so wrote a fix and verified on my
> Arm64 machine. Please let me know if this works for you or not,
> thanks!
>
> From b7d26f5543401924ae4ad93daeba66cd7d58eb39 Mon Sep 17 00:00:00 2001
> From: Leo Yan <leo.yan@linaro.org>
> Date: Fri, 6 Jan 2023 11:16:27 +0800
> Subject: [PATCH] perf kmem: Fix tracepoints breakage
>
> Commit 11e9734bcb6a ("mm/slab_common: unify NUMA and UMA version of
> tracepoints") removed tracepoints 'kmalloc_node' and
> 'kmem_cache_alloc_node'; the tracepoints 'kmalloc'
> and 'kmem_cache_alloc' add an extra field 'node' to present the
> memory node to be allocated and replace the two removed tracepoints
> respectively.
>
> The commit introduces ABI breakage, both for the dropped tracepoints and
> for the updated tracepoints.
>
> To fix this issue, perf tool removes the support for the tracepoints
> 'kmalloc_node' and 'kmem_cache_alloc_node'; for the two updated
> tracepoints this patch reads out the new field 'node', if its value is
> NUMA_NO_NODE (-1), we doesn't take it as a cross memory allocation.
>
> Reported-by: Ravi Bangoria <ravi.bangoria@amd.com>
> Fixes: 11e9734bcb6a ("mm/slab_common: unify NUMA and UMA version of tracepoints")
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
Thanks Leo. A quick test shows it fixes the issue.
Tested-by: Ravi Bangoria <ravi.bangoria@amd.com>
Thanks,
Ravi
next prev parent reply other threads:[~2023-01-06 13:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 13:33 [BUG] perf kmem: Broken because of missing tracepoints Ravi Bangoria
2023-01-05 16:27 ` Arnaldo Carvalho de Melo
2023-01-06 5:22 ` Leo Yan
2023-01-06 13:04 ` Ravi Bangoria [this message]
2023-01-06 17:27 ` Arnaldo Carvalho de Melo
2023-01-06 17:44 ` Arnaldo Carvalho de Melo
2023-01-07 4:13 ` Leo Yan
2023-01-07 18:41 ` Vlastimil Babka
2023-01-08 6:30 ` Leo Yan
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=c4c5c3cb-f1a8-84ee-0dc8-8be0d63c820d@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--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 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).