Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp820125ybp; Wed, 9 Oct 2019 04:53:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdBTTFbA48eH/LBvUuW0GZcJe8fbBKwYkbWkLuzLyCnnMcu1jg+LjBwGVBhlVHwIwkCERu X-Received: by 2002:a05:6402:3051:: with SMTP id bu17mr2524650edb.4.1570621985459; Wed, 09 Oct 2019 04:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570621985; cv=none; d=google.com; s=arc-20160816; b=wFoaCNfAlPN+Rc99EkiCY4ZJ/6P6334IXc69bqUbcQo0BzrH+XDfvit+7i+W1NrJIV Jajf2/Sj+ftTKt6XfEb5ysdoyRjKZztRQDn6jYI0OsnYOAPg0f4i26dg4oXyzzVyZVfh /wzt/QaqFbH8/Gu2WpcWzgJyEoZd510dM2YNhzMa1IzfzCqX21x3VHQ7LnXZDhNG18Wt ubZjG/d/DLuHBd4uPiSuVlE3srNpie8mGTqRMaxubQAn1wqgj2eBV1Jlgpcm8oiWiLsD 244+rxUDfFoA+LqoYpnezyW+jbE1570KNq/edyRcxT0SGaEmqdcdYSdWDz3SYTmrpAAg C5+w== 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:references:cc:to:from:subject; bh=u/nhdtVO5Xc5b+R2t0pdZXzjNOeRUJAzzFoGQYNHATQ=; b=xiwXCXxtRP/Bw2Dlv++S6TbjiTPxd3yQIgscScLqGmkPx4cGI9jM3Un67sMUoktmFa 0RZDZ7bVkttPD1FBPKOh5Do5fe9qQvXc4PUrMWpdIqd2GNeRjetLO/gg0n5i4G5wXJmA 4mQfpf7I3VdeS01fk8Ng42vE0k8wXRXHOkOwQhWLI5+X7fYuSBvBy0LlS36iKhgxwD0b 8YKnj+dfVR8a9bfaXx6kf23V3YKylmrnyY8t4AVSnfQNiVtZqiSHooeyyQLf0z/ss/lh NvZxDT6eIZvr9tVxEw/COeJD2sGeqiNFoWlqZ1+rMIkUBjGOA+973F8aOdAuQYuy5D7i Bb5g== 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 q15si979009ejj.183.2019.10.09.04.52.41; Wed, 09 Oct 2019 04:53:05 -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 S1730822AbfJILtt (ORCPT + 99 others); Wed, 9 Oct 2019 07:49:49 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33486 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727002AbfJILts (ORCPT ); Wed, 9 Oct 2019 07:49:48 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BCA2ABB2A54D7503D44C; Wed, 9 Oct 2019 19:49:46 +0800 (CST) Received: from [127.0.0.1] (10.133.215.182) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 9 Oct 2019 19:49:37 +0800 Subject: Re: [RFC PATCH 2/3] perf tools: Add support for "report" for some spe events From: Tan Xiaojun 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> <2b1fc8c7-c0b9-f4b9-a24f-444bc22129af@huawei.com> Message-ID: <335fedb8-128c-7d34-c5e8-15cd660fe12e@huawei.com> Date: Wed, 9 Oct 2019 19:49:35 +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: <2b1fc8c7-c0b9-f4b9-a24f-444bc22129af@huawei.com> 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 19:09, Tan Xiaojun wrote: > 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?) I mean, for the perf record, if the user does not add ":pp" to these events, the original process is taken, and if ":pp" is added, the spe process is taken. Xiaojun. > > 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 >> >> >