Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752702AbeACMXG (ORCPT + 1 other); Wed, 3 Jan 2018 07:23:06 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3668 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752669AbeACMXC (ORCPT ); Wed, 3 Jan 2018 07:23:02 -0500 Subject: Re: [RFC PATCH 2/5] perf jevents: add support for arch recommended events To: Andi Kleen References: <1512490399-94107-1-git-send-email-john.garry@huawei.com> <1512490399-94107-3-git-send-email-john.garry@huawei.com> <20171206133607.GA12508@krava> <20171208122918.GE2799@krava> <20171209073104.GB14297@krava> <5d322353-2785-a99f-bcd8-b948bd6cb09a@huawei.com> <20171216184701.GB25156@tassilo.jf.intel.com> <20180102174814.GT25156@tassilo.jf.intel.com> CC: Jiri Olsa , , , , , , , , , , , , , , , From: John Garry Message-ID: Date: Wed, 3 Jan 2018 12:22:16 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20180102174814.GT25156@tassilo.jf.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 02/01/2018 17:48, Andi Kleen wrote: >> Can you describe how you autogenerate the JSONs? Do you have some internal >> proprietary HW file format describing events, with files supplied from HW >> designer, which you can just translate into a JSON? Would the files support >> deferencing events to improve scalability? > > For Intel JSON is an official format, which is maintained for each CPU. > It is automatically generated from an internal database > https://download.01.org/perfmon/ > > I have some python scripts to convert these Intel JSONs into the perf > format (which has some additional headers, and is split into > different categories, and add metrics). OK, understood. Unfortunately I could not see such a database being maintained for ARM implementors. > > They have some Intel specifics, so may not be useful for you. > > There's no support for dereference, each CPU gets its own unique file. Right. > > But you could do the a merge simply with the attached script which merges > two JSON files. I assume that you're talking about simply merging the micro architecture and the platform specific event JSONS at build time. If yes, this would not work for us: - the microarchitecture JSON would contain definitions of all events, but there is no architectural method to check if they are implemented - we need to deal with scenario of non-standard event implementations But I could update the script to deal with this and add to the build (Jirka looked to be ok with the same in jevents, albeit a few caveats). All the best, John > > -Andi >