[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200914202947.GV1714160@krava>
Date: Mon, 14 Sep 2020 22:29:47 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
Song Liu <songliubraving@...com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Ian Rogers <irogers@...gle.com>,
Stephane Eranian <eranian@...gle.com>,
Alexey Budankov <alexey.budankov@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH 14/26] perf tools: Add mmap3 events to --show-mmap-events
option
On Mon, Sep 14, 2020 at 03:30:53PM +0900, Namhyung Kim wrote:
> On Mon, Sep 14, 2020 at 6:04 AM Jiri Olsa <jolsa@...nel.org> wrote:
> >
> > Displaying mmap3 events for --show-mmap-events option,
> > the build id is displayed within <> braces:
> >
> > $ perf script --show-mmap-events
> > kill 12148 13893.519014: PERF_RECORD_MMAP3 12148/12148: <43938d0803c5e3130ea679cd569aaf44b98d9ae8> [0x560e7d7f..
> > kill 12148 13893.519420: PERF_RECORD_MMAP3 12148/12148: <1805c738c8f3ec0f47b7ea09080c28f34d18a82b> [0x7f9e7dfc..
> >
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> > ---
> > tools/perf/builtin-script.c | 33 +++++++++++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> > index d839983cfb88..9c09581d5cb0 100644
> > --- a/tools/perf/builtin-script.c
> > +++ b/tools/perf/builtin-script.c
> > @@ -2342,6 +2342,38 @@ static int process_mmap2_event(struct perf_tool *tool,
> > event->mmap2.tid);
> > }
> >
> > +static int process_mmap3_event(struct perf_tool *tool,
> > + union perf_event *event,
> > + struct perf_sample *sample,
> > + struct machine *machine)
> > +{
> > + struct thread *thread;
> > + struct perf_script *script = container_of(tool, struct perf_script, tool);
> > + struct perf_session *session = script->session;
> > + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id);
> > +
> > + if (perf_event__process_mmap3(tool, event, sample, machine) < 0)
> > + return -1;
> > +
> > + thread = machine__findnew_thread(machine, event->mmap3.pid, event->mmap3.tid);
> > + if (thread == NULL) {
> > + pr_debug("problem processing MMAP2 event, skipping it.\n");
>
> MMAP3 ?
yes, thanks,
jirka
Powered by blists - more mailing lists