Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932829AbbGGTzb (ORCPT ); Tue, 7 Jul 2015 15:55:31 -0400 Received: from mail.kernel.org ([198.145.29.136]:46857 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933215AbbGGTy4 (ORCPT ); Tue, 7 Jul 2015 15:54:56 -0400 Date: Tue, 7 Jul 2015 16:54:52 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: ast@plumgrid.com, brendan.d.gregg@gmail.com, daniel@iogearbox.net, namhyung@kernel.org, masami.hiramatsu.pt@hitachi.com, paulus@samba.org, a.p.zijlstra@chello.nl, mingo@redhat.com, jolsa@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org, lizefan@huawei.com, hekuang@huawei.com, xiakaixu@huawei.com, pi3orama@163.com Subject: Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf Message-ID: <20150707195452.GD3135@kernel.org> References: <1435716878-189507-1-git-send-email-wangnan0@huawei.com> <1435716878-189507-24-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435716878-189507-24-git-send-email-wangnan0@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3033 Lines: 88 Em Wed, Jul 01, 2015 at 02:14:11AM +0000, Wang Nan escreveu: > By adding libbpf into perf's Makefile, this patch enables perf to > build libbpf during building if libelf is found and neither NO_LIBELF > nor NO_LIBBPF is set. The newly introduced code is similar to libapi > and libtraceevent building in Makefile.perf. > > MANIFEST is also updated for 'make perf-*-src-pkg'. > > Append make_no_libbpf to tools/perf/tests/make. > > 'bpf' feature check is appended into default FEATURE_TESTS and > FEATURE_DISPLAY, so perf will check API version of bpf in > /path/to/kernel/include/uapi/linux/bpf.h. Which should not fail > except when we are trying to port this code to an old kernel. > > Error messages are also updated to notify users about the disable of > BPF support of 'perf record' if libelf is missed or BPF API check > failed. Much better! [acme@felicio linux]$ am /wb/1.patch Applying: perf tools: Make perf depend on libbpf [perf/ebpf 53ec442e0d44] perf tools: Make perf depend on libbpf Author: Wang Nan 5 files changed, 45 insertions(+), 6 deletions(-) [acme@felicio linux]$ m make: Entering directory `/home/acme/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... bpf: [ on ] CC /tmp/build/perf/arch/common.o CC /tmp/build/perf/util/abspath.o CC /tmp/build/perf/builtin-bench.o Auto-detecting system features: ... libelf: [ on ] ... libelf-getphdrnum: [ on ] ... libelf-mmap: [ on ] ... bpf: [ on ] CC /tmp/build/perf/libbpf.o Just a few nits, perhaps we should add what is the subsystem that is asking for feature detection, so those two lines starting with 'Auto-detecting' would become: Auto-detecting system features for tools/perf/: Auto-detecting system features for tools/lib/bpf/: ------------------------------------ Also we need to reuse the tests, i.e. we're testing 'libelf' twice, once for tools/perf, then for tools/lib/bpf, Jiri? ------------------------------------ Anyway, continuing... - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/