From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF6FC433E0 for ; Fri, 29 May 2020 18:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09B1F206A4 for ; Fri, 29 May 2020 18:06:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="chJtAfry" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727851AbgE2SGn (ORCPT ); Fri, 29 May 2020 14:06:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727770AbgE2SGm (ORCPT ); Fri, 29 May 2020 14:06:42 -0400 Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE0C4C08C5C8 for ; Fri, 29 May 2020 11:06:42 -0700 (PDT) Received: by mail-yb1-xb43.google.com with SMTP id u17so1585017ybi.0 for ; Fri, 29 May 2020 11:06:42 -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=KZK+8UJPDvoWxLT1ls7FV08vAkICvPhNOZ41LMQ196g=; b=chJtAfry35Q2oD16l2AjPX6HqRlPNb0/ez0r3C9G0r/kOI3lYIGFsT1AoDdpr+FQ3r quJ3fjB4Mc60gbRvnNx0kbYPF5sL3KjmnBaAm3sa5CH6XVscrItXTk7XmGN9Dn66CHMu MhtJVWC94Z/AcXGWzVh7+GCd4G0eCy8QDS7Cfiw7BpEpuMcpATlspDYG2z4BwkZNxvL4 CDpNB/9p7QuUO+e7eCxFzkhIdn4p++upzRKL5KLZ+UzZQVuLnq1tADlqcHJqnZicnfSj Ne73UTe9rFKd9aaiSAOznJRMiV0dwtfvcCwMIZMvdBJ+JYSqm8NJQhf9mLzCR9O8sFgq /Iww== 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=KZK+8UJPDvoWxLT1ls7FV08vAkICvPhNOZ41LMQ196g=; b=fDoCxZPfhRLEDWmQPqL0A6Oz2vhXOL+BVOFfCBDV0Jv1H4BRBI0LO58LhNL29Ze6I1 3ohUd6OJosoOvpmVW5dR4ZIkzfujtddQ7aLLxVVtxVsdEc9GO+HpnGCQ1voQaG0BN+Gb O/FHRCrJPsibFNtoEkcxmrD4GtKKOMnKy3VpJbwdHHAQyUeQDrOfp1nDqxxJxcvZQpan BzC/OeVHdeXerEbtKcBODCFIQ2gi0lKHaLTGpoKXgBrhnrJp6Ako/Bn3IKeQh55+urVu AcVubY0U80HMKhviJ/NwmMgzLKfDE8xXmBqMthwIisR2q63nBpvqgovd5Qe8uW8lwKNf QMFQ== X-Gm-Message-State: AOAM533LskB6/gm9J57DLXDPUmvFcEbttziUfvL6nQEtnNpSzZtCuZ6l pvPn83DBSH4chIShBNTJ08t56ZoW/Ssjs2ewyrTX0Q== X-Google-Smtp-Source: ABdhPJxh25r7yWeJw77p1Ajo+tQM0emJtz5ylrx7H0oiWwQmIvx3M0l6vcxUOKJe5LRJ4r0O/jjBgdXd6mno0LOQwlY= X-Received: by 2002:a25:790e:: with SMTP id u14mr14907935ybc.324.1590775601615; Fri, 29 May 2020 11:06:41 -0700 (PDT) MIME-Version: 1.0 References: <20200505182943.218248-1-irogers@google.com> <20200505182943.218248-2-irogers@google.com> <20200529172310.GE537@kernel.org> <20200529173608.GA31795@kernel.org> In-Reply-To: <20200529173608.GA31795@kernel.org> From: Ian Rogers Date: Fri, 29 May 2020 11:06:28 -0700 Message-ID: Subject: Re: [PATCH v14 1/1] perf tools: add support for libpfm4 To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , 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 , Andi Kleen , Jiwei Sun , yuzhoujian , Kan Liang , Jin Yao , Leo Yan , John Garry , LKML , Networking , bpf , linux-perf-users , Stephane Eranian Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, May 29, 2020 at 10:36 AM Arnaldo Carvalho de Melo wrote: > > Em Fri, May 29, 2020 at 02:23:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, May 29, 2020 at 10:03:51AM -0700, Ian Rogers escreveu: > > > On Tue, May 5, 2020 at 11:29 AM Ian Rogers wrote: > > > > > > > > From: Stephane Eranian > > > > > > > > This patch links perf with the libpfm4 library if it is available > > > > and LIBPFM4 is passed to the build. The libpfm4 library > > > > contains hardware event tables for all processors supported by > > > > perf_events. It is a helper library that helps 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. > > > > > > > > With this patch, it is possible to specify full hardware events > > > > by name. Hardware filters are also supported. Events must be > > > > specified via the --pfm-events and not -e option. Both options > > > > are active at the same time and it is possible to mix and match: > > > > > > > > $ perf stat --pfm-events inst_retired:any_p:c=1:i -e cycles .... > > > > > > > > Signed-off-by: Stephane Eranian > > > > Reviewed-by: Ian Rogers > > > > > > Ping. > > > > Check my tmp.perf/core branch, I had to make some adjustments, mostly in > > the 'perf test' entries as I merged a java demangle test that touched > > the same files, > > > > I'm now doing the build tests. > > Talking about build tests, you forgot to add it there, like I did > below, I'll eventually do it, as it is opt-in, no biggie at this point. > > I'll install libpfm-devel that is in fedora and do further tests, later > today. Sorry for that, tbh I wasn't sure what to do. When I test locally I make sure the build is and isn't adding libpfm into the man pages, the libpfm tests pass, some command line uses. It'd be great to automate this as it is not something you'd want to do for every patch and there is some build sensitivity that potentially could break it. Thanks, Ian > - Arnaldo > > commit a01c205e3c4cd6d134317413f2dc3129c4ab7a5a > Author: Arnaldo Carvalho de Melo > Date: Fri May 29 11:31:23 2020 -0300 > > perf build: Add NO_SYSCALL_TABLE=1 to the build tests > > So that we make sure that even on x86-64 and other architectures where > that is the default method we test build the fallback to libaudit that > other architectures use. > > I.e. now this line got added to: > > $ make -C tools/perf build-test > > make_no_syscall_tbl_O: cd . && make NO_SYSCALL_TABLE=1 FEATURES_DUMP=/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j12 O=/tmp/tmp.W0HtKR1mfr DESTDIR=/tmp/tmp.lNezgCVPzW > > $ > > Cc: Adrian Hunter > Cc: Ingo Molnar > Cc: Jiri Olsa > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho de Melo > > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index 29ce0da7fca6..a4ffa3c7fcb6 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -88,6 +88,7 @@ make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1 > make_no_libcrypto := NO_LIBCRYPTO=1 > make_with_babeltrace:= LIBBABELTRACE=1 > make_no_sdt := NO_SDT=1 > +make_no_syscall_tbl := NO_SYSCALL_TABLE=1 > make_with_clangllvm := LIBCLANGLLVM=1 > make_tags := tags > make_cscope := cscope > @@ -113,7 +114,7 @@ make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 > make_minimal += NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 > make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 > make_minimal += NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1 > -make_minimal += NO_LIBCAP=1 > +make_minimal += NO_LIBCAP=1 NO_SYSCALL_TABLE=1 > > # $(run) contains all available tests > run := make_pure > @@ -146,6 +147,7 @@ run += make_no_libbionic > run += make_no_auxtrace > run += make_no_libbpf > run += make_no_libbpf_DEBUG > +run += make_no_syscall_tbl > run += make_with_babeltrace > run += make_with_clangllvm > run += make_help