[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f4299bff-3448-4095-b573-243f1fca834c@lucifer.local>
Date: Mon, 23 Dec 2024 11:10:48 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>,
David Hildenbrand <david@...hat.com>
Cc: "Chen, Zide" <zide.chen@...el.com>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Matthew Wilcox <willy@...radead.org>,
Yi Lai <yi1.lai@...ux.intel.com>
Subject: Re: [PATCH v3] perf: map pages in advance
Peter - could you drop this patch for now until I have a chance to take a
look at this issue on my return on 2nd Jan?
On Fri, Dec 20, 2024 at 10:53:14PM +0100, David Hildenbrand wrote:
> On 20.12.24 22:29, David Hildenbrand wrote:
> > On 20.12.24 20:36, Chen, Zide wrote:
> > >
> > >
> > > On 12/20/2024 1:56 AM, David Hildenbrand wrote:
> > > > On 20.12.24 10:31, Lorenzo Stoakes wrote:
> > > > > On Thu, Dec 19, 2024 at 01:17:44PM -0800, Chen, Zide wrote:
> > > > >
> > > > > > With this patch, it seems perf tool has some problems in capturing the
> > > > > > kernel data with Intel PT.
> > > > > >
> > > > > > Running the following commands, the size of perf.data is very small, and
> > > > > > perf script can't find any valid records.
> > > > > >
> > > > > > perf record -e intel_pt//u -- /bin/ls
> > > > > > perf script --insn-trace
> > > > > >
> > > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I'm on leave (and should really go back to relaxing :>), returning on 2nd
> > > > > Jan so can't really dig into this.
> > > > >
> > > > > But I tried it on my intel box and it 'works on my machine' with and
> > > > > without patch with commands provided, so I'm not sure this is actually a
> > > > > product of this change (which shouldn't impact this).
> > > >
> > > > Zide Chen, can you try with and without this patch to see if it
> > > > introduces the issue?
> > >
> > > Yes, I re-did the test on a SPR server, and the result is same. Without
> > > the patch, it went well; But with it, "perf script --insn-trace" doesn't
> > > show valid records.
> > >
> > > This time I tested it on the clean 6.13-rc1 tag, base commit
> > > 40384c840ea1944d7c5a392e8975ed088ecf0b37
> > >
> > > Also, with this patch, running tools/perf/tests/shell/test_intel_pt.sh:
> > >
> > > Error:
> > > The - data has no samples!
> >
> > I just tested it on 6.13-rc1 vs. 6.13-rc1 with this patch.
> >
> > Indeed, there is quite difference. Below are the main parts that changed, only.
> >
> > We seem to be recording data, but maybe what we record gets corrupted somehow?
>
> Huge parts of the new file are full of 0s. Either we are mapping the wrong
> pages, or reading from the pages (via PFNMAP) does not work as expected.
>
Thanks David, and apologies Zide, appears there is an issue here clearly.
Could you try this with sudo operations? I was doing this locally and I
wonder if there is now a permissioning error?
I'd be surprised if pfn map would cause an issue here as it should just
directly map the kernel memory, however if the PT code assumes there will
be faults there could be an issue. I did take a brief look at this last
week and it seems the PT stuff relies on the aux functionality, so that
could also be a source of problems here.
I am on leave at the moment returning on 2nd Jan, I will look at this as a
priority when I return, as you can see above I've asked Peter to drop this
for now.
Thank you very much for reporting!
And happy holidays to you both :)
> --
> Cheers,
>
> David / dhildenb
>
Cheers, Lorenzo
Powered by blists - more mailing lists