[V3,3/3] perf test: Support the retire_lat check

Message ID 20230202192209.1795329-3-kan.liang@linux.intel.com
State New
Headers
Series [V3,1/3] perf report: Support Retire Latency |

Commit Message

Liang, Kan Feb. 2, 2023, 7:22 p.m. UTC
  From: Kan Liang <kan.liang@linux.intel.com>

Add test for the new field for Retire Latency in the X86 specific test.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---

New patch since V2

 tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Arnaldo Carvalho de Melo Feb. 6, 2023, 3:01 p.m. UTC | #1
Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
> From: Kan Liang <kan.liang@linux.intel.com>
> 
> Add test for the new field for Retire Latency in the X86 specific test.

Is this passing 'perf test' for you?

[root@quaco ~]# perf test -v "x86 sample parsing"
 74: x86 Sample parsing                                              :
--- start ---
test child forked, pid 72526
Samples differ at 'retire_lat'
parsing failed for sample_type 0x1000000
test child finished with -1
---- end ----
x86 Sample parsing: FAILED!
[root@quaco ~]#

- Arnaldo
 
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> ---
> 
> New patch since V2
> 
>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
> index 690c7c07e90d..a061e8619267 100644
> --- a/tools/perf/arch/x86/tests/sample-parsing.c
> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
>  			 const struct perf_sample *s2,
>  			 u64 type)
>  {
> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>  		COMP(ins_lat);
> +		COMP(retire_lat);
> +	}
>  
>  	return true;
>  }
> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
>  	struct perf_sample sample = {
>  		.weight		= 101,
>  		.ins_lat        = 102,
> +		.retire_lat     = 103,
>  	};
>  	struct perf_sample sample_out;
>  	size_t i, sz, bufsz;
> -- 
> 2.35.1
>
  
Liang, Kan Feb. 6, 2023, 3:17 p.m. UTC | #2
On 2023-02-06 10:01 a.m., Arnaldo Carvalho de Melo wrote:
> Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
>> From: Kan Liang <kan.liang@linux.intel.com>
>>
>> Add test for the new field for Retire Latency in the X86 specific test.
> 
> Is this passing 'perf test' for you?

Ah, it should be the original V2 missed the below change.

@@ -100,5 +101,25 @@ void arch_perf_synthesize_sample_weight(const
struct perf_sample *data,
 	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
 		*array &= 0xffffffff;
 		*array |= ((u64)data->ins_lat << 32);
+		*array |= ((u64)data->retire_lat << 48);
 	}
 }

Could you please remove the V2 and re-apply the V3?

$ sudo ./perf test -v "x86 sample parsing"
 74: x86 Sample parsing                                              :
--- start ---
test child forked, pid 3316797
test child finished with 0
---- end ----
x86 Sample parsing: Ok


Thanks,
Kan

> 
> [root@quaco ~]# perf test -v "x86 sample parsing"
>  74: x86 Sample parsing                                              :
> --- start ---
> test child forked, pid 72526
> Samples differ at 'retire_lat'
> parsing failed for sample_type 0x1000000
> test child finished with -1
> ---- end ----
> x86 Sample parsing: FAILED!
> [root@quaco ~]#
> 
> - Arnaldo
>  
>> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
>> ---
>>
>> New patch since V2
>>
>>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
>> index 690c7c07e90d..a061e8619267 100644
>> --- a/tools/perf/arch/x86/tests/sample-parsing.c
>> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
>> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
>>  			 const struct perf_sample *s2,
>>  			 u64 type)
>>  {
>> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
>> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>>  		COMP(ins_lat);
>> +		COMP(retire_lat);
>> +	}
>>  
>>  	return true;
>>  }
>> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
>>  	struct perf_sample sample = {
>>  		.weight		= 101,
>>  		.ins_lat        = 102,
>> +		.retire_lat     = 103,
>>  	};
>>  	struct perf_sample sample_out;
>>  	size_t i, sz, bufsz;
>> -- 
>> 2.35.1
>>
>
  
Arnaldo Carvalho de Melo Feb. 6, 2023, 3:23 p.m. UTC | #3
Em Mon, Feb 06, 2023 at 12:01:44PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
> > From: Kan Liang <kan.liang@linux.intel.com>
> > 
> > Add test for the new field for Retire Latency in the X86 specific test.
> 
> Is this passing 'perf test' for you?
> 
> [root@quaco ~]# perf test -v "x86 sample parsing"
>  74: x86 Sample parsing                                              :
> --- start ---
> test child forked, pid 72526
> Samples differ at 'retire_lat'
> parsing failed for sample_type 0x1000000
> test child finished with -1
> ---- end ----
> x86 Sample parsing: FAILED!
> [root@quaco ~]#

