30 Oct, 2015

1 commit

  • Any CFLAGS or LDFLAGS set by the user need to be passed to the feature
    build command. This many include for example -I or -L to point to
    libraries and include files in custom paths.

    In most of the test-*.bin rules in build/feature/Makefile, we use the BUILD
    macro which always sends in CFLAGS and LDFLAGS. The libiberty build line
    however doesn't use the BUILD macro and thus needs to send in CFLAGS and
    LDFLAGS explicitly. Without this, when using custom CFLAGS/LDFLAGS, libiberty
    fails to be detected and the perf link fails with something like:

    LINK perf
    libbfd.a(bfd.o): In function `bfd_errmsg':
    bfd.c:(.text+0x168): undefined reference to `xstrerror'
    bbfd.a(opncls.o): In function `_bfd_new_bfd':
    opncls.c:(.text+0xe8): undefined reference to `objalloc_create'
    ...

    Signed-off-by: Rabin Vincent
    Acked-by: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Rabin Vincent
    Link: http://lkml.kernel.org/r/1446104978-26429-2-git-send-email-rabin.vincent@axis.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Rabin Vincent
     

28 Oct, 2015

1 commit

  • By adding libbpf into perf's Makefile, this patch enables perf to build
    libbpf if libelf is found and neither NO_LIBELF nor NO_LIBBPF is set.

    The newly introduced code is similar to how libapi and libtraceevent
    are wired into Makefile.perf.

    MANIFEST is also updated for 'make perf-*-src-pkg'.

    Append make_no_libbpf to tools/perf/tests/make.

    The 'bpf' feature check is appended into default FEATURE_TESTS and
    FEATURE_DISPLAY, so perf will check the 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 lack of BPF
    support in 'perf record' if libelf is missing or the BPF API check
    failed.

    tools/lib/bpf is added to TAG_FOLDERS to allow us to navigate libbpf
    files when working on perf using tools/perf/tags.

    Signed-off-by: Wang Nan
    Acked-by: Alexei Starovoitov
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: David Ahern
    Cc: He Kuang
    Cc: Jiri Olsa
    Cc: Kaixu Xia
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Zefan Li
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1444826502-49291-2-git-send-email-wangnan0@huawei.com
    [ Document NO_LIBBPF in Makefile.perf, noted by Jiri Olsa ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

20 Oct, 2015

1 commit

  • Commit 7c422f5572667fef0db38d2046ecce69dcf0afc8 ("tools build: Build
    fixdep helper from perf and basic libs") dynamically creates fixdep
    during the perf building. Add it to .gitignore.

    Signed-off-by: Yunlong Song
    Cc: Adrian Hunter
    Cc: Alexei Starovoitov
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Fixes: 7c422f557266 ("tools build: Build fixdep helper from perf and basic libs")
    Link: http://lkml.kernel.org/r/1444899116-8220-1-git-send-email-yunlong.song@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Yunlong Song
     

13 Oct, 2015

1 commit

  • He Kuang the new fixdep tool breaks cross compiling. The reason is it
    wouldn't get compiled under host arch, but under cross arch and failed
    to run.

    We need to add support for host side tools build, meanwhile disabling
    fixdep usage for cross arch builds.

    Reported-by: He Kuang
    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/20151013124358.GB9467@krava.brq.redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

29 Sep, 2015

6 commits

  • Adding the fixdep target into the Makefile.include to ease up building of
    fixdep helper, that needs to be built before we dive in to the build itself.
    The user can invoke the fixdep target to build the helper.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-8-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Making the fixdep helper to be invoked within dep-cmd.

    Each user of the build framework needs to make sure fixdep exists before
    executing the build itself.

    If the build doesn't find fixdep, it falls back to the old style
    dependency tracking.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-6-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • So it's easier to add more functionality in the following commit.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-5-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • For dependency tracking we currently use targets that fall out of the
    gcc -MD command. We store this info in the .cmd file and include as
    makefile during the build.

    This format put object as target and all the c and header files as
    dependencies, like:

    util/abspath.o: util/abspath.c /usr/include/stdc-predef.h util/cache.h \
    /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
    ...

    If any of those dependency header files (krava.h below) is removed the
    build fails on:

    make[1]: *** No rule to make target 'krava.h', needed by 'inc.o'. Stop.

    This patch adds fixdep helper, that is used by kbuild to alter the shape
    of the object dependencies like:

    source_util/abspath.o := util/abspath.c

    deps_util/abspath.o := \
    /usr/include/stdc-predef.h \
    util/cache.h \
    ...

    util/abspath.o: $(deps_util/abspath.o)

    $(deps_util/abspath.o):

    With this format the header removal won't make the build fail, because
    it'll be picked up by the last empty target defined for each header.

    As previously mentioned the fixdep tool is taken from kbuild. It's not
    complete backport, only the part that alters the standard dependency
    info was taken, the part that adds the CONFIG_* dependency logic will be
    probably taken later on.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Kai Germaschewski
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-4-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • The current build framework fails to cope with header file removal. The
    reason is that the removed header file stays in the .cmd file target
    rule and forces the build to fail.

    This issue is fixed and explained in the following patches.

    Adding a new build test that simulates header removal.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • To ease up build framework code setup for users.

    More shared code will be added in the following patches.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1443004442-32660-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

22 Sep, 2015

2 commits

  • We will use the tools/build/ autodetection in the eBPF patchkit
    and it is currently sharing the output directory with perf, that
    also uses the feature detection logic.

    As we keep state in the output directory, so that we can avoid running
    all the tests again, we need to have different filenames for the files
    used in this state, allow doing that via the FEATURE_USER variable, to
    be set alongside the existing FEATURE_{TEST,DISPLAY} variables.

    v2: Fix comment describing the FEATURE_DUMP filename to make sure where
    it is created, precisely at $(OUTPUT)FEATURE-DUMP$(FEATURE_USER).
    Pointed out by Jiri.

    Acked-by: Jiri Olsa
    Cc: Alexei Starovoitov
    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Cc: Wang Nan
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/n/tip-fdbev0vrn3x6idqc3ajbnvcb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Cut'n'paste mistake, it should eval the name of the function
    defined right next to it, in the next line, fix it.

    Before:

    $ make -C tools/lib/bpf/
    make: Entering directory '/home/git/linux/tools/lib/bpf'

    Auto-detecting system features:
    ... libelf: [ on ]
    ... libelf-getphdrnum: [ on ]
    ... libelf-mmap: [ on ]
    ... bpf: [ on ]

    After:

    $ make -C tools/lib/bpf/
    make: Entering directory '/home/git/linux/tools/lib/bpf'

    Auto-detecting system features:
    ... libelf: [ on ]
    ... libelf-getphdrnum: [ OFF ]
    ... libelf-mmap: [ OFF ]
    ... bpf: [ on ]

    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Alexei Starovoitov
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Cc: Wang Nan
    Cc: pi3orama@163.com
    Fixes: 58d4f00ff13f ("perf build: Fix feature_check name clash")
    Link: http://lkml.kernel.org/n/tip-dzu1c4sruukgfq5d5b1c4r30@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

18 Sep, 2015

2 commits

  • The auxtrace code needed by Intel PT uses the __get_cpuid() gcc builtin,
    that is not present in old systems, breaking the build.

    Add a test to check for that builtin and disable AUXTRACE in those
    systems.

    [acme@rhel5 linux]$ make NO_LIBPERL=1 -C tools/perf O=/tmp/build/perf install-bin
    make: Entering directory `/home/acme/git/linux/tools/perf'
    BUILD: Doing 'make -j2' parallel build

    Auto-detecting system features:

    ... lzma: [ on ]
    ... get_cpuid: [ OFF ]

    config/Makefile:630: Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc
    MKDIR /tmp/build/perf/util/

    This fixes the build on old systems such as RHEL/CentOS 5.11.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: "Naveen N. Rao"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Cc: Stephane Eranian
    Cc: Victor Kamensky
    Cc: Vinson Lee
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-d4puslul0jltoodzpx9r4sje@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The existing numa test checks only if numa.h and numa_available() are
    present, but that can be satisfied with an old libnuma that is not
    enough for the 'perf bench numa' entry, so add a test to check for that:

    [acme@rhel5 linux]$ make NO_AUXTRACE=1 NO_LIBPERL=1 -C tools/perf O=/tmp/build/perf install-bin
    make: Entering directory `/home/acme/git/linux/tools/perf'
    BUILD: Doing 'make -j2' parallel build

    Auto-detecting system features:
    ... libelf: [ on ]
    ... libnuma: [ on ]
    ... numa_num_possible_cpus: [ OFF ]
    ... libperl: [ on ]


    config/Makefile:577: Old numa library found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev >= 2.0.8
    INSTALL binaries

    This fixes the build on old systems such as RHEL/CentOS 5.11.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: "Naveen N. Rao"
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Cc: Stephane Eranian
    Cc: Victor Kamensky
    Cc: Vinson Lee
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-zqriqkezppi2de2iyjin1tnc@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Aug, 2015

1 commit

  • It's sometimes useful to specify the object affiliation to multiple
    config options like:

    libperf-$(CONFIG_X86) += tsc.o
    libperf-$(CONFIG_AUXTRACE) += tsc.o

    while the object itself is linked only once. Adding the support for this
    and ignoring duplicate objects in the object list.

    Suggested-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Sukadev Bhattiprolu
    Link: http://lkml.kernel.org/r/20150826130103.GF22670@krava.redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

17 Aug, 2015

1 commit

  • Add support for decoding instructions for Intel Processor Trace. The
    kernel x86 instruction decoder is copied for this.

    This essentially provides intel_pt_get_insn() which takes a binary
    buffer, uses the kernel's x86 instruction decoder to get details of the
    instruction and then categorizes it for consumption by an Intel PT
    decoder.

    Signed-off-by: Adrian Hunter
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1439450095-30122-1-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

14 Aug, 2015

1 commit

  • The Fedora 22 version of libdw requires a couple of extra libraries to
    link. With a dynamic link the dependencies are pulled in automatically,
    but this doesn't work for static linking. Add the needed libraries
    explicitely to the feature probe and the Makefile.

    v2: Explicitly check for static linking and only add the dependencies
    when -static is set. This is to avoid regressions on Arnaldo's system.

    Signed-off-by: Andi Kleen
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1439419717-20601-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

07 Aug, 2015

1 commit

  • This is the first patch of libbpf. The goal of libbpf is to create a
    standard way for accessing eBPF object files. This patch creates
    'Makefile' and 'Build' for it, allows 'make' to build libbpf.a and
    libbpf.so, 'make install' to put them into proper directories.
    Most part of Makefile is borrowed from traceevent.

    Before building, it checks the existence of libelf in Makefile, and deny
    to build if not found. Instead of throwing an error if libelf not found,
    the error raises in a phony target "elfdep". This design is to ensure
    'make clean' still workable even if libelf is not found.

    Because libbpf requires 'kern_version' field set for 'union bpf_attr'
    (bpfdep" is used for that dependency), Kernel BPF API is also checked
    by intruducing a new feature check 'bpf' into tools/build/feature,
    which checks the existence and version of linux/bpf.h. When building
    libbpf, it searches that file from include/uapi/linux in kernel source
    tree (controlled by FEATURE_CHECK_CFLAGS-bpf). Since it searches kernel
    source tree it reside, installing of newest kernel headers is not
    required, except we are trying to port these files to an old kernel.

    To avoid checking that file when perf building, the newly introduced
    'bpf' feature check doesn't added into FEATURE_TESTS and
    FEATURE_DISPLAY by default in tools/build/Makefile.feature, but added
    into libbpf's specific.

    Signed-off-by: Wang Nan
    Acked-by: Alexei Starovoitov
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: David Ahern
    Cc: He Kuang
    Cc: Jiri Olsa
    Cc: Kaixu Xia
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Zefan Li
    Bcc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1435716878-189507-4-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

06 Aug, 2015

1 commit

  • linux/tools$ make ARCH=mips CROSS_COMPILE=mipsel-linux- perf
    ...
    config/Makefile:256: *** No gnu/libc-version.h found, please install
    glibc-dev[el]. Stop.
    make[1]: *** [all] Error 2
    make: *** [perf] Error 2

    ...
    In file included from builtin-sched.c:13:0:
    util/cloexec.h:8:12: error: redundant redeclaration of ‘sched_getcpu’
    [-Werror=redundant-decls]
    extern int sched_getcpu(void) __THROW;

    mipsel-buildroot-linux-uclibc/sysroot/usr/include/bits/sched.h:88:12:
    note: previous declaration of ‘sched_getcpu’ was here
    extern int sched_getcpu (void) __THROW;

    uclibc info:
    sysroot/usr/include/bits/uClibc_config.h
    __UCLIBC_MAJOR__ 0
    __UCLIBC_MINOR__ 9
    __UCLIBC_SUBLEVEL__ 33

    sysroot/usr/include/features.h
    __UCLIBC__ 1
    __GLIBC__ 2
    __GLIBC_MINOR__ 2

    Signed-off-by: Petri Gynther
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1438735081-24131-1-git-send-email-pgynther@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Petri Gynther
     

02 Jul, 2015

1 commit

  • Create config.detected into OUTPUT directory instead of source
    directory.

    This fixes parallel builds that share the same source directory.

    Signed-off-by: Aaro Koskinen
    Acked-by: Jiri Olsa
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1435751683-18500-1-git-send-email-aaro.koskinen@nokia.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Aaro Koskinen
     

23 Jun, 2015

1 commit

  • Pull perf fixes from Ingo Molnar:
    "These are the left over fixes from the v4.1 cycle"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tools: Fix build breakage if prefix= is specified
    perf/x86: Honor the architectural performance monitoring version
    perf/x86/intel: Fix PMI handling for Intel PT
    perf/x86/intel/bts: Fix DS area sharing with x86_pmu events
    perf/x86: Add more Broadwell model numbers
    perf: Fix ring_buffer_attach() RCU sync, again

    Linus Torvalds
     

20 Jun, 2015

1 commit

  • Invoking Makefile.perf with prefix= breaks the build since Makefile.perf
    hands that variable down to Makefile.build where it overrides

    prefix := $(subst ./,,$(OUTPUT)$(dir)/)

    leading to errors like this:

    No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o'

    Signed-off-by: Lukas Wunner
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5
    Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@mx.google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Lukas Wunner
     

29 May, 2015

1 commit

  • Allow nesting into directories without Build file. Currently we force
    include of the Build file, which fails the build when the Build file is
    missing.

    We already support empty *-in.o' objects if there's nothing in the
    directory to be compiled, so we can just use it for missing Build file
    cases.

    Also adding this case under tests.

    Reported-by: Rabin Vincent
    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rabin Vincent
    Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

18 May, 2015

1 commit

  • Replace strong binding of FEATURE_TESTS and FEATURE_DISPLAY by weak
    binding. This patch enables other makefiles which include
    tools/build/Makefile.feature enable only limited feathres to check.

    Signed-off-by: Wang Nan
    Acked-by: Jiri Olsa
    Cc: Alexei Starovoitov
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: pi3orama@163.com
    Cc: Zefan Li
    Link: http://lkml.kernel.org/r/1431860222-61636-5-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

22 Mar, 2015

2 commits

  • Will be used to decompress 'xz' objects. The check detects
    the liblzma.so devel library normally delivered by xz package.

    Signed-off-by: Jiri Olsa
    Acked-by: Namhyung Kim
    Cc: Adrian Hunter
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian

    Jiri Olsa
     
  • Moving feature checks code under tools/build directory.

    Changing also $feature_dir to point to new feature directory location
    and perf Makefiles to include Makefile.feature from new location.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-3lamtb30dhf4wo99y1n8kxg0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

13 Feb, 2015

2 commits

  • Get more verbose output wrt displaying executed commands from make.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-68v67h59zoz7ilb1ggcuff3j@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add support to build single targets, like:

    $ make util/map.o # objects
    $ make util/map.i # preprocessor
    $ make util/map.s # assembly

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-tt10y0dmweq6rjaod937rpb4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

12 Feb, 2015

4 commits

  • Move the util objects building under build framework.

    Add the new libperf build object so it's separated from the rest of the
    perf code and could be librarized.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-574tgt9t23tnxo9td8qjiibc@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add support to make directory any time we build objects out of the tree
    (O=/tmp/krava) and the output directory does not exist.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-h80ukls4o2kpr0e4c4bfln6u@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Adding support to include detected configuration makefile into the build
    process. This will allow the Build objects to be configurable based on
    the config data, like:

    perf-$(CONFIG_KRAVA) += krava.o

    The configuration is stored in '.config-detected' file, which is
    generated for each compilation.

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-bl8qho0ubck7aqrbbfu9inlm@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Adding new build framework into 'tools/build' to be used by tools.

    There's no change for actual building at this point, it comes in the
    next patches.

    The idea and more details are explained in the
    'tools/build/Documentation/Build.txt' file.

    I adopted everything from the kernel build system, with some changes to
    allow for multiple binaries build definitions.

    While the kernel's build output is single image (forget modules) we need
    to be able to build several binaries/libraries.

    The basic idea is that sser provides 'Build' files with objects
    definitions like:

    perf-y += a.o
    perf-y += b.o
    libperf-y += c.o
    libperf-y += d.o

    and the build framework outputs files:

    perf-in.o # a.o, b.o compiled in
    libperf-in.o # c.o, d.o compiled in

    Signed-off-by: Jiri Olsa
    Tested-by: Sukadev Bhattiprolu
    Tested-by: Will Deacon
    Cc: Alexis Berlemont
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-fbj22h4av0otlxupwcmrxgpa@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa