Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp474881imm; Tue, 7 Aug 2018 23:41:10 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwlbwj/GkxPKrjZlnsUSkt4qJ1C/naUb3NpuP55SKIZbjTBr+erEEqWvk0YMJlWBEnslSYW X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr1387266plt.288.1533710470141; Tue, 07 Aug 2018 23:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533710470; cv=none; d=google.com; s=arc-20160816; b=shKliHEINax0O5JfSSLo1eqryW4UA1PIKE3oLqScJX+4XdwghX4mGAwRf0elIL8iEI PMkZEcNyqnMqq3yuEVz/prX/UiFCNjyXMkZM1GEyS87iWUVjTp0h5FSI2+zTKV0bvHBT f3UHd95WBnA2QSlN+DanKy557EfVF6GmIMh7PJhb797c/2N9vmK89sXOMSKyl49EqSIi bOwf1uYDQgSZ4MvgMiZBX7zwow2S/jHxHKkbm0dWh3UkQ6qd9mvBJV2gghWBvMQIrhT3 mMVysquPwGISu0uFVYrUQMQsQ6YcdO50O8//UYeUQORpokUTEJU/wLpbOvA1zaoZSx6N 9fgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language:in-reply-to :mime-version:user-agent:date:organization:from:references:cc:to :subject:arc-authentication-results; bh=GN1glrvvcf2xrG8J/g1/PhkOwwuWyj6qVpakbQ47X1Q=; b=mEd5LpeoWk8xpimJn1RZcWcxxPxtySK7TzzSiyBN9nfeVpks+zdkqbFEz6cQpKegBe 5chckPykVI9sTJ4knCtgvO1pRELcWvcL04vWI9fgUiC64BctFPCpwdqjTCBwsr1vG7MU kXFwj/24eI+e3GsWGy7JwIRNlxOXsHTJYaWhsw6gLszXP0rE6ZpcDoCJMTyELM+mLcjR ejqtLj+nr58qoIW7/KEpSsWbqrNeFHSnnmBXTVOrpyPHtSqM36uLvEGwQZ4AuUSjrvk7 zRpnEPoyLeZEtqi0WgskAaz9NyNaqBylVuO+VfUXlGEiVQPKk9QRNFqI9CYy/BUjjUHh cGJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5-v6si2829345pgo.466.2018.08.07.23.40.55; Tue, 07 Aug 2018 23:41:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbeHHI6U (ORCPT + 99 others); Wed, 8 Aug 2018 04:58:20 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37208 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726869AbeHHI6U (ORCPT ); Wed, 8 Aug 2018 04:58:20 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w786cs5p087487 for ; Wed, 8 Aug 2018 02:40:05 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kqphnhh00-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 Aug 2018 02:40:04 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Aug 2018 07:40:03 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 8 Aug 2018 07:40:00 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w786dx6W38469762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Aug 2018 06:39:59 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A75B64C052; Wed, 8 Aug 2018 09:40:07 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36CE44C046; Wed, 8 Aug 2018 09:40:07 +0100 (BST) Received: from oc3784624756.ibm.com (unknown [9.152.212.85]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 8 Aug 2018 09:40:07 +0100 (BST) Subject: Re: [PATCH 2/3] perf report: Add raw report support for s390 auxiliary trace To: mpe@ellerman.id.au, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com References: <20180802074622.13641-1-tmricht@linux.ibm.com> <20180802074622.13641-3-tmricht@linux.ibm.com> <87r2j9bkax.fsf@concordia.ellerman.id.au> From: Thomas-Mich Richter Organization: IBM Date: Wed, 8 Aug 2018 08:39:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87r2j9bkax.fsf@concordia.ellerman.id.au> Content-Type: multipart/mixed; boundary="------------13D9DBA6A4F3C4927657562D" Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18080806-0028-0000-0000-000002E7C753 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080806-0029-0000-0000-000023A0D000 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-08_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808080071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------13D9DBA6A4F3C4927657562D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 08/08/2018 05:37 AM, mpe@ellerman.id.au wrote: > Thomas Richter writes: >> Add support for s390 auxiliary trace support. >> Use 'perf record -e rbd000' to create the perf.data file. >> The event also has the symbolic name SF_CYCLES_BASIC_DIAG, >> using 'perf record -e SF_CYCLES_BASIC_DIAG' is equivalent. > ... >> >> Signed-off-by: Thomas Richter >> Reviewed-by: Hendrik Brueckner >> --- >> tools/perf/util/s390-cpumsf-kernel.h | 71 ++++++++ >> tools/perf/util/s390-cpumsf.c | 244 ++++++++++++++++++++++++++- >> 2 files changed, 314 insertions(+), 1 deletion(-) >> create mode 100644 tools/perf/util/s390-cpumsf-kernel.h > > > I'm seeing a build break on ppc64le which seems to be caused by this > commit (I haven't bisected): > > util/s390-cpumsf.c: In function ‘trailer_timestamp’: > util/s390-cpumsf.c:222:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] > return *((unsigned long long *) &te->timestamp[te->t]); > ^ > > > And on powerpc big endian: > In file included from util/cpumap.h:10:0, > from util/s390-cpumsf.c:150: > util/s390-cpumsf.c: In function ‘s390_cpumsf_basic_show’: > util/s390-cpumsf.c:187:10: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t {aka unsigned int}’ [-Werror=format=] > pr_err("Invalid AUX trace basic entry [%#08lx]\n", pos); > ^ > > cheers > Can you please try this patch. Thanks a lot -- Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 --------------13D9DBA6A4F3C4927657562D Content-Type: text/x-patch; name="0001-perf-report-Fix-build-error-for-s390-auxiliary-trace.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="0001-perf-report-Fix-build-error-for-s390-auxiliary-trace.pa"; filename*1="tch" From add6a709f79e20e8b4eaa6ded2bd1af043f8a235 Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Wed, 8 Aug 2018 07:11:23 +0100 Subject: [PATCH] perf report: Fix build error for s390 auxiliary trace support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 73eeeea48b7e ("perf report: Add raw report support for s390 auxiliary trace") introduced a compile errors on powerpc: util/s390-cpumsf.c: In function ‘trailer_timestamp’: util/s390-cpumsf.c:222:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] return *((unsigned long long *) &te->timestamp[te->t]); ^ In file included from util/cpumap.h:10:0, from util/s390-cpumsf.c:150: util/s390-cpumsf.c: In function ‘s390_cpumsf_basic_show’: util/s390-cpumsf.c:187:10: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t {aka unsigned int}’ [-Werror=format=] pr_err("Invalid AUX trace basic entry [%#08lx]\n", pos); ^ Fix these errors: 1. Use memcpy to extract value from character array. 2. Use %zu as format string in pr_err Fixes: 73eeeea48b7e Signed-off-by: Thomas Richter --- tools/perf/util/s390-cpumsf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c index 15555604ddb3..2bcb160a08f0 100644 --- a/tools/perf/util/s390-cpumsf.c +++ b/tools/perf/util/s390-cpumsf.c @@ -184,7 +184,7 @@ static bool s390_cpumsf_basic_show(const char *color, size_t pos, struct hws_basic_entry *basic) { if (basic->def != 1) { - pr_err("Invalid AUX trace basic entry [%#08lx]\n", pos); + pr_err("Invalid AUX trace basic entry [%#08zx]\n", pos); return false; } color_fprintf(stdout, color, " [%#08x] Basic Def:%04x Inst:%#04x" @@ -219,7 +219,10 @@ static unsigned long long trailer_timestamp(struct hws_trailer_entry *te) /* te->t set: TOD in STCKE format, bytes 8-15 * to->t not set: TOD in STCK format, bytes 0-7 */ - return *((unsigned long long *) &te->timestamp[te->t]); + unsigned long long ts; + + memcpy(&ts, &te->timestamp[te->t], sizeof(ts)); + return ts; } /* Display s390 CPU measurement facility trailer entry */ -- 2.14.3 --------------13D9DBA6A4F3C4927657562D--