In tools/perf/arch/x86/util/event.c  you have:

void arch_perf_parse_sample_weight(struct perf_sample *data,
                                   const __u64 *array, u64 type)
{
        union perf_sample_weight weight;

        weight.full = *array;
        if (type & PERF_SAMPLE_WEIGHT)
                data->weight = weight.full;
        else {
                data->weight = weight.var1_dw;
                data->ins_lat = weight.var2_w;
                data->retire_lat = weight.var3_w;
        }
}

void arch_perf_synthesize_sample_weight(const struct perf_sample *data,
                                        __u64 *array, u64 type)
{
        *array = data->weight;

        if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
                *array &= 0xffffffff;
                *array |= ((u64)data->ins_lat << 32);
        }
}

didn't you forget to encode data->retire_lat at
arch_perf_synthesize_sample_weight()?

- Arnaldo

> > Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> > ---
> > 
> > New patch since V2
> > 
> >  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
> > index 690c7c07e90d..a061e8619267 100644
> > --- a/tools/perf/arch/x86/tests/sample-parsing.c
> > +++ b/tools/perf/arch/x86/tests/sample-parsing.c
> > @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
> >  			 const struct perf_sample *s2,
> >  			 u64 type)
> >  {
> > -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
> > +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
> >  		COMP(ins_lat);
> > +		COMP(retire_lat);
> > +	}
> >  
> >  	return true;
> >  }
> > @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
> >  	struct perf_sample sample = {
> >  		.weight		= 101,
> >  		.ins_lat        = 102,
> > +		.retire_lat     = 103,
> >  	};
> >  	struct perf_sample sample_out;
> >  	size_t i, sz, bufsz;
> > -- 
> > 2.35.1
> > 
> 
> -- 
> 
> - Arnaldo
  
Arnaldo Carvalho de Melo Feb. 6, 2023, 3:32 p.m. UTC | #4
Em Mon, Feb 06, 2023 at 10:17:46AM -0500, Liang, Kan escreveu:
> 
> 
> On 2023-02-06 10:01 a.m., Arnaldo Carvalho de Melo wrote:
> > Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
> >> From: Kan Liang <kan.liang@linux.intel.com>
> >>
> >> Add test for the new field for Retire Latency in the X86 specific test.
> > 
> > Is this passing 'perf test' for you?
> 
> Ah, it should be the original V2 missed the below change.

Can you please send this as a separate patch as I already merged
torvalds/master and added more csets on top, so to just fix it and
force push now would be bad.

Please use what is in my perf/core branch and add a Fixes for that v2
patch.

Thanks,

- Arnaldo
 
> @@ -100,5 +101,25 @@ void arch_perf_synthesize_sample_weight(const
> struct perf_sample *data,
>  	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>  		*array &= 0xffffffff;
>  		*array |= ((u64)data->ins_lat << 32);
> +		*array |= ((u64)data->retire_lat << 48);
>  	}
>  }
> 
> Could you please remove the V2 and re-apply the V3?
 
> $ sudo ./perf test -v "x86 sample parsing"
>  74: x86 Sample parsing                                              :
> --- start ---
> test child forked, pid 3316797
> test child finished with 0
> ---- end ----
> x86 Sample parsing: Ok
> 
> 
> Thanks,
> Kan
> 
> > 
> > [root@quaco ~]# perf test -v "x86 sample parsing"
> >  74: x86 Sample parsing                                              :
> > --- start ---
> > test child forked, pid 72526
> > Samples differ at 'retire_lat'
> > parsing failed for sample_type 0x1000000
> > test child finished with -1
> > ---- end ----
> > x86 Sample parsing: FAILED!
> > [root@quaco ~]#
> > 
> > - Arnaldo
> >  
> >> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> >> ---
> >>
> >> New patch since V2
> >>
> >>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
> >> index 690c7c07e90d..a061e8619267 100644
> >> --- a/tools/perf/arch/x86/tests/sample-parsing.c
> >> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
> >> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
> >>  			 const struct perf_sample *s2,
> >>  			 u64 type)
> >>  {
> >> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
> >> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
> >>  		COMP(ins_lat);
> >> +		COMP(retire_lat);
> >> +	}
> >>  
> >>  	return true;
> >>  }
> >> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
> >>  	struct perf_sample sample = {
> >>  		.weight		= 101,
> >>  		.ins_lat        = 102,
> >> +		.retire_lat     = 103,
> >>  	};
> >>  	struct perf_sample sample_out;
> >>  	size_t i, sz, bufsz;
> >> -- 
> >> 2.35.1
> >>
> >
  
Arnaldo Carvalho de Melo Feb. 6, 2023, 3:34 p.m. UTC | #5
Em Mon, Feb 06, 2023 at 12:32:54PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Feb 06, 2023 at 10:17:46AM -0500, Liang, Kan escreveu:
> > 
> > 
> > On 2023-02-06 10:01 a.m., Arnaldo Carvalho de Melo wrote:
> > > Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
> > >> From: Kan Liang <kan.liang@linux.intel.com>
> > >>
> > >> Add test for the new field for Retire Latency in the X86 specific test.
> > > 
> > > Is this passing 'perf test' for you?
> > 
> > Ah, it should be the original V2 missed the below change.
> 
> Can you please send this as a separate patch as I already merged
> torvalds/master and added more csets on top, so to just fix it and
> force push now would be bad.
> 
> Please use what is in my perf/core branch and add a Fixes for that v2
> patch.

BTW, the 3rd patch with the test is already on the tmp.perf/core branch,
that will move to perf/core after the next round of container build
tests.

- Arnaldo
 
> Thanks,
> 
> - Arnaldo
>  
> > @@ -100,5 +101,25 @@ void arch_perf_synthesize_sample_weight(const
> > struct perf_sample *data,
> >  	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
> >  		*array &= 0xffffffff;
> >  		*array |= ((u64)data->ins_lat << 32);
> > +		*array |= ((u64)data->retire_lat << 48);
> >  	}
> >  }
> > 
> > Could you please remove the V2 and re-apply the V3?
>  
> > $ sudo ./perf test -v "x86 sample parsing"
> >  74: x86 Sample parsing                                              :
> > --- start ---
> > test child forked, pid 3316797
> > test child finished with 0
> > ---- end ----
> > x86 Sample parsing: Ok
> > 
> > 
> > Thanks,
> > Kan
> > 
> > > 
> > > [root@quaco ~]# perf test -v "x86 sample parsing"
> > >  74: x86 Sample parsing                                              :
> > > --- start ---
> > > test child forked, pid 72526
> > > Samples differ at 'retire_lat'
> > > parsing failed for sample_type 0x1000000
> > > test child finished with -1
> > > ---- end ----
> > > x86 Sample parsing: FAILED!
> > > [root@quaco ~]#
> > > 
> > > - Arnaldo
> > >  
> > >> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> > >> ---
> > >>
> > >> New patch since V2
> > >>
> > >>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
> > >>  1 file changed, 4 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
> > >> index 690c7c07e90d..a061e8619267 100644
> > >> --- a/tools/perf/arch/x86/tests/sample-parsing.c
> > >> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
> > >> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
> > >>  			 const struct perf_sample *s2,
> > >>  			 u64 type)
> > >>  {
> > >> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
> > >> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
> > >>  		COMP(ins_lat);
> > >> +		COMP(retire_lat);
> > >> +	}
> > >>  
> > >>  	return true;
> > >>  }
> > >> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
> > >>  	struct perf_sample sample = {
> > >>  		.weight		= 101,
> > >>  		.ins_lat        = 102,
> > >> +		.retire_lat     = 103,
> > >>  	};
> > >>  	struct perf_sample sample_out;
> > >>  	size_t i, sz, bufsz;
> > >> -- 
> > >> 2.35.1
> > >>
> > > 
> 
> -- 
> 
> - Arnaldo
  
Liang, Kan Feb. 6, 2023, 3:49 p.m. UTC | #6
On 2023-02-06 10:34 a.m., Arnaldo Carvalho de Melo wrote:
> Em Mon, Feb 06, 2023 at 12:32:54PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Mon, Feb 06, 2023 at 10:17:46AM -0500, Liang, Kan escreveu:
>>>
>>>
>>> On 2023-02-06 10:01 a.m., Arnaldo Carvalho de Melo wrote:
>>>> Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
>>>>> From: Kan Liang <kan.liang@linux.intel.com>
>>>>>
>>>>> Add test for the new field for Retire Latency in the X86 specific test.
>>>>
>>>> Is this passing 'perf test' for you?
>>>
>>> Ah, it should be the original V2 missed the below change.
>>
>> Can you please send this as a separate patch as I already merged
>> torvalds/master and added more csets on top, so to just fix it and
>> force push now would be bad.
>>
>> Please use what is in my perf/core branch and add a Fixes for that v2
>> patch.
> 
> BTW, the 3rd patch with the test is already on the tmp.perf/core branch,
> that will move to perf/core after the next round of container build
> tests.
> 

Thanks. I will sent a V4 to fix the 'perf test' issue.

Thanks,
Kan
> - Arnaldo
>  
>> Thanks,
>>
>> - Arnaldo
>>  
>>> @@ -100,5 +101,25 @@ void arch_perf_synthesize_sample_weight(const
>>> struct perf_sample *data,
>>>  	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>>>  		*array &= 0xffffffff;
>>>  		*array |= ((u64)data->ins_lat << 32);
>>> +		*array |= ((u64)data->retire_lat << 48);
>>>  	}
>>>  }
>>>
>>> Could you please remove the V2 and re-apply the V3?
>>  
>>> $ sudo ./perf test -v "x86 sample parsing"
>>>  74: x86 Sample parsing                                              :
>>> --- start ---
>>> test child forked, pid 3316797
>>> test child finished with 0
>>> ---- end ----
>>> x86 Sample parsing: Ok
>>>
>>>
>>> Thanks,
>>> Kan
>>>
>>>>
>>>> [root@quaco ~]# perf test -v "x86 sample parsing"
>>>>  74: x86 Sample parsing                                              :
>>>> --- start ---
>>>> test child forked, pid 72526
>>>> Samples differ at 'retire_lat'
>>>> parsing failed for sample_type 0x1000000
>>>> test child finished with -1
>>>> ---- end ----
>>>> x86 Sample parsing: FAILED!
>>>> [root@quaco ~]#
>>>>
>>>> - Arnaldo
>>>>  
>>>>> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
>>>>> ---
>>>>>
>>>>> New patch since V2
>>>>>
>>>>>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
>>>>> index 690c7c07e90d..a061e8619267 100644
>>>>> --- a/tools/perf/arch/x86/tests/sample-parsing.c
>>>>> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
>>>>> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
>>>>>  			 const struct perf_sample *s2,
>>>>>  			 u64 type)
>>>>>  {
>>>>> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
>>>>> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>>>>>  		COMP(ins_lat);
>>>>> +		COMP(retire_lat);
>>>>> +	}
>>>>>  
>>>>>  	return true;
>>>>>  }
>>>>> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
>>>>>  	struct perf_sample sample = {
>>>>>  		.weight		= 101,
>>>>>  		.ins_lat        = 102,
>>>>> +		.retire_lat     = 103,
>>>>>  	};
>>>>>  	struct perf_sample sample_out;
>>>>>  	size_t i, sz, bufsz;
>>>>> -- 
>>>>> 2.35.1
>>>>>
>>>>
>>
>> -- 
>>
>> - Arnaldo
>
  
Liang, Kan Feb. 6, 2023, 4:25 p.m. UTC | #7
On 2023-02-06 10:49 a.m., Liang, Kan wrote:
> 
> 
> On 2023-02-06 10:34 a.m., Arnaldo Carvalho de Melo wrote:
>> Em Mon, Feb 06, 2023 at 12:32:54PM -0300, Arnaldo Carvalho de Melo escreveu:
>>> Em Mon, Feb 06, 2023 at 10:17:46AM -0500, Liang, Kan escreveu:
>>>>
>>>>
>>>> On 2023-02-06 10:01 a.m., Arnaldo Carvalho de Melo wrote:
>>>>> Em Thu, Feb 02, 2023 at 11:22:09AM -0800, kan.liang@linux.intel.com escreveu:
>>>>>> From: Kan Liang <kan.liang@linux.intel.com>
>>>>>>
>>>>>> Add test for the new field for Retire Latency in the X86 specific test.
>>>>>
>>>>> Is this passing 'perf test' for you?
>>>>
>>>> Ah, it should be the original V2 missed the below change.
>>>
>>> Can you please send this as a separate patch as I already merged
>>> torvalds/master and added more csets on top, so to just fix it and
>>> force push now would be bad.
>>>
>>> Please use what is in my perf/core branch and add a Fixes for that v2
>>> patch.
>>
>> BTW, the 3rd patch with the test is already on the tmp.perf/core branch,
>> that will move to perf/core after the next round of container build
>> tests.
>>
> 
> Thanks. I will sent a V4 to fix the 'perf test' issue.
> 

