Message ID | 20230202192209.1795329-3-kan.liang@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp435399wrn; Thu, 2 Feb 2023 11:43:29 -0800 (PST) X-Google-Smtp-Source: AK7set+EP/6bsc8Gz20bc8GyrxVffVZpf63Sq6c/6TxTeuDhqB3Ih/qUm1PSmLwdmV9w5JfWjZ4Q X-Received: by 2002:a17:90a:1b:b0:229:6b20:2424 with SMTP id 27-20020a17090a001b00b002296b202424mr2798736pja.11.1675367009134; Thu, 02 Feb 2023 11:43:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675367009; cv=none; d=google.com; s=arc-20160816; b=Qu/mWM64Hgc7BAnnLv4DUy4dBOHRrDvoo/VO+xoqDj+MPbdTRyZwXeGV7B/gXyCB7E EibjBacGJ+/p96ErTaENUT5aGUU+GMZ8aG0P/FUR/IRrnHMSKvvfuYtLFwYWR7Qtme1Y 3uhGoup2Q9eloMl1YujzsUcO8zVfVHyd5izx/u0hzFy5ObOdCkJQaBmumaFKGSEfRISh s/KleyXTuQvotmw0FCtwvnvt/LjHEy3cc3PgcjqXYygU/GpOuJ5ZK8vxJztAWojQQ7RF E/WOlDZ2KMlFkEbcr1ypIQg1eGHdHYURk/H2HK2PDT1SkQawfmpCjF5pNjimLjXd9GjX guVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=akoZIe/8G4LW06a6wdCffpcDww/AhLeajnse601TWcI=; b=EqDI+yUdlkaUnVgNhFO38GyfuZ5D7ZSkDlZVgB1InW7On5KLwlR8jZvh4/hd9bD4hU n/6N3h+fd1XxPataW5KklWChOwvz4Nf6IFsKCAqn9StaweqLNIvURQPPu6tTuRUZBs3O VaJAe1wGmESxV+TXafw2jcVcSsTbNmyWTMVFgP5weeXm9Imsh4yoBgNvE5pq2cFm4UCb vhhJmwEHtNRd3MahHpYoJl8/lxn7yIr2lX9hZSAjfJiknhqfUW3AW/pION7ZcJvIvA/P lb/d3jbuIlL2G54O8yybxEZ2Nw5/atfpjIsccPfpN5PCRJW8wquMj5qqoCHTv1WjjuEg taOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZoiXQgG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m25-20020a637119000000b004f143cb44a4si363395pgc.665.2023.02.02.11.43.16; Thu, 02 Feb 2023 11:43:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZoiXQgG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233202AbjBBTWe (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Thu, 2 Feb 2023 14:22:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233186AbjBBTW3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Feb 2023 14:22:29 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2865D6CC81 for <linux-kernel@vger.kernel.org>; Thu, 2 Feb 2023 11:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675365748; x=1706901748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lPyKGu2uUaNniUnGihB+wDhMHYuNOTEsrZFp5sO3W68=; b=ZoiXQgG78h1udkZcJWv1tRYFXRrLCXVPu3AeOUpu3SW5LVulgxZBvdgn 20xkrDcpjb8uI0hpXZ0dyNbmzGrYIq2RqddsqqywXcAAbWsGCpkMmFJ8K 5yERQB7QW0W4hAUXGT20kbL0ZTyGYs9pQ8clbU0+UAqd5YfxiF2NKF9Ma 6LFXDcKO/4JRrvVla7bz0Dbcm+yNXeJNIwnXm8Ohz6ByrPBqKnuSrOB77 m9LTHGtjAwOqjMFvLzOZMRzmoMAqj16bUjk/zawDQU83MntLnjqQ4SIDp iips7ZVzTkhW3aUfiS+ZZxxW3/DmaHNNv+ixmW17wPx3zPrS4Eot1RKrZ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="312194503" X-IronPort-AV: E=Sophos;i="5.97,268,1669104000"; d="scan'208";a="312194503" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 11:22:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="697793110" X-IronPort-AV: E=Sophos;i="5.97,268,1669104000"; d="scan'208";a="697793110" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2023 11:22:13 -0800 From: kan.liang@linux.intel.com To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, irogers@google.com, Kan Liang <kan.liang@linux.intel.com> Subject: [PATCH V3 3/3] perf test: Support the retire_lat check Date: Thu, 2 Feb 2023 11:22:09 -0800 Message-Id: <20230202192209.1795329-3-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230202192209.1795329-1-kan.liang@linux.intel.com> References: <20230202192209.1795329-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756749636717157401?= X-GMAIL-MSGID: =?utf-8?q?1756749636717157401?= |
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
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 >
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 >> >
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
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 > >> > >
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
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 >
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 >>
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;