Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-15 Thread Leo Yan
Hi Mathieu, On Fri, Jan 15, 2021 at 03:46:58PM -0700, Mathieu Poirier wrote: > On Mon, Jan 11, 2021 at 12:09:12PM +, Mike Leach wrote: > > Hi Leo, > > > > I think there is an issue here in that your modification assumes that > > all cpus in the system are of the same ETM type. The original

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-15 Thread Mathieu Poirier
On Mon, Jan 11, 2021 at 12:09:12PM +, Mike Leach wrote: > Hi Leo, > > I think there is an issue here in that your modification assumes that > all cpus in the system are of the same ETM type. The original routine > allowed for differing ETM types, thus differing cpu ETM field lengths > between

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-12 Thread Leo Yan
Hi Mike, On Wed, Jan 13, 2021 at 12:00:10AM +, Mike Leach wrote: [...] > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > > index a2a369e2fbb6..edaec57362f0 100644 > > --- a/tools/perf/util/cs-etm.c > > +++ b/tools/perf/util/cs-etm.c > > @@ -2558,12 +2558,19 @@ int

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-12 Thread Mike Leach
Hi Leo, On Mon, 11 Jan 2021 at 15:06, Leo Yan wrote: > > Hi Mike, > > On Mon, Jan 11, 2021 at 12:09:12PM +, Mike Leach wrote: > > Hi Leo, > > > > I think there is an issue here in that your modification assumes that > > all cpus in the system are of the same ETM type. The original routine >

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-11 Thread Leo Yan
Hi Mike, On Mon, Jan 11, 2021 at 12:09:12PM +, Mike Leach wrote: > Hi Leo, > > I think there is an issue here in that your modification assumes that > all cpus in the system are of the same ETM type. The original routine > allowed for differing ETM types, thus differing cpu ETM field lengths

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-11 Thread Mike Leach
Hi Leo, I think there is an issue here in that your modification assumes that all cpus in the system are of the same ETM type. The original routine allowed for differing ETM types, thus differing cpu ETM field lengths between ETMv4 / ETMv3, the field size was used after the relevant magic number

Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-10 Thread Suzuki K Poulose
On 1/9/21 7:44 AM, Leo Yan wrote: The metadata array can be extended over time and the tool, if using the predefined macro (like CS_ETMV4_PRIV_MAX for ETMv4) as metadata array size to copy data, it can cause compatible issue within different versions of perf tool. E.g. we recorded a data file

[PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size

2021-01-08 Thread Leo Yan
The metadata array can be extended over time and the tool, if using the predefined macro (like CS_ETMV4_PRIV_MAX for ETMv4) as metadata array size to copy data, it can cause compatible issue within different versions of perf tool. E.g. we recorded a data file with an old version tool, afterwards