The V4 is here. It includes a fix for the 'perf test' issue and a fix
for the perf script document.
https://lore.kernel.org/lkml/20230206162100.3329395-1-kan.liang@linux.intel.com/

Sorry again for the inconvenience.

Thanks,
Kan

> Thanks,
> Kan
>> - Arnaldo
>>  
>>> Thanks,
>>>
>>> - Arnaldo
>>>  
>>>> @@ -100,5 +101,25 @@ void arch_perf_synthesize_sample_weight(const
>>>> struct perf_sample *data,
>>>>  	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>>>>  		*array &= 0xffffffff;
>>>>  		*array |= ((u64)data->ins_lat << 32);
>>>> +		*array |= ((u64)data->retire_lat << 48);
>>>>  	}
>>>>  }
>>>>
>>>> Could you please remove the V2 and re-apply the V3?
>>>  
>>>> $ sudo ./perf test -v "x86 sample parsing"
>>>>  74: x86 Sample parsing                                              :
>>>> --- start ---
>>>> test child forked, pid 3316797
>>>> test child finished with 0
>>>> ---- end ----
>>>> x86 Sample parsing: Ok
>>>>
>>>>
>>>> Thanks,
>>>> Kan
>>>>
>>>>>
>>>>> [root@quaco ~]# perf test -v "x86 sample parsing"
>>>>>  74: x86 Sample parsing                                              :
>>>>> --- start ---
>>>>> test child forked, pid 72526
>>>>> Samples differ at 'retire_lat'
>>>>> parsing failed for sample_type 0x1000000
>>>>> test child finished with -1
>>>>> ---- end ----
>>>>> x86 Sample parsing: FAILED!
>>>>> [root@quaco ~]#
>>>>>
>>>>> - Arnaldo
>>>>>  
>>>>>> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
>>>>>> ---
>>>>>>
>>>>>> New patch since V2
>>>>>>
>>>>>>  tools/perf/arch/x86/tests/sample-parsing.c | 5 ++++-
>>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
>>>>>> index 690c7c07e90d..a061e8619267 100644
>>>>>> --- a/tools/perf/arch/x86/tests/sample-parsing.c
>>>>>> +++ b/tools/perf/arch/x86/tests/sample-parsing.c
>>>>>> @@ -27,8 +27,10 @@ static bool samples_same(const struct perf_sample *s1,
>>>>>>  			 const struct perf_sample *s2,
>>>>>>  			 u64 type)
>>>>>>  {
>>>>>> -	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
>>>>>> +	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
>>>>>>  		COMP(ins_lat);
>>>>>> +		COMP(retire_lat);
>>>>>> +	}
>>>>>>  
>>>>>>  	return true;
>>>>>>  }
>>>>>> @@ -48,6 +50,7 @@ static int do_test(u64 sample_type)
>>>>>>  	struct perf_sample sample = {
>>>>>>  		.weight		= 101,
>>>>>>  		.ins_lat        = 102,
>>>>>> +		.retire_lat     = 103,
>>>>>>  	};
>>>>>>  	struct perf_sample sample_out;
>>>>>>  	size_t i, sz, bufsz;
>>>>>> -- 
>>>>>> 2.35.1
>>>>>>
>>>>>
>>>
>>> -- 
>>>
>>> - Arnaldo
>>
  

Patch

diff --git a/tools/perf/arch/x86/tests/sample-parsing.c b/tools/perf/arch/x86/tests/sample-parsing.c
index 690c7c07e90d..a061e8619267 100644
--- a/tools/perf/arch/x86/tests/sample-parsing.c
+++ b/tools/perf/arch/x86/tests/sample-parsing.c
@@ -27,8 +27,10 @@  static bool samples_same(const struct perf_sample *s1,
 			 const struct perf_sample *s2,
 			 u64 type)
 {
-	if (type & PERF_SAMPLE_WEIGHT_STRUCT)
+	if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
 		COMP(ins_lat);
+		COMP(retire_lat);
+	}
 
 	return true;
 }
@@ -48,6 +50,7 @@  static int do_test(u64 sample_type)
 	struct perf_sample sample = {
 		.weight		= 101,
 		.ins_lat        = 102,
+		.retire_lat     = 103,
 	};
 	struct perf_sample sample_out;
 	size_t i, sz, bufsz;