Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1478649pxb; Thu, 4 Mar 2021 12:22:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR1XtDZTv80VaMpjvCcxPNaNknIR7jaEwJWgFK3Ib43LG/gWaFQBlwMw3BTRimIbOuJWG+ X-Received: by 2002:a17:907:3e9e:: with SMTP id hs30mr6384015ejc.66.1614889360740; Thu, 04 Mar 2021 12:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614889360; cv=none; d=google.com; s=arc-20160816; b=Sj6imB9iQ5nn5OMOsi2MoAL+k6eZYqPXTq2y1b9HGqhlfbFwwWz3Be1KvZ1KJF0Kui DY7uaeUqEIOye9qugsHTlG9ZHVmC8Qbhf+L3hAGnNFc4WJGepoHVodwBNw7WNKgDmdAq +mlHBASlT4GEoCm+BouIJhFCffw519UkHxMUc4aefBCQntfCeVWhakyjTxe+nh0g1aI9 GPfijMjoov9uQojKQG6RgVyb9K7f6MypJALiu6oKMEOUafDyLa6W+cNn6gCNwz9aN4Pt zAnEnxe6cSn46eayEU6bSlEhT4iYOVSNQ2v5bBExMxjCIv+oURnJC+XzUHbyfsr4R3vd WXNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=RyXQ0YOdKDKWImHbiOYlbyjVggy7D3qEGh0Behjax+E=; b=CRnWZO1XenXFPpnAQkFZYuRZdsQctLnt3ufb1no4Mp9oADYyeRsYNXHJUjkP9BsNfT zl7xxHpaZ0KeGwnPK+pVXSA9GPHQRR9rTJj5x/Zqyxu6LBQoXBNHlxZOZWItwq3H4dKs EjOoXNdk7uXiDjCV2OT4I0kV1ujOckLiZBpncLIn14Rx6q0/hAhOzZ0B+5EAYINBc1Hh P4VWG7qcpiBj8b+miIfUiAC2nEIq6a3uzFamei3hFnfbaLz39B5H4X2aaDeMH6vbiaIA MQ9ut2o8IqJf62ab0WUPfcE0GsoAFGlWKyojAp4ktxp69ot+2pe9pQVHRRYV2ThtiY19 IKEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=l9fs4po1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si145689ejs.315.2021.03.04.12.22.17; Thu, 04 Mar 2021 12:22:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=l9fs4po1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1577201AbhCBScL (ORCPT + 99 others); Tue, 2 Mar 2021 13:32:11 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54412 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1575719AbhCBPfK (ORCPT ); Tue, 2 Mar 2021 10:35:10 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 122EithD037184; Tue, 2 Mar 2021 09:48:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=RyXQ0YOdKDKWImHbiOYlbyjVggy7D3qEGh0Behjax+E=; b=l9fs4po1SWYMBBocZVeXeGJpoXGhzep6ZdYBZHkIuTuWiwOWT3VcZC1zYB0T3P0MBZB6 YzlSVeHdD5e28418ZucY4ZY04qUX79yE2ItoPoxK0rDwMMpXF/krCU0VlXC5DYYhL7rp 585o6EaKxdiZcXLHz/8np81Zv5SxntjBbN7FnLOcPqfBqQahYT2eKeLXhKCjS7XcJHHh MtXq8TbI9sDpmSPFWWhsUfjTH/XnxmOw1mv2abRhOf2HcawMsOjLByaGfVnx64hbmWUs pEZhQPcESQ4HAruWgoSLQfMWm8Vzw3m5mYYdh++QlptMvxXiZZ8ig3SHs3qXg24JgYhE SA== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 371qd604fs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 09:48:59 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 122EgKh4030811; Tue, 2 Mar 2021 14:48:57 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma05fra.de.ibm.com with ESMTP id 3712v50g7y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 14:48:57 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 122EmsSN64553428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Mar 2021 14:48:54 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DBBEA4059; Tue, 2 Mar 2021 14:48:54 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3414DA4057; Tue, 2 Mar 2021 14:48:54 +0000 (GMT) Received: from li-e35baacc-2106-11b2-a85c-8f97eb669a6e.ibm.com (unknown [9.145.82.126]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 2 Mar 2021 14:48:54 +0000 (GMT) Subject: Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms To: "Liang, Kan" , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, heiko.carstens@de.ibm.com, Athira Rajeev References: <20210302133119.3325530-1-tmricht@linux.ibm.com> From: Thomas Richter Organization: IBM Message-ID: <7a14f6b6-967f-93bf-a030-44e358374502@linux.ibm.com> Date: Tue, 2 Mar 2021 15:48:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-02_06:2021-03-01,2021-03-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103020120 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/2/21 3:03 PM, Liang, Kan wrote: > > + Athira Rajeev > > On 3/2/2021 8:31 AM, Thomas Richter wrote: >> Executing perf test 27 fails on s390: >>   [root@t35lp46 perf]# ./perf test -Fv 27 >>   27: Sample parsing >>   --- start --- >>   ---- end ---- >>   Sample parsing: FAILED! >>   [root@t35lp46 perf]# >> >> The root cause is >> commit c7444297fd3769 ("perf test: Support PERF_SAMPLE_WEIGHT_STRUCT") >> This commit introduced a test case for PERF_SAMPLE_WEIGHT_STRUCT >> but does not adjust non-x86 weak linkage functions. >> >> The error is in test__sample_parsing() --> do_test() >> Function do_test() defines two structures of type struct perf_sample named >> sample and sample_out. The first sets member sample.ins_lat = 117 >> >> Structure sample_out is constructed dynamically using functions >> perf_event__synthesize_sample() and evsel__parse_sample(). >> Both functions have an x86 specific function version which sets member >> ins_lat. The weak common functions do not set member ins_lat. >> > > I don't think Power supports the instruction latency. As a request from Athira Rajeev, I moved the PERF_SAMPLE_WEIGHT_STRUCT to the X86 specific codes. > https://lore.kernel.org/lkml/D97FEF4F-DD88-4760-885E-9A6161A9B48B@linux.vnet.ibm.com/ > https://lore.kernel.org/lkml/1612540912-6562-1-git-send-email-kan.liang@linux.intel.com/ > > I don't think we want to add the ins_lat back in the weak common functions. > > Could you please update the perf test and don't apply the PERF_SAMPLE_WEIGHT_STRUCT for the non-X86 platform? I used offical linux git tree [root@t35lp46 perf]# git tag | fgrep 5.12 v5.12-rc1 [root@t35lp46 perf]# So this change is in the pipe. I do not plan to revert individual patches. > > >> Later in function samples_same() both data in variable sample and sample_out >> are compared. The comparison fails because sample.ins_lat is 117 >> and samples_out.ins_lat is 0, the weak functions never set member ins_lat. >> >> Output after: >>   [root@t35lp46 perf]# ./perf test -Fv 27 >>   27: Sample parsing >>   --- start --- >>   ---- end ---- >>   Sample parsing: Ok >> [root@t35lp46 perf]# >> >> Fixes: >> commit c7444297fd3769 ("perf test: Support PERF_SAMPLE_WEIGHT_STRUCT") > > I think the regression should start from > commit fbefe9c2f87f ("perf tools: Support arch specific PERF_SAMPLE_WEIGHT_STRUCT processing") > > > Thanks, > Kan Kan, I do not follow you. Your commit c7444297fd3769d10c7ffb52c81d71503b3e268f adds this line @@ -242,6 +245,7 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format) .cgroup = 114, .data_page_size = 115, .code_page_size = 116, + .ins_lat = 117, And this assignment 117 breaks the test. As mentioned before, member ins_lat is never touched by the weak functions. -- Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- Vorsitzender des Aufsichtsrats: Gregor Pillen Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294