07 Mar, 2020

1 commit

  • When I tried to compile tools/perf from the top directory with the -C
    option, the O= option didn't work correctly if I passed a relative path:

    $ make O=BUILD -C tools/perf/
    make: Entering directory '/home/mhiramat/ksrc/linux/tools/perf'
    BUILD: Doing 'make -j8' parallel build
    ../scripts/Makefile.include:4: *** O=/home/mhiramat/ksrc/linux/tools/perf/BUILD does not exist. Stop.
    make: *** [Makefile:70: all] Error 2
    make: Leaving directory '/home/mhiramat/ksrc/linux/tools/perf'

    The O= directory existence check failed because the check script ran in
    the build target directory instead of the directory where I ran the make
    command.

    To fix that, once change directory to $(PWD) and check O= directory,
    since the PWD is set to where the make command runs.

    Fixes: c883122acc0d ("perf tools: Let O= makes handle relative paths")
    Reported-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Cc: Andrew Morton
    Cc: Borislav Petkov
    Cc: Geert Uytterhoeven
    Cc: Jiri Olsa
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Sasha Levin
    Cc: Steven Rostedt (VMware)
    Cc: stable@vger.kernel.org
    Link: http://lore.kernel.org/lkml/158351957799.3363.15269768530697526765.stgit@devnote2
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu
     

20 Aug, 2018

1 commit

  • The Yocto build system does a 'make clean' when rebuilding due to
    changed dependencies, and that consistently fails for me (causing the
    whole BSP build to fail) with errors such as

    | find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
    | find: '[...]/perf/1.0-r9/perf-1.0/plugin_mac80211.so': No such file or directory
    | find: find: '[...]/perf/1.0-r9/perf-1.0/libtraceevent.a''[...]/perf/1.0-r9/perf-1.0/libtraceevent.a': No such file or directory: No such file or directory
    |
    [...]
    | find: cannot delete '/mnt/xfs/devel/pil/yocto/tmp-glibc/work/wandboard-oe-linux-gnueabi/perf/1.0-r9/perf-1.0/util/.pstack.o.cmd': No such file or directory

    Apparently (despite the comment), 'make clean' ends up launching
    multiple sub-makes that all want to remove the same things - perhaps
    this only happens in combination with a O=... parameter. In any case, we
    don't lose much by explicitly disabling the parallelism for the clean
    target, and it makes automated builds much more reliable.

    Signed-off-by: Rasmus Villemoes
    Acked-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180705131527.19749-1-linux@rasmusvillemoes.dk
    Signed-off-by: Arnaldo Carvalho de Melo

    Rasmus Villemoes
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Feb, 2016

2 commits

  • Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-jhmnf9g7y9ryqcjql00unk5y@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Do not parallelize 'clean' with other targets, figure out if it is
    present and do it first, then the other targets.

    Noticed with:

    tools/perf> make -j24 clean all

    LD arch/libperf-in.o
    LD plugin_xen-in.o
    arch//libperf-in.o: file not recognized: File truncated
    make[3]: *** [arch/libperf-in.o] Error 1
    make[2]: *** [arch] Error 2
    make[2]: *** Waiting for unfinished jobs....
    AR libapi.a

    Reported-and-Tested-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa
    Acked-by: Wang Nan
    Link: http://lkml.kernel.org/n/tip-kb0qs29zbz7hxn32mc5zbsoz@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

30 Jan, 2016

2 commits

  • The 'tools/perf/test/make' makefile has in its default, 'all' target
    builds that will pollute the source code directory, i.e. that will not
    use O= variable.

    The 'build-test' should be run as often as possible, preferrably after
    each non strictly non-code commit, so speed it up by selecting just
    the O= targets.

    Furthermore it tests both the Makefile.perf file, that is normally
    driven by the main Makefile, and the Makefile, reduce the time in half
    by having just MK=Makefile, the most usual, tested by 'build-test'.

    Please run:

    make -C tools/perf -f tests/make

    from time to time for testing also the in-place build tests.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-jrt9utscsiqkmjy3ccufostd@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To prevent the feature check tests to run repeately, one time per
    'tests/make' target/test, this patch utilizes the previously introduced
    'feature-dump' make target and FEATURES_DUMP variable, making sure that
    the feature checkers run only once when doing build-test for normal test
    cases.

    However, since standard users doesn't reuse features dump result, we'd
    better give an option to check their behaviors. The above feature
    should be used to make build-test faster only. Only utilize it for
    build-test.

    Signed-off-by: Wang Nan
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1454068269-235999-1-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

05 Nov, 2015

1 commit

  • Those tests take a long time and sometimes we stop it, so allow randomly
    shuffling the tests so that we have a better chance of running more of
    them in partial 'make build-test' runs.

    Using it just on the 'build-test' target, i.e.:

    make -C tools/perf build-test

    Is equivalent to:

    make SHUF=1 -C tools/perf -f tests/make

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ey7461i9q4k8u0987j8guun6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

22 Jun, 2015

1 commit

  • Currently if we build a single target like:

    $ touch util/map.c && make util/map.o

    It will not rebuild util/map.o if it already exists and util/map.c is
    modified.

    The reason is that the top-level 'Makefile' processes util/map.o as an
    implicit rule and if util/map.o exists make considers the 'util/map.o'
    target as done and will not nest into Makefile.perf.

    Adding FORCE for '%', because that's what we want to nest into
    Makefile.perf for any target.

    Adding Makefile into phony targets, because make tries to rebuild it and
    it's also resolved as '%' target.

    Signed-off-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Lukas Wunner
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1434977452-32520-4-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

04 May, 2015

1 commit

  • Parsing /proc/cpuinfo is a fiddly, arch-dependent business and a recent
    change to get it working for Sparc broke arm and arm64 platforms.

    Use sysconf to determine the number of online CPUs only parsing
    /proc/cpuinfo when sysconf is not available.

    Signed-off-by: Will Deacon
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Mark Rutland
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20150423140454.GJ1652@arm.com
    [ Made it fall back to parsing /proc when getconf not found ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Will Deacon
     

26 Mar, 2015

1 commit

  • Number of JOBS to use is set automatically to the number of processors found
    in /proc/cpuinfo. SPARC uses 'CPU' lines rather than 'processor'. Update the
    check in perf's Makefile to work for SPARC.

    Signed-off-by: David Ahern
    Acked-by: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1427213455-127249-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

02 Mar, 2015

1 commit

  • If JOBS is not by user perf tries to autodetect the number by grepping
    the number of CPUs from /proc/cpuinfo. 'grep -c' will always return an
    integer so after this command JOBS should be compared to 0, not "".

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1424303971-91904-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

17 Jan, 2014

1 commit

  • Currently various build test can be performed using a Makefile named
    tests/make, so one needs to remember and specify it with -f option on
    command line.

    Add the 'build-test' target in the main Makefile as a shortcut.

    Signed-off-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1389837173-3632-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

28 Nov, 2013

1 commit

  • Once the tags/TAGS file is generated it's never rebuilt until it's
    removed by hand.

    The reason is that the Makefile does not treat tags/TAGS as targets but
    as files and thus won't rebuilt them once they are in place.

    Adding PHONY tags/TAGS targets into Makefile.

    Signed-off-by: Jiri Olsa
    Acked-by: Ingo Molnar
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/20131126125412.GJ1267@krava.brq.redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

14 Oct, 2013

2 commits

  • Arnaldo reported that 'make DEBUG=1' does not work anymore.

    The reason is that 'Makefile' only passes it through to
    'Makefile.perf' via the environment, but 'Makefile.perf'
    checks that it's a command line option:

    ifeq ("$(origin DEBUG)", "command line")
    PERF_DEBUG = $(DEBUG)
    endif

    So pass it through properly, and also clean up DEBUG parameter
    handling while at it and fix a couple of annoyances:

    - DEBUG=0 used to be interpreted as 'debugging on'. Turn it
    into 'debugging off' instead.

    - Same was the case for 'DEBUG=' - turn that into debug-off
    as well.

    - Pass in just a clean, sanitized 'DEBUG' value and get rid of
    the intermediate, unnecessary PERF_DEBUG variable.

    Reported-by: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • Arnaldo reported that non-existent build directories were not
    recognized properly. The reason is readlink failure causing 'O'
    to become empty.

    Solve it by passing through the 'O' variable unmodified if
    readlink fails.

    Reported-by: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20131009150023.GA10167@gmail.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

11 Oct, 2013

1 commit

  • The various build lines from libtraceevent and perf mix up during a
    parallel build and produce unaligned output like:

    CC builtin-buildid-list.o
    CC builtin-buildid-cache.o
    CC builtin-list.o
    CC FPIC trace-seq.o
    CC builtin-record.o
    CC FPIC parse-filter.o
    CC builtin-report.o
    CC builtin-stat.o
    CC FPIC parse-utils.o
    CC FPIC kbuffer-parse.o
    CC builtin-timechart.o
    CC builtin-top.o
    CC builtin-script.o
    BUILD STATIC LIB libtraceevent.a
    CC builtin-probe.o
    CC builtin-kmem.o
    CC builtin-lock.o

    To solve this, harmonize all the build message alignments to be similar
    to the kernel's kbuild output: prefixed by two spaces and 11-char wide.

    After the patch the output looks pretty tidy, even if output lines get
    mixed up:

    CC builtin-annotate.o
    FLAGS: * new build flags or cross compiler
    CC builtin-bench.o
    AR liblk.a
    CC bench/sched-messaging.o
    CC FPIC event-parse.o
    CC bench/sched-pipe.o
    CC FPIC trace-seq.o
    CC bench/mem-memcpy.o
    CC bench/mem-memset.o
    CC FPIC parse-filter.o
    CC builtin-diff.o
    CC builtin-evlist.o
    CC builtin-help.o

    Signed-off-by: Ingo Molnar
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1381312169-17354-3-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

09 Oct, 2013

8 commits

  • This was a long-standing bug, relative pathnames like O=dir did not fully
    work in the build system:

    $ make O=localdir clean

    SUBDIR Documentation
    ../../scripts/Makefile.include:3: *** O=localdir does not exist. Stop.
    make[1]: *** [clean] Error 2
    make: *** [clean] Error 2

    Fix this by canonizing the directory before passing it to Makefile.perf.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-hchMp1hozn9tqgswWcooxcru@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • In case the user specifies MAKEFLAGS as an environment variable,
    or uses 'make -jN' explicitly, the options can conflict and result in:

    BUILD: Doing 'make -j8' parallel build
    make[1]: warning: -jN forced in submake: disabling jobserver mode.
    GEN common-cmds.h
    make[1]: *** write jobserver: Bad file descriptor. Stop.

    Make sure we invoke the main makefile in a pristine state.

    Users who want to do something non-standard can use the:

    make -f Makefile.perf

    method to invoke the makefile.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-uen6hzTvkqqngqwjma9yoEgw@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Jiri reported that 'make .o' stopped working:

    > [jolsa@krava perf]$ make -f Makefile perf.o
    > cc -c -o perf.o perf.c
    > In file included from builtin.h:4:0,
    > from perf.c:9:
    > util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
    > compilation terminated.
    > make: *** [perf.o] Error 1

    This is due to GNU make having built-in rules for popular targets such
    as *.o. Clear them out so that all targets as passed through to Makefile.perf.

    Reported-by: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Link: http://lkml.kernel.org/n/tip-5wkuvmlaaxtfgepKcvRij8sh@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-mky0rtpwxi3ivxsvdjoOEmhr@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • To make it more apparent that there is not change in functionality we introduced
    Makefile.parallel separately and now flip it with the main Makefile, which
    moves into Makefile.perf.

    The renames are:

    Makefile.parallel => Makefile
    Makefile => Makefile.perf

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-igRfuw9ugbnnpixLd6wpptzl@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • config/Makefile is not included for the 'clean' target, so invoke the
    config/feature-checks/Makefile 'clean' target from Makefile.perf.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-sh2cGvmsjbrazarlqre7pVwt@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • libtraceevent.a and liblk.a rules have always-missed dependencies,
    which causes python.so to be relinked at every build attempt - even
    if none of the affected code changes.

    This slows down re-builds unnecessarily, by adding more than a second
    to the build time:

    comet:~/tip/tools/perf> time make

    ...

    SUBDIR /fast/mingo/tip/tools/lib/lk/
    make[1]: `liblk.a' is up to date.
    SUBDIR /fast/mingo/tip/tools/lib/traceevent/
    LINK perf
    GEN python/perf.so

    real 0m1.701s
    user 0m1.338s
    sys 0m0.301s

    Add the (trivial) dependencies to not force a re-link.

    This speeds up an empty re-build enormously:

    comet:~/tip/tools/perf> time make

    ...

    real 0m0.207s
    user 0m0.134s
    sys 0m0.028s

    [ This adds some coupling between the build dependencies of
    libtraceevent and liblk - but until those stay relatively
    simple this should not be an issue. ]

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-wvmlrurufuk6mo1ovtNigguT@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • util/PERF-VERSION-GEN is currently executed on every build attempt,
    and this script can take a lot of time on trees that are at a
    significant git-distance from Linus's tree:

    $ time util/PERF-VERSION-GEN

    real 0m4.343s
    user 0m4.176s
    sys 0m0.140s

    It also takes a lot of time if the Git repository is network attached, etc.,
    because the commands it uses:

    TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null )

    has to count commits from the nearest tag and thus has to access (and
    decompress) every git commit blob on the relevant version path.

    Even on Linus's tree it takes 0.28 seconds on a fast box to count all the
    commits and get the git version string:

    $ time util/PERF-VERSION-GEN

    real 0m0.279s
    user 0m0.247s
    sys 0m0.025s

    But the version string only has to be regenerated if the git repository's
    head commit changes. So add a dependency of ../../.git/HEAD and touch
    the file every time it's regenerated, so that Make's build rules can
    pick it up and cache the result:

    make: `PERF-VERSION-FILE' is up to date.

    real 0m0.184s
    user 0m0.117s
    sys 0m0.026s

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-wvmlrurufuk6mo1ovtNigguT@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

05 Oct, 2013

1 commit

  • Doing a fresh install on a user home directory needs to first make sure
    that the ~/libexec/perf-core/ directory is present so that
    'perf-archive' like scripts, 'perf test' attr config files and 'perf
    script' scripts can be installed.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-z7ryi3r1b9dn9smbfnab0fdc@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 Sep, 2013

1 commit

  • Add a test for parsing a non-sample event when there is more than one
    selected event but no sample_id_all bit set.

    The test fails because of a bug in the evlist logic. That is fixed in a
    separate patch.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1378325897-3840-2-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

03 Sep, 2013

1 commit

  • Add a test for the newly added PERF_COUNT_SW_DUMMY event. The test
    checks that tracking events continue when an event is disabled but a
    dummy software event is not disabled.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Tested-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1377975053-3811-4-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

30 Aug, 2013

2 commits

  • Add a test that checks that sample parsing is correctly implemented.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1377591794-30553-12-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • perf_evlist__config() must be moved to a separate source file to avoid
    Python link errors when adding support for PERF_SAMPLE_IDENTIFIER.

    It is appropriate to do this because perf_evlist__config() is a helper
    function for event recording. It is used by tools to apply recording
    options to perf_evlist. It is not used by the Python API.

    Signed-off-by: Adrian Hunter
    Acked-by: Namhyung Kim
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1377591794-30553-7-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

27 Aug, 2013

1 commit


08 Aug, 2013

1 commit

  • Using the information in mmap events, perf tools can read object code
    associated with sampled addresses. A test is added that compares bytes
    read by perf with the same bytes read using objdump.

    Signed-off-by: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1375875537-4509-2-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

23 Jul, 2013

1 commit

  • The test uses the newly added cap_usr_time_zero and time_zero of
    perf_event_mmap_page. TSC from rdtsc is compared with the time
    from 2 perf events. The test passes if the calculated times are
    all in the correct order.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1372425741-1676-4-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Ingo Molnar

    Adrian Hunter
     

22 Jul, 2013

1 commit

  • perl.h from new Perl release doesn't like -Wundef and -Wswitch-default:

    /usr/lib/perl5/core_perl/CORE/perl.h:548:5: error: "SILENT_NO_TAINT_SUPPORT" is not defined [-Werror=undef]
    #if SILENT_NO_TAINT_SUPPORT && !defined(NO_TAINT_SUPPORT)
    ^
    /usr/lib/perl5/core_perl/CORE/perl.h:556:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
    #if NO_TAINT_SUPPORT
    ^
    In file included from /usr/lib/perl5/core_perl/CORE/perl.h:3471:0,
    from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/sv.h:1455:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
    #if NO_TAINT_SUPPORT
    ^
    In file included from /usr/lib/perl5/core_perl/CORE/perl.h:3472:0,
    from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/regexp.h:436:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
    #if NO_TAINT_SUPPORT
    ^
    In file included from /usr/lib/perl5/core_perl/CORE/hv.h:592:0,
    from /usr/lib/perl5/core_perl/CORE/perl.h:3480,
    from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:222:3: error: switch missing default case [-Werror=switch-default]
    switch( left )
    ^
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_superfast’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:274:5: error: switch missing default case [-Werror=switch-default]
    switch (rem) { \
    ^
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_murmur3’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:398:5: error: switch missing default case [-Werror=switch-default]
    switch(bytes_in_carry) { /* how many bytes in carry */
    ^

    Let's disable the warnings for code which uses perl.h.

    Signed-off-by: Kirill A. Shutemov
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1372063394-20126-1-git-send-email-kirill@shutemov.name
    Signed-off-by: Arnaldo Carvalho de Melo

    Kirill A. Shutemov
     

17 Jul, 2013

1 commit

  • Boris just raised another variant of building perf tools which is
    broken:

    $ make tools/perf
    ...
    LINK /home/robert/cx/linux/tools/perf/perf
    gcc: error: ../linux/tools/lib/lk/liblk.a: No such file or directory

    The variant wasn't considered by:

    107de37 perf tools: Fix build errors with O and DESTDIR make vars set

    There are other variant of building perf too:

    $ make -C tools perf
    $ make -C tools/perf

    Plus variants with O= and DESTDIR set.

    This patch fixes the above and was tested with the following:

    $ make O=... DESTDIR=... tools/perf
    $ make O=... DESTDIR=... -C tools/ perf
    $ make O=... DESTDIR=... -C tools/perf
    $ make tools/perf
    $ make -C tools/ perf
    $ make -C tools/perf

    Reported-by: Borislav Petkov
    Signed-off-by: Robert Richter
    Signed-off-by: Robert Richter
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Thomas Gleixner
    Cc: linux-tip-commits@vger.kernel.org
    Link: http://lkml.kernel.org/r/20130716145036.GH8731@rric.localhost
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     

13 Jul, 2013

1 commit

  • Header files of libtraceevent or no longer local headers. Thus, use
    default path notation for them. Also removing extra traceevent include
    path and instead handle this similar to liblk.

    Signed-off-by: Robert Richter
    Signed-off-by: Robert Richter
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Robert Richter
    Link: http://lkml.kernel.org/r/1370964558-8599-1-git-send-email-rric@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     

09 Jul, 2013

1 commit

  • Fixing build errors with O and DESTDIR make vars set:

    $ make prefix=/usr/local O=$builddir DESTDIR=$destdir -C tools/ perf
    ...
    make[1]: Entering directory `.../.source/perf/tools/perf'
    CC .../.build/perf/perf/util/parse-events.o
    util/parse-events.c:14:32: fatal error: parse-events-bison.h: No such file or directory
    compilation terminated.
    make[1]: *** [.../.build/perf/perf/util/parse-events.o] Error 1
    ...

    and:

    LINK /.../.build/perf/perf/perf
    gcc: error: /.../.build/perf/perf//.../.source/perf/tools/lib/lk/liblk.a: No such file or directory

    Signed-off-by: Robert Richter
    Signed-off-by: Robert Richter
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Robert Richter
    Link: http://lkml.kernel.org/r/1370964158-4135-1-git-send-email-rric@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Richter
     

30 May, 2013

3 commits

  • Adding missing liblk.a dependency for python/perf.so.

    Signed-off-by: Jiri Olsa
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Sam Ravnborg
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1369398928-9809-26-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • No need to use '?=' assignment for STRIP variable, the standard
    '=' does the same job without creating confusion.

    Suggested-by: Namhyung Kim
    Signed-off-by: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Borislav Petkov
    Cc: Stephane Eranian
    Cc: Sam Ravnborg
    Link: http://lkml.kernel.org/r/1369398928-9809-25-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Replacing tabs with spaces for all non-commands statements
    in 'Makefile' and 'config/Makefile' files.

    Suggested-by: Sam Ravnborg
    Signed-off-by: Jiri Olsa
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Sam Ravnborg
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1369398928-9809-23-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa