From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751032AbcIIApN (ORCPT ); Thu, 8 Sep 2016 20:45:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54138 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750750AbcIIApL (ORCPT ); Thu, 8 Sep 2016 20:45:11 -0400 X-IBM-Helo: d23dlp03.au.ibm.com X-IBM-MailFrom: maddy@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/13] perf/core: Add perf_arch_regs and mask to perf_regs structure To: Peter Zijlstra References: <1472418058-28659-1-git-send-email-maddy@linux.vnet.ibm.com> <1472418058-28659-2-git-send-email-maddy@linux.vnet.ibm.com> <20160901072629.GJ10153@twins.programming.kicks-ass.net> <750f1871-9efd-01d3-386d-be93908ca94a@linux.vnet.ibm.com> <20160906091042.GJ10153@twins.programming.kicks-ass.net> Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Thomas Gleixner , Ingo Molnar , Jiri Olsa , Arnaldo Carvalho de Melo , Stephane Eranian , Russell King , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Michael Ellerman , Sukadev Bhattiprolu From: Madhavan Srinivasan Date: Fri, 9 Sep 2016 06:14:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160906091042.GJ10153@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090900-1617-0000-0000-00000154F569 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090900-1618-0000-0000-000046AB36FD Message-Id: <2bbb5bfe-d096-d82a-398e-0c2df4242d7b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-08_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609090009 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 06 September 2016 02:40 PM, Peter Zijlstra wrote: > On Tue, Sep 06, 2016 at 09:55:43AM +0530, Madhavan Srinivasan wrote: >> >> On Thursday 01 September 2016 12:56 PM, Peter Zijlstra wrote: >>> On Mon, Aug 29, 2016 at 02:30:46AM +0530, Madhavan Srinivasan wrote: >>>> It's a perennial request from hardware folks to be able to >>>> see the raw values of the pmu registers. Partly it's so that >>>> they can verify perf is doing what they want, and some >>>> of it is that they're interested in some of the more obscure >>>> info that isn't plumbed out through other perf interfaces. >>> How much and what is that? Can't we try and get interfaces sorted? >> We have bunch of registers which exports information regarding the >> sampled instruction like SIER/SIAR/SDAR/MMCRA. Lot of bits in these >> registers are not yet architected and incase of SIER register, some of >> the bits are not plumbed out and we are working on getting some these >> exposed via perf. > What kind of information is this? I'm not familiar with the Power PMU > all that much, so you'll have to spell it out, not just mention the > registers its stuffed in. Sure. When we profile for sample events, SIER (Sampled Instruction Event Register) provides additional information about the sampled event when PMI occurred. SIER [41:42] indicates whether the SIAR(Sampled instruction address registers) and SDAR (Sampled data address register) are valid for the sampled event. SIER [46:48] indicates the type of intructions, 001 Load Instruction 010 Store instruction 011 Branch Instruction 100 Floating Point Instruction other than a Load or Store instruction 101 Fixed Point Instruction other than a Load or Store instruction 110 Condition Register or System Call Instruction SIER[49:51] gives information on the source of the sampled instruction like instruction came from primary, secondary, tertiary cache or beyond. SIER[52:55] provide information on branch type instructions Like mispredict and cause of it. SIER[56:59] provides information on translation and also source of translation like TLB, secondary cache, tertiary or beyond SIER[60:62] provides the interesting data on the storage access like L1/l2/L3... so on. Most of these could be plumbed out through standard mechanisms and it's all the other bits that are more interesting, but these are not architected and not public. Like wise, MMCRA (Monitor Mode Control Register A) is a configuration register for sampling and thresholding events. Provide data on various event configuration information. Link to the PowerISA v2.07 and Chapters 9 describes in detail on these registers. https://www.power.org/wp-content/uploads/2013/05/PowerISA_V2.07_PUBLIC.pdf Maddy >