From patchwork Wed May 6 15:22:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 219770 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 98FBFC47256 for ; Wed, 6 May 2020 15:26:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A57B21655 for ; Wed, 6 May 2020 15:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778797; bh=HQIi62eI5uJmn6coUVV8nyrKXTDFX1QMzIdp0OWglVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Yk843iG0vF7N24R7I1zOsjBhkfgA1q0SD45wE9qa2lF+L5pljO2vGrnJuI+vY+E4E B0yQsBSNAxPXFs593b2efweN3itVAk8zoiC9j43ohGUvxEOIypa6yZ8WiSshXjdmre QMBsDATzehUTHVLUptk/dTOC9y4hna8komeQmMsA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730188AbgEFP0e (ORCPT ); Wed, 6 May 2020 11:26:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:48250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730161AbgEFP0W (ORCPT ); Wed, 6 May 2020 11:26:22 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8848E20B1F; Wed, 6 May 2020 15:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778781; bh=HQIi62eI5uJmn6coUVV8nyrKXTDFX1QMzIdp0OWglVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TN/A357UBRiY1GCk960pbOptCKbp3MwIjngdR+4c6+yb1ozylFQqHuBa66W81AO/X EuVe4joht7jPWliaZ7XhTwJwUUkUtnrL+LELaxuNXmYbhkAr6DK/k1nqENw/aMA4Gv ycvyuBTx19MWMEsrTzI4hvNfnWck5wpfOK7V2Ea4= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Ian Rogers , Jiri Olsa , Adrian Hunter , Alexander Shishkin , Alexei Starovoitov , Alexey Budankov , Andi Kleen , Andrii Nakryiko , Daniel Borkmann , Florian Fainelli , Greg Kroah-Hartman , Igor Lubashev , Jin Yao , Jiwei Sun , John Garry , Kan Liang , Leo Yan , Mark Rutland , Martin KaFai Lau , Peter Zijlstra , Stephane Eranian , Yonghong Song , bpf@vger.kernel.org, netdev@vger.kernel.org, yuzhoujian , Arnaldo Carvalho de Melo Subject: [PATCH 64/91] perf doc: Pass ASCIIDOC_EXTRA as an argument Date: Wed, 6 May 2020 12:22:07 -0300 Message-Id: <20200506152234.21977-65-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200506152234.21977-1-acme@kernel.org> References: <20200506152234.21977-1-acme@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ian Rogers commit e9cfa47e687d ("perf doc: allow ASCIIDOC_EXTRA to be an argument") allowed ASCIIDOC_EXTRA to be passed as an option to the Documentation Makefile. This change passes ASCIIDOC_EXTRA, set by detected features or command line options, prior to doing a Documentation build. This is necessary to allow conditional compilation, based on configuration variables, in asciidoc code. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Alexey Budankov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Igor Lubashev Cc: Jin Yao Cc: Jiwei Sun Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Cc: yuzhoujian Link: http://lore.kernel.org/lkml/20200429231443.207201-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index d15a311408f1..94a495594e99 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -188,7 +188,7 @@ AWK = awk # non-config cases config := 1 -NON_CONFIG_TARGETS := clean python-clean TAGS tags cscope help install-doc install-man install-html install-info install-pdf doc man html info pdf +NON_CONFIG_TARGETS := clean python-clean TAGS tags cscope help ifdef MAKECMDGOALS ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) @@ -832,7 +832,7 @@ INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html # 'make doc' should call 'make -C Documentation all' $(DOC_TARGETS): - $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:doc=all) + $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:doc=all) ASCIIDOC_EXTRA=$(ASCIIDOC_EXTRA) TAG_FOLDERS= . ../lib ../include TAG_FILES= ../../include/uapi/linux/perf_event.h @@ -959,7 +959,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): - $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:-doc=) + $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:-doc=) ASCIIDOC_EXTRA=$(ASCIIDOC_EXTRA) ### Cleaning rules From patchwork Wed May 6 15:22:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 219769 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 93EF4C4724C for ; Wed, 6 May 2020 15:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7350E2068E for ; Wed, 6 May 2020 15:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778915; bh=jGOTpCXWr3wQ4TFvH8say5n5l0hIGbXFTCn/0tUritE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nCIdpEte1y6d/MvAy+LCZySdt24Y3Cl0wD9wUKHv6J4ideuxDRP9RC3xU9V4vjm4Q Sqi6hmJFqP8Z/dB6WqCHwzCXi+Jak5B2SOA9NtL5k5tZ46lUMtcjB1F5ZpcyPeifkU la1IOlgcOloDRJ+umr69LsATs7Wv5z3/bRE2p2fA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730387AbgEFP2d (ORCPT ); Wed, 6 May 2020 11:28:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:48514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729374AbgEFP03 (ORCPT ); Wed, 6 May 2020 11:26:29 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EB8920A8B; Wed, 6 May 2020 15:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778788; bh=jGOTpCXWr3wQ4TFvH8say5n5l0hIGbXFTCn/0tUritE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LWMqc4rAYVVojKQlTak64/susOeSZK6J40whWh64tHcTsob1xAICDHMSYPDW6nS9o C+y/92ZjDrTHVUOnxdN97h0N7G/yUK86KjAaULFp3/F2S36kPoJlW8Qcf2idQcRBla RCqhzdb0FW5XuRcmVv78ue+eh/M+8uf6ZC/jwGqA= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Stephane Eranian , Ian Rogers , Jiri Olsa , Adrian Hunter , Alexander Shishkin , Alexei Starovoitov , Alexey Budankov , Andi Kleen , Andrii Nakryiko , Daniel Borkmann , Florian Fainelli , Greg Kroah-Hartman , Igor Lubashev , Jin Yao , Jiwei Sun , John Garry , Kan Liang , Leo Yan , Mark Rutland , Martin KaFai Lau , Peter Zijlstra , Yonghong Song , bpf@vger.kernel.org, netdev@vger.kernel.org, yuzhoujian , Arnaldo Carvalho de Melo Subject: [PATCH 65/91] tools feature: Add support for detecting libpfm4 Date: Wed, 6 May 2020 12:22:08 -0300 Message-Id: <20200506152234.21977-66-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200506152234.21977-1-acme@kernel.org> References: <20200506152234.21977-1-acme@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Stephane Eranian libpfm4 provides an alternate command line encoding of perf events. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Alexey Budankov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Igor Lubashev Cc: Jin Yao Cc: Jiwei Sun Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Cc: yuzhoujian Link: http://lore.kernel.org/lkml/20200429231443.207201-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/Makefile.feature | 3 ++- tools/build/feature/Makefile | 6 +++++- tools/build/feature/test-libpfm4.c | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tools/build/feature/test-libpfm4.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 3e0c019ef297..3abd4316cd4f 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -98,7 +98,8 @@ FEATURE_TESTS_EXTRA := \ llvm \ llvm-version \ clang \ - libbpf + libbpf \ + libpfm4 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 92012381393a..84f845b9627d 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -69,7 +69,8 @@ FILES= \ test-libaio.bin \ test-libzstd.bin \ test-clang-bpf-global-var.bin \ - test-file-handle.bin + test-file-handle.bin \ + test-libpfm4.bin FILES := $(addprefix $(OUTPUT),$(FILES)) @@ -331,6 +332,9 @@ $(OUTPUT)test-clang-bpf-global-var.bin: $(OUTPUT)test-file-handle.bin: $(BUILD) +$(OUTPUT)test-libpfm4.bin: + $(BUILD) -lpfm + ############################### clean: diff --git a/tools/build/feature/test-libpfm4.c b/tools/build/feature/test-libpfm4.c new file mode 100644 index 000000000000..af49b259459e --- /dev/null +++ b/tools/build/feature/test-libpfm4.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include + +int main(void) +{ + pfm_initialize(); + return 0; +}