Received: by 10.213.65.68 with SMTP id h4csp1105705imn; Wed, 14 Mar 2018 09:45:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSHYKIX0bR7ba6sBdWrR1uXkTx5kUov8omplW6hfh2R3ALGIV/fnx8WY6oSmy3zaNaFyMW X-Received: by 2002:a17:902:6e0f:: with SMTP id u15-v6mr4710669plk.78.1521045909879; Wed, 14 Mar 2018 09:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521045909; cv=none; d=google.com; s=arc-20160816; b=m8M2zYO5bnANyIAft/bbu1zWiNFMtUxEYqmpADwcLZqOj3W7y9fjPBWIJkndA4tABU I3lU0ImLY7U38o/3iyxwPJfHMxAh0RZOfXbfEETGyw2M8Fp+vpa4fnKbQo1NDWi4RZPm um1tqfJ/uCBcb2eQP7urD5Jegc9vrejwyKBD1Z1SoTreSTXcGhU2Nv4ax6nbykMaH/4h xzUSpp8svGA41cva6HWByicbb2hZt5ChYhA3NiR7pp08NUNALZP2A0rxTyG5fg8SCFYk 7goJH/Wz7jAgnXvb7I972s1WeSBatunxaPvWZNQcLZo5jDqV6EaWif67eBl6o/ccHzQ7 Xe1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=4icDdl/wFCITN7TWBbeuG94DgjDaLFoI5TjrDdaA+Qc=; b=FGluqADKWOx5vQuXCJQAZWdGU2dXOBlfvfCNytfaT3nzI1NoQls7DCkqtkI3Z2SEaK 6rC5I2cpSO+ubaVsdp5LkAaL33vbA82OAb/2qO7xusDTeKE0xuJH6OvZuRszBQwRvM/n qPm7a47C9c1JsfQKaA+vxpVD9/EcqnDWijzNpOvA0i3KqHX/X9ForQ1ZHv3WdMcR04pT 8Ig4fRrC0Lzv0thw2KXfv76urD1skbDcxgvOWj4WwZOF5WCzSe5bFnK5SemLLnAnHfjJ mfEklr+75ToGp9Pyr3nIbZde3IxDTxKAP98R545ctwghZdx4Eyt8Q7UL7EwzwRfHEy56 4Yvg== 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 bh5-v6si2216540plb.17.2018.03.14.09.44.54; Wed, 14 Mar 2018 09:45:09 -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 S1751757AbeCNQmo (ORCPT + 99 others); Wed, 14 Mar 2018 12:42:44 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40674 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbeCNQmm (ORCPT ); Wed, 14 Mar 2018 12:42:42 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2EGek0Q085382 for ; Wed, 14 Mar 2018 12:42:42 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gq5bcxpev-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 12:42:41 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 16:42:39 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 16:42:37 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2EGga6G51839102; Wed, 14 Mar 2018 16:42:36 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4C62542049; Wed, 14 Mar 2018 16:34:51 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41C5F42045; Wed, 14 Mar 2018 16:34:51 +0000 (GMT) Received: from lynx.boeblingen.de.ibm.com (unknown [9.152.212.162]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 14 Mar 2018 16:34:51 +0000 (GMT) Received: from brueckh by lynx.boeblingen.de.ibm.com with local (Exim 4.89) (envelope-from ) id 1ew9U4-0006k4-CK; Wed, 14 Mar 2018 17:42:36 +0100 Date: Wed, 14 Mar 2018 17:42:36 +0100 From: Hendrik Brueckner To: Andi Kleen Cc: Thomas-Mich Richter , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [PATCH] perf stat: Add support for s390 transaction counters References: <20180312103807.45069-1-tmricht@linux.vnet.ibm.com> <87tvtk64ld.fsf@linux.intel.com> <20180314131850.GA27335@kernel.org> <20180314154317.GG13724@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180314154317.GG13724@tassilo.jf.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18031416-0020-0000-0000-00000404773C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031416-0021-0000-0000-000042987C28 Message-Id: <20180314164236.GB5297@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_08:,, 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803140188 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Mar 14, 2018 at 08:43:17AM -0700, Andi Kleen wrote: > > S390 has no support for Elision and uses transaction begin/end/abort > > instructions. The CPU measurement counter facility provides counters for > > transaction end and transaction abort. > > You don't need to implement the el-* events. > > > I have used this table (taken from arch/x86/events/intel/core.c) as giudeline: > > /* Haswell special events */ > > EVENT_ATTR_STR(tx-start, tx_start, "event=0xc9,umask=0x1"); > > EVENT_ATTR_STR(tx-commit, tx_commit, "event=0xc9,umask=0x2"); > > EVENT_ATTR_STR(tx-abort, tx_abort, "event=0xc9,umask=0x4"); > > EVENT_ATTR_STR(tx-capacity, tx_capacity, "event=0x54,umask=0x2"); > > EVENT_ATTR_STR(tx-conflict, tx_conflict, "event=0x54,umask=0x1"); > > EVENT_ATTR_STR(el-start, el_start, "event=0xc8,umask=0x1"); > > EVENT_ATTR_STR(el-commit, el_commit, "event=0xc8,umask=0x2"); > > EVENT_ATTR_STR(el-abort, el_abort, "event=0xc8,umask=0x4"); > > EVENT_ATTR_STR(el-capacity, el_capacity, "event=0x54,umask=0x2"); > > EVENT_ATTR_STR(el-conflict, el_conflict, "event=0x54,umask=0x1"); > > EVENT_ATTR_STR(cycles-t, cycles_t, "event=0x3c,in_tx=1"); > > EVENT_ATTR_STR(cycles-ct, cycles_ct, "event=0x3c,in_tx=1,in_tx_cp=1"); > > > > > > So s390 can only support tx_commit and tx-abort symbolic names. In detail, for s390 we have: cpum_cf/TX_C_TABORT_NO_SPECIAL/ cpum_cf/TX_C_TABORT_SPECIAL/ cpum_cf/TX_C_TEND/ cpum_cf/TX_NC_TABORT/ cpum_cf/TX_NC_TEND/ The mapping of the above is not that easy. As s390 have counters for non-constraint (TC_NC_*) and contraint (TX_C_*) transaction commits (TEND) and aborts (TABORTs). > We could change perf stat to fall back to only tx commit and tx abort. > We already did that for one limited case. Displaying these different types for s390 is important from my point of view. Of course, I could create a mapping of TX_NC_TABORT/TX_NC_TEND to tx-commit/tx-abort. The remaining events would still appear to be specific to the cpum_cf. So I would propose to go with adding the cpum_cf/ specific ones first. If necessary, they could go into the perf/arch/s390/ directory and included in builtin-stat. I put a todo on my list to provide at least a tx-commit/abort for the nonconstraint transactions. (The other would still be specific). Kind regards, Hendrik -- Hendrik Brueckner brueckner@linux.vnet.ibm.com | IBM Deutschland Research & Development GmbH Linux on z Systems Development | Schoenaicher Str. 220, 71032 Boeblingen IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Koederitz Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294