Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp775775ybp; Wed, 9 Oct 2019 04:10:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTo50un5NP8ZIukbu4l2kcDO2VGDr6GMoxCnQTMdaAnR49W4q4DhSyGR5kfqEvsxjzxWFk X-Received: by 2002:a17:906:bcdc:: with SMTP id lw28mr2175733ejb.183.1570619420150; Wed, 09 Oct 2019 04:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570619420; cv=none; d=google.com; s=arc-20160816; b=IGJ/Xzg717ZxRCcGDQYKBJT7WesOw4J3Ar3eGhJgswDUWfzb6XJDwlzQkaexUBfj5I caCdxWFWKz+Tb4SOcEtUxgvsJ8kOzRIOrv7UwBLZhOj5NQ2TWiCGWgy7v7TI0nQNCWcU I+1dVwaUpzr5QgjQXCLHB/u/7L5BdZvJjUXD8xvWBXOsae9B2BGW58IYu2XHDT6oenVy /vZrvVhsGSgIpGwJnkMbvYnoSK/irBRtfPUJpqkTv7n8xtCQYATXerllaE/1YxKMvNiL X2dTx2YQ9F6EKcJzYXWlu2YesehLjmZvDynrjGVePOwUvcIz6rAH8BjuENbEGZ4WfKCp a1SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AUDUdPmKwFiKthU0zhTuq12iXR3rNI5WeTTD4/bZFrM=; b=d+djnIFO4iHikOTfvFOwFzAozpmWKDiqcM6W1k5wMD+tlKseQXymgou/aZc1bDVcJP 60dBDhuw1poqJ3WjSGXxyX0js2iZ2PBhHaxzTzW1eqc5JqUkPSZm+i2YQxi1o68IM5MC 0mdAQ2ajbAP4m2zu/XrjlIUm2AVuupDHzr34MKjuWLO2dWmQKSg/Szlx4fI7A3bNAOhY am91bRy2tT7y/R5PoOVS8PFtsWq0lSr9vtFCBAXyjiDld/MK8mVEg6015/it+hAXe+6D lubGj7klsFspAKuyUgm3tqxqQkYEAYukDbmRlKUVWBKVCCPS5Z2E1sFUExl8eztuO6CK K/yw== 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 r24si987056edy.417.2019.10.09.04.09.51; Wed, 09 Oct 2019 04:10:20 -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 S1730398AbfJILJf (ORCPT + 99 others); Wed, 9 Oct 2019 07:09:35 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:42178 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727228AbfJILJe (ORCPT ); Wed, 9 Oct 2019 07:09:34 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 311C1DA3E4D34CCC7F61; Wed, 9 Oct 2019 19:09:32 +0800 (CST) Received: from [127.0.0.1] (10.133.215.182) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 9 Oct 2019 19:09:23 +0800 Subject: Re: [RFC PATCH 2/3] perf tools: Add support for "report" for some spe events To: James Clark , Jeremy Linton , "peterz@infradead.org" , "mingo@redhat.com" , "acme@kernel.org" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" , "ak@linux.intel.com" , "adrian.hunter@intel.com" , "yao.jin@linux.intel.com" , "tmricht@linux.ibm.com" , "brueckner@linux.ibm.com" , "songliubraving@fb.com" , "gregkh@linuxfoundation.org" , Kim Phillips CC: "gengdongjiu@huawei.com" , "wxf.wang@hisilicon.com" , "liwei391@huawei.com" , "huawei.libin@huawei.com" , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" , "Al Grant" , nd References: <1564738813-10944-1-git-send-email-tanxiaojun@huawei.com> <1564738813-10944-3-git-send-email-tanxiaojun@huawei.com> <0ac06995-273c-034d-52a3-921ea0337be2@arm.com> <016c1ce8-7220-75a2-43fa-0efe150f897c@huawei.com> <805660ca-1cf3-4c7f-3aa2-61fed59afa8b@arm.com> <637836d6-c884-1a55-7730-eeb45b590d39@huawei.com> From: Tan Xiaojun Message-ID: <2b1fc8c7-c0b9-f4b9-a24f-444bc22129af@huawei.com> Date: Wed, 9 Oct 2019 19:09:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.215.182] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/9 17:48, James Clark wrote: > Hi Xiaojun, > >> By the way, you mentioned before that you want the spe event to be in the form of "event:pp" like pebs. Is that the whole framework should be made similar to pebs? Or is it just a modification to the command format? > > We're currently still investigating if it makes sense to modify the Perf event open syscall to use SPE when the "precise_ip" attribute is set. And then synthesize samples using the SPE data when available. This would keep the syscall interface more consistent between architectures. > > And if tools other than Perf want more precise data, they don't have to be aware of SPE or any of the implementation defined details of it. For example the 'data source' encoding can be different from one micro architecture to the next. The kernel is probably the best place to handle this. > > At the moment, every tool that wants to use the Perf syscall to get precise data on ARM would have to be aware of SPE and implement their own decoding. > Hi James, What do you mean when the user specifies "event:pp", if the SPE is available, configure and record the spe data directly via the perf event open syscall? (perf.data itself is the same as using -e arm_spe_0//xxx?) OK. If I have not misunderstood, I think I know how to do it. Thank you. >> For the former, this may be a bit difficult. For the latter, there is currently no modification to the record part, so "-c -F, etc." is only for instructions rather than events, so it may be misunderstood by users. >> >> So I haven't figured out how to do. What do you think of this? > > I think the patch at the moment is a good start to make SPE more accessible. And the changes I mentioned above wouldn't change the fact that the raw SPE data would still be available via the SPE PMU. So I think continuing with the patch as-is for now is the best idea. > Yes. I agree. Xiaojun. > > James > >