From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: "Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
"Jiri Olsa" <jolsa@kernel.org>, "Ian Rogers" <irogers@google.com>,
"Greg KH" <gregkh@linuxfoundation.org>,
"Andrii Nakryiko" <andrii@kernel.org>,
linux-fsdevel@vger.kernel.org, brauner@kernel.org,
viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
linux-mm@kvack.org, "Daniel Müller" <deso@posteo.net>,
"linux-perf-use." <linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH 2/5] fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps
Date: Mon, 6 May 2024 16:16:03 -0300 [thread overview]
Message-ID: <Zjksc3yqvkocS18M@x1> (raw)
In-Reply-To: <ZjknNJSFcKaxGDS4@x1>
On Mon, May 06, 2024 at 03:53:40PM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, May 06, 2024 at 11:05:17AM -0700, Namhyung Kim wrote:
> > On Mon, May 6, 2024 at 6:58 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > On Sat, May 04, 2024 at 02:50:31PM -0700, Andrii Nakryiko wrote:
> > > > On Sat, May 4, 2024 at 8:28 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > On Fri, May 03, 2024 at 05:30:03PM -0700, Andrii Nakryiko wrote:
> > > > > > Note also, that fetching VMA name (e.g., backing file path, or special
> > > > > > hard-coded or user-provided names) is optional just like build ID. If
> > > > > > user sets vma_name_size to zero, kernel code won't attempt to retrieve
> > > > > > it, saving resources.
>
> > > > > > Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
>
> > > > > Where is the userspace code that uses this new api you have created?
>
> > > > So I added a faithful comparison of existing /proc/<pid>/maps vs new
> > > > ioctl() API to solve a common problem (as described above) in patch
> > > > #5. The plan is to put it in mentioned blazesym library at the very
> > > > least.
> > > >
> > > > I'm sure perf would benefit from this as well (cc'ed Arnaldo and
> > > > linux-perf-user), as they need to do stack symbolization as well.
>
> > I think the general use case in perf is different. This ioctl API is great
> > for live tracing of a single (or a small number of) process(es). And
> > yes, perf tools have those tracing use cases too. But I think the
> > major use case of perf tools is system-wide profiling.
>
> > For system-wide profiling, you need to process samples of many
> > different processes at a high frequency. Now perf record doesn't
> > process them and just save it for offline processing (well, it does
> > at the end to find out build-ID but it can be omitted).
>
> Since:
>
> Author: Jiri Olsa <jolsa@kernel.org>
> Date: Mon Dec 14 11:54:49 2020 +0100
> 1ca6e80254141d26 ("perf tools: Store build id when available in PERF_RECORD_MMAP2 metadata events")
>
> We don't need to to process the events to find the build ids. I haven't
> checked if we still do it to find out which DSOs had hits, but we
> shouldn't need to do it for build-ids (unless they were not in memory
> when the kernel tried to stash them in the PERF_RECORD_MMAP2, which I
> haven't checked but IIRC is a possibility if that ELF part isn't in
> memory at the time we want to copy it).
> If we're still traversing it like that I guess we can have a knob and
> make it the default to not do that and instead create the perf.data
> build ID header table with all the build-ids we got from
> PERF_RECORD_MMAP2, a (slightly) bigger perf.data file but no event
> processing at the end of a 'perf record' session.
But then we don't process the PERF_RECORD_MMAP2 in 'perf record', it
just goes on directly to the perf.data file :-\
Humm, perhaps the sideband thread...
- Arnaldo
next prev parent reply other threads:[~2024-05-06 19:16 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-04 0:30 [PATCH 0/5] ioctl()-based API to query VMAs from /proc/<pid>/maps Andrii Nakryiko
2024-05-04 0:30 ` [PATCH 1/5] fs/procfs: extract logic for getting VMA name constituents Andrii Nakryiko
2024-05-04 0:30 ` [PATCH 2/5] fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps Andrii Nakryiko
2024-05-04 15:28 ` Greg KH
2024-05-04 21:50 ` Andrii Nakryiko
2024-05-06 13:58 ` Arnaldo Carvalho de Melo
2024-05-06 18:05 ` Namhyung Kim
2024-05-06 18:51 ` Andrii Nakryiko
2024-05-06 18:53 ` Arnaldo Carvalho de Melo
2024-05-06 19:16 ` Arnaldo Carvalho de Melo [this message]
2024-05-07 21:55 ` Namhyung Kim
2024-05-06 18:41 ` Andrii Nakryiko
2024-05-06 20:35 ` Arnaldo Carvalho de Melo
2024-05-07 16:36 ` Andrii Nakryiko
2024-05-04 23:36 ` kernel test robot
2024-05-07 18:10 ` Liam R. Howlett
2024-05-07 18:52 ` Andrii Nakryiko
2024-05-04 0:30 ` [PATCH 3/5] tools: sync uapi/linux/fs.h header into tools subdir Andrii Nakryiko
2024-05-04 0:30 ` [PATCH 4/5] selftests/bpf: make use of PROCFS_PROCMAP_QUERY ioctl, if available Andrii Nakryiko
2024-05-04 0:30 ` [PATCH 5/5] selftests/bpf: a simple benchmark tool for /proc/<pid>/maps APIs Andrii Nakryiko
2024-05-04 15:29 ` Greg KH
2024-05-04 21:57 ` Andrii Nakryiko
2024-05-05 5:09 ` Ian Rogers
2024-05-06 18:32 ` Andrii Nakryiko
2024-05-06 18:43 ` Ian Rogers
2024-05-07 5:06 ` Andrii Nakryiko
2024-05-07 17:29 ` Andrii Nakryiko
2024-05-07 22:27 ` Namhyung Kim
2024-05-07 22:56 ` Andrii Nakryiko
2024-05-08 0:36 ` Arnaldo Carvalho de Melo
2024-05-04 15:32 ` Greg KH
2024-05-04 22:13 ` Andrii Nakryiko
2024-05-07 15:48 ` Liam R. Howlett
2024-05-07 16:10 ` Matthew Wilcox
2024-05-07 16:18 ` Liam R. Howlett
2024-05-07 16:27 ` Andrii Nakryiko
2024-05-07 18:06 ` Liam R. Howlett
2024-05-07 19:00 ` Andrii Nakryiko
2024-05-08 1:20 ` Liam R. Howlett
2024-05-04 11:24 ` [PATCH 0/5] ioctl()-based API to query VMAs from /proc/<pid>/maps Christian Brauner
2024-05-04 15:33 ` Greg KH
2024-05-04 21:50 ` Andrii Nakryiko
2024-05-04 21:50 ` Andrii Nakryiko
2024-05-05 5:26 ` Ian Rogers
2024-05-06 18:58 ` Andrii Nakryiko
-- strict thread matches above, loose matches on Subject: below --
2024-05-04 18:37 [PATCH 2/5] fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps Alexey Dobriyan
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=Zjksc3yqvkocS18M@x1 \
--to=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=deso@posteo.net \
--cc=gregkh@linuxfoundation.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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.