Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-16 Thread James Clark
On 15/04/2021 22:54, Mathieu Poirier wrote: > On Wed, Apr 14, 2021 at 05:39:19PM +0300, James Clark wrote: >> The following attribute is set when synthesising samples in >> timed decoding mode: >> >> attr.sample_type |= PERF_SAMPLE_TIME; >> >> This results in new samples that appear to have

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-16 Thread James Clark
On 15/04/2021 17:33, Leo Yan wrote: > Hi James, > > On Thu, Apr 15, 2021 at 03:51:46PM +0300, James Clark wrote: > > [...] > >>> For the orignal perf data file with "--per-thread" option, the decoder >>> runs into the condition for "etm->timeless_decoding"; and it doesn't >>> contain ETM

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-15 Thread Mathieu Poirier
On Wed, Apr 14, 2021 at 05:39:19PM +0300, James Clark wrote: > The following attribute is set when synthesising samples in > timed decoding mode: > > attr.sample_type |= PERF_SAMPLE_TIME; > > This results in new samples that appear to have timestamps but > because we don't assign any

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-15 Thread Leo Yan
Hi James, On Thu, Apr 15, 2021 at 03:51:46PM +0300, James Clark wrote: [...] > > For the orignal perf data file with "--per-thread" option, the decoder > > runs into the condition for "etm->timeless_decoding"; and it doesn't > > contain ETM timestamp. > > > > Afterwards, the injected perf data

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-15 Thread James Clark
On 15/04/2021 15:39, Leo Yan wrote: > On Wed, Apr 14, 2021 at 05:41:46PM +0300, James Clark wrote: >> Hi, >> >> For this change, I also tried removing the setting of PERF_SAMPLE_TIME in >> cs_etm__synth_events(). In theory, this would remove the sorting when >> opening the file, but the

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-15 Thread Leo Yan
On Wed, Apr 14, 2021 at 05:41:46PM +0300, James Clark wrote: > Hi, > > For this change, I also tried removing the setting of PERF_SAMPLE_TIME in > cs_etm__synth_events(). In theory, this would remove the sorting when opening > the file, but the change doesn't affect when the built-in events are

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-15 Thread Leo Yan
Hi James, On Wed, Apr 14, 2021 at 05:39:19PM +0300, James Clark wrote: > The following attribute is set when synthesising samples in > timed decoding mode: > > attr.sample_type |= PERF_SAMPLE_TIME; > > This results in new samples that appear to have timestamps but > because we don't assign

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-14 Thread Suzuki K Poulose
On 14/04/2021 15:39, James Clark wrote: The following attribute is set when synthesising samples in timed decoding mode: attr.sample_type |= PERF_SAMPLE_TIME; This results in new samples that appear to have timestamps but because we don't assign any timestamps to the samples, when the

Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-14 Thread James Clark
Hi, For this change, I also tried removing the setting of PERF_SAMPLE_TIME in cs_etm__synth_events(). In theory, this would remove the sorting when opening the file, but the change doesn't affect when the built-in events are saved to the inject file. Resulting in events like MMAP and COMM with