Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1097742ybh; Tue, 10 Mar 2020 14:40:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu1XQw9EDA6l8K5HqFd6X2NoeN/UQpvUYwTcoF9iu4HXVbLQnHvgyfWJD2WlnsTAshA/xd6 X-Received: by 2002:a9d:a68:: with SMTP id 95mr17801496otg.87.1583876421041; Tue, 10 Mar 2020 14:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583876421; cv=none; d=google.com; s=arc-20160816; b=JzPjRUEcnzX8L1yDl4fXOcvEJmML+xb7pJN5ccLF+1DrZ+REhp7GvZFQj12I+NDl9A bcdrz0kL9dfEn/CIThUGdHr6vZ6mefaZ8xKe/CbjzDjx3ncDnFdIU6LaemBuhqq0wvsa tblDNNypPrnOxYEGsQnI4kKGoHGY6/LQ+wbn2xNovPDTWZcTtAtJJOYrDxJylcW3qEJz itKfeB++5H9Na8SuzN8YDkskiEgv5HE2qvVd/PzNvn1ev5ayqpRiGtSHlr+DaWBm45jq Cg6WwKTUrgAVZWTyh30VwEsuJTDD9/EfzzuY5Tm9hUqneMCxcSpHau0EWTzoSZoZa7PO gRyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GdlXGBu011eILr6E7BKeOR6UiLq6Vdo/qhWhU5E0PbY=; b=IadqR0N5sV5FSgEcYnfRC6WuGeyfHO9jT9WGXGBZY+rK1LzmsAp8NajX7+4yLEzFIg 5zbf30Sgqc99yhvh2GclHlPlM2jzlcDgUK+6UzsIBb32FTfqWMOH5TYvcf+yPJjcOqUA GiFW/cPzQ2v3kAfzmHrx9NFrkC7Ulq4Bfj6vrW7b5+I/cCvYClkO1I3kR3lXTyebuHHm 1MC9Ku3OhHVJlf4Tg/cyqC4kyDkJXlWx91o1EoIoJcUACkOivqE30g/sEZZL0oIYlUWM XKVYvJWV4UEGhj0awPQk/L77rHZR7XrnFQVcAKe7NW0YE39ZU+shKXVwNP3bOV2jWTuO wfmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qow1Yly0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20si8451188otj.294.2020.03.10.14.40.09; Tue, 10 Mar 2020 14:40:21 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=qow1Yly0; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726273AbgCJVjh (ORCPT + 99 others); Tue, 10 Mar 2020 17:39:37 -0400 Received: from mail-ua1-f65.google.com ([209.85.222.65]:44800 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgCJVjg (ORCPT ); Tue, 10 Mar 2020 17:39:36 -0400 Received: by mail-ua1-f65.google.com with SMTP id a33so5253990uad.11 for ; Tue, 10 Mar 2020 14:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GdlXGBu011eILr6E7BKeOR6UiLq6Vdo/qhWhU5E0PbY=; b=qow1Yly0Eo6wNCVCAXCutaqv7CgN7WaQcfi68e6dnzv9swNvIzu6OER4ZCvTlqsND0 v/wSUS0v8kJvwGnHBDvYrjU3aL1TVqj1p8lgA60b+qp0HENgTLb+f9Kd0py+Z1tnFnPu 4oj7QZuEgxniGPxwYyBRmG/Asfmc41HbYw9i+H5IuuLAVAcNxQN0lZE/LiC3uw6+w6SC VytsXj/SMfOm5I3i8dxSxO3ukRTE9VzrnqduCBzKbYwFatcJezX15OG0D0I5/L6bBnoO uaRDM/xM6Y1p1fLIouawRKNZadIjdXjfmkxW2UYmlOg5Y7++zGD7F/xYSx+5wsKlVUUr GiFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GdlXGBu011eILr6E7BKeOR6UiLq6Vdo/qhWhU5E0PbY=; b=lZL6xz/UrJC7cRjkqcyxG2K3GgC/K2bFoo2RI3Ofi3+YREVFEqGfHiwGsLqB5BRhcQ o2oz9HZ6yPvxyuyMhYsYLvNGsCVHEUy2dK7y7hLpXfGWfhziR+az0YoyZGUshRM8HKqt gSo21umMtxr75E7W2JiDgm6koEH5sU6eiAPIEIp6/HGtvc8f3KhUwcp+grAv48gEBchP l2sYrPenQEmaLYQHGE74GAYq2cJ4QW5vIgMI7/A2Bh9o2+H4CFfbBUhoYct8+6gG1g/D 2JcHc3VcvWUuVvjPwYRyHK8+XG8tnRhpF9uQznHEX5m7uWvALJ0mvvo5p9MubwGXjYQg sWZg== X-Gm-Message-State: ANhLgQ0mh/xgybNcGsiBqOOJcVaP32+oDYwAty1696G/ngjxNxK2BoNs qbWCXn5CjnL7RZjt/1JkCl2ow2QWM6as9jBW8wDAAg== X-Received: by 2002:ab0:2851:: with SMTP id c17mr13587156uaq.63.1583876374973; Tue, 10 Mar 2020 14:39:34 -0700 (PDT) MIME-Version: 1.0 References: <20200310185003.57344-1-irogers@google.com> <20200310195915.GA1676879@tassilo.jf.intel.com> In-Reply-To: <20200310195915.GA1676879@tassilo.jf.intel.com> From: Stephane Eranian Date: Tue, 10 Mar 2020 14:39:23 -0700 Message-ID: Subject: Re: [PATCH] perf tools: add support for lipfm4 To: Andi Kleen Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Yonghong Song , Andrii Nakryiko , Greg Kroah-Hartman , Thomas Gleixner , Igor Lubashev , Alexey Budankov , Florian Fainelli , Adrian Hunter , Jiwei Sun , yuzhoujian , Kan Liang , Jin Yao , Leo Yan , John Garry , LKML , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 10, 2020 at 12:59 PM Andi Kleen wrote: > > On Tue, Mar 10, 2020 at 11:50:03AM -0700, Ian Rogers wrote: > > This patch links perf with the libpfm4 library. > > This library contains all the hardware event tables for all > > processors supported by perf_events. This is a helper library > > that help convert from a symbolic event name to the event > > encoding required by the underlying kernel interface. This > > library is open-source and available from: http://perfmon2.sf.net. > > For most CPUs the builtin perf JSON event support should make > this redundant. > We decided to post this patch to propose an alternative to the JSON file approach. It could be an option during the build. The libpfm4 library has been around for 15 years now. Therefore, it supports a lot of processors core and uncore and it is very portable. The key value add I see is that this is a library that can be, and has been, used by tool developers directly in their apps. It can work with more than Linux perf_events interface. It is not tied to the interface. It has well defined and documented entry points. We do use libpfm4 extensively at Google in both the perf tool and applications. The PAPI toolkit also relies on this library. I don't see this as competing with the JSON approach. It is just an option I'd like to offer to users especially those familiar with it in their apps. > Perhaps you could list what CPUs it actually supports over > the existing JSON tables. > > If it's only a few it would be likely better to add > appropiate json files. > > If it's a massive number it might be useful, although > JSON support would be better for those too. > > -Andi