Received: by 10.213.65.68 with SMTP id h4csp984726imn; Wed, 14 Mar 2018 06:20:07 -0700 (PDT) X-Google-Smtp-Source: AG47ELv+O8eeZU2S/MBMf/zT7rD963mVCKJPuk/uCyxeyG4ivLWKadAYoI4HP2qI2r3X+spspQNA X-Received: by 10.99.125.87 with SMTP id m23mr3595564pgn.297.1521033607302; Wed, 14 Mar 2018 06:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521033607; cv=none; d=google.com; s=arc-20160816; b=rL7ZEqm135YdCWYv33ATvvXE94SKgidbzYRxWOt98OgFZthWq+Cq4t4PdQnKY8exVV 7hD91M5Flt4b254bIVPS5oeUv+Mm6Bd6jAX/EBOBloIXUCl7hEM3uWjGVkqYmHCrrBIL MzaM9JilnqN9RpqUcx4xNRO+ZQe8oU/Zn67WYnfOyqMP1y+OcVdu52HFyN4SwPwCY2ok wBJVM4cnXam2l3lKyWrEWX1GpKq8P6GneK/IFmHl1qilZ8J+9Sl4vKwOwq98ifI/9hCh SO3t5g4jwnKd/LdXpw11z8dQ56OC/n6e1ZghrowdvKp8RD4DjOGrJYnTcbiujtvfFrml 1w9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=3Lv9FaNFEMNl/eyWTeBh0Nu9AGB7z3QCIRZRY/yev4Y=; b=jpyxoPGom2YFjX3cqTVv6Kir+QAUq0Qzv8qSfvidgKIwF0VM+7sw1OKsDg5XpRJqS4 RV2JswwYYNHiLQ5lC7zrjqMV/q3PZlpW2MwVLLY4alEgdqO8j+QLtZf8+WqDaLdB4yKl QXSdpKHIAtef6pH9McUxZPjpL4vMKDZgRYOMdbfjZywKNGwssUgh6lq2yHQ6Z+rD9j+e jp4eoGq4HPBbwx4huErX5DjSLRjaVJbspdPQk1AFkN/a5KShFKX7WVwOPqGQ0J5/Kh9u B/h9f6LlSB3MnOfUGmtDtDZAVkGQMFkQEmoPoQVEGFNB8mVmMkZS/qfloHcXBS/RKSKs 8BJA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r79si2073781pfb.126.2018.03.14.06.19.52; Wed, 14 Mar 2018 06:20:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbeCNNSz (ORCPT + 99 others); Wed, 14 Mar 2018 09:18:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:47068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbeCNNSy (ORCPT ); Wed, 14 Mar 2018 09:18:54 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 637E220685; Wed, 14 Mar 2018 13:18:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 637E220685 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Received: by jouet.infradead.org (Postfix, from userid 1000) id 7017D143FAF; Wed, 14 Mar 2018 10:18:50 -0300 (-03) Date: Wed, 14 Mar 2018 10:18:50 -0300 From: Arnaldo Carvalho de Melo To: Thomas-Mich Richter Cc: Andi Kleen , 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 Message-ID: <20180314131850.GA27335@kernel.org> References: <20180312103807.45069-1-tmricht@linux.vnet.ibm.com> <87tvtk64ld.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Mar 14, 2018 at 09:34:48AM +0100, Thomas-Mich Richter escreveu: > On 03/13/2018 04:23 AM, Andi Kleen wrote: > > Thomas Richter writes: > >> Right now there is only hard coded support for x86. > > That's not true. There is support for generic transaction events in perf. > > As far as I can tell your events would map 1:1 to the generic tx-* events. > I might be wrong, but when I look at function add_default_attributes() > in file buildin-stat.c the string variables transaction_attrs > and transaction_limited_attrs are used when flag T is specified on command line: > /* Default events used for perf stat -T */ > static const char *transaction_attrs = { > "task-clock," > "{" > "instructions," > "cycles," > "cpu/cycles-t/," > "cpu/tx-start/," > "cpu/el-start/," > "cpu/cycles-ct/" > "}" > }; > These PMU events show up on my x86 notebook but no on the s390. > That's why I came to this conclusion. I have not tried other architectures. So, I think Andi is saying that the s/390 kernel should map the generic transaction events (cpu/cycles-t/, cpu/tx-start/, etc) to the events you want to make 'perf stat -T' use, that way 'perf stat' doesn't have to be changed, it will continue asking for the generic transaction event names and then the kernel does the translation. Just like we map "cycles" to different underlying events in different architectures, right? - Arnaldo