1. 17 2月, 2017 1 次提交
    • A
      tools perf scripting python: clang doesn't have -spec, remove it · 8bd8c653
      Arnaldo Carvalho de Melo 提交于
      Gcc has a -spec option to override what options to pass to cc, etc, and
      in some distros this is used, like in fedora, where we end up getting
      this passed to gcc that makes clang, that doesn't have this option to
      stop the build:
      
        CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
      clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument]
      
      So filter this out when the compiler used is clang, this way we
      can build the python scripting support in tools/perf/.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-2gosxoiouf24pnlknp7w7q4z@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8bd8c653
  2. 14 2月, 2017 1 次提交
  3. 17 1月, 2017 1 次提交
  4. 07 12月, 2016 1 次提交
    • W
      perf build: Check LLVM version in feature check · a940cad3
      Wang Nan 提交于
      Cancel builtin llvm and clang support when LLVM version is less than
      3.9.0: following commits uses newer API.
      
      Since Clang/LLVM's API is not guaranteed to be stable, add a
      test-llvm-version.cpp feature checker, issue warning if LLVM found in
      compiling environment is not tested yet.
      
      Committer Notes:
      
      Testing it:
      
      Environment:
      
        $ cat /etc/fedora-release
        Fedora release 25 (Twenty Five)
        $ rpm -q llvm-devel clang-devel
        llvm-devel-3.8.0-1.fc25.x86_64
        clang-devel-3.8.0-2.fc25.x86_64
        $
      
      Before:
      
        $  make -k LIBCLANGLLVM=1 O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j4' parallel build
        Warning: tools/include/uapi/linux/bpf.h differs from kernel
        Warning: tools/arch/arm/include/uapi/asm/kvm.h differs from kernel
          INSTALL  GTK UI
          LINK     /tmp/build/perf/perf
        /tmp/build/perf/libperf.a(libperf-in.o): In function `perf::createCompilerInvocation(llvm::SmallVector<char const*, 16u>, llvm::StringRef&, clang::DiagnosticsEngine&)':
        /home/acme/git/linux/tools/perf/util/c++/clang.cpp:56: undefined reference to `clang::tooling::newInvocation(clang::DiagnosticsEngine*, llvm::SmallVector<char const*, 16u> const&)'
        /tmp/build/perf/libperf.a(libperf-in.o): In function `perf::getModuleFromSource(llvm::SmallVector<char const*, 16u>, llvm::StringRef, llvm::IntrusiveRefCntPtr<clang::vfs::FileSystem>)':
        /home/acme/git/linux/tools/perf/util/c++/clang.cpp:68: undefined reference to `clang::CompilerInstance::CompilerInstance(std::shared_ptr<clang::PCHContainerOperations>, bool)'
        /home/acme/git/linux/tools/perf/util/c++/clang.cpp:69: undefined reference to `clang::CompilerInstance::createDiagnostics(clang::DiagnosticConsumer*, bool)'
        <SNIP>
      
      After:
      
        Makefile.config:807: No suitable libLLVM found, disabling builtin clang and llvm support. Please install llvm-dev(el) (>= 3.9.0)
      
      Updating the environment to a locally built LLVM 4.0 + clang 3.9 (forgot
      to git pull, duh) combo, all works as expected, it is properly detected
      and built into the resulting perf binary.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Reported-and-Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joe Stringer <joe@ovn.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/20161206072230.7651-1-wangnan0@huawei.com
      [ Change the warning message a bit (add 'suitable' and 'builtin'), clarifying it, see committer notes above ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a940cad3
  5. 06 12月, 2016 2 次提交
  6. 14 11月, 2016 1 次提交
  7. 24 10月, 2016 1 次提交
  8. 22 9月, 2016 1 次提交
  9. 03 8月, 2016 1 次提交
  10. 14 7月, 2016 1 次提交
  11. 13 7月, 2016 6 次提交
  12. 05 7月, 2016 1 次提交
  13. 27 6月, 2016 1 次提交
  14. 22 6月, 2016 1 次提交
  15. 15 6月, 2016 1 次提交
    • H
      perf unwind: Fix compile error for static cross build · 906a8276
      He Kuang 提交于
      Build failure for static cross-compiling on aarch64, with libunwind-x86
      provided:
      
        $ file ./libunwind_for_x86_on_aarch64/lib/libunwind-x86.so.8.0.1
      
        libunwind-x86.so.8.0.1: ELF 64-bit LSB shared object, ARM aarch64,
        version 1 (SYSV), dynamically linked, not stripped
      
        $ make LDFLAGS=-static LIBUNWIND_DIR=./libunwind_for_x86_on_aarch64
        ARCH=aarch64 CROSS_COMPILE=aarch64-buildroot-linux-gnu-
      
        ~/libperf.a(libperf-in.o): In function `find_proc_info':
        :(.text+0xae4ac): undefined reference to `_Ux86_dwarf_search_unwind_table'
        ~/libperf.a(libperf-in.o): In function `_unwind__prepare_access':
        :(.text+0xaedd0): undefined reference to `_Ux86_create_addr_space'
        :(.text+0xaee24): undefined reference to `_Ux86_set_caching_policy'
        ~/libperf.a(libperf-in.o): In function `_unwind__flush_access':
        :(.text+0xaee98): undefined reference to `_Ux86_flush_cache'
        ~/libperf.a(libperf-in.o): In function `_unwind__finish_access':
        :(.text+0xaef08): undefined reference to `_Ux86_destroy_addr_space'
        ~/libperf.a(libperf-in.o): In function `get_entries':
        :(.text+0xaf148): undefined reference to `_Ux86_init_remote'
        :(.text+0xaf184): undefined reference to `_Ux86_get_reg'
        :(.text+0xaf1a4): undefined reference to `_Ux86_step'
        collect2: error: ld returned 1 exit status
        Makefile.perf:350: recipe for target '~/perf' failed
        make[1]: *** [~/perf] Error 1
        Makefile:68: recipe for target 'all' failed
        make: *** [all] Error 2
      
      This is because the remote libunwind library detected is not appended to
      EXTLIBS variable, which will be included between 'start-group' and
      'end-group' when linking.
      
      The existing variable LIBUNWIND_LIBS is assigned to libs for local
      unwind, this patch introduces a new variable EXTLIBS_LIBUNWIND for
      storing remote libunwind libraries instead.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1465988636-81502-1-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      906a8276
  16. 08 6月, 2016 2 次提交
  17. 07 6月, 2016 3 次提交
  18. 12 5月, 2016 1 次提交
  19. 11 5月, 2016 1 次提交
  20. 21 4月, 2016 1 次提交
    • A
      tools/perf: Map the ID values with register names · dc642e83
      Anju T 提交于
      Map ID values with corresponding register names. These names are then
      displayed when user issues perf record with the -I option
      followed by perf report/script with -D option.
      
      To test this patchset, Eg:
      
        $ perf record -I ls   # record machine state at interrupt
        $ perf script -D      # read the perf.data file
      
      Sample output obtained for this patch / output looks like as follows:
      
        496768515470 0x1988 [0x188]: PERF_RECORD_SAMPLE(IP, 0x1): 4522/4522:
        0xc0000000001e538c period: 1 addr: 0
        ... intr regs: mask 0x7ffffffffff ABI 64-bit
        .... r0    0xc0000000001e5e34
        .... r1    0xc000000fe733f9a0
        .... r2    0xc000000001523100
        .... r3    0xc000000ffaadeb60
        .... r4    0xc000000003456800
        .... r5    0x73a9b5e000
        .... r6    0x1e000000
        .... r7    0x0
        .... r8    0x0
        .... r9    0x0
        .... r10   0x1
        .... r11   0x0
        .... r12   0x24022822
        .... r13   0xc00000000feec180
        .... r14   0x0
        .... r15   0xc000001e4be18800
        .... r16   0x0
        .... r17   0xc000000ffaac5000
        .... r18   0xc000000fe733f8a0
        .... r19   0xc000000001523100
        .... r20   0xc00000000009fd1c
        .... r21   0xc000000fcaa69000
        .... r22   0xc0000000001e4968
        .... r23   0xc000000001523100
        .... r24   0xc000000fe733f850
        .... r25   0xc000000fcaa69000
        .... r26   0xc000000003b8fcf0
        .... r27   0xfffffffffffffead
        .... r28   0x0
        .... r29   0xc000000fcaa69000
        .... r30   0x1
        .... r31   0x0
        .... nip   0xc0000000001dd320
        .... msr   0x9000000000009032
        .... orig_r3 0xc0000000001e538c
        .... ctr   0xc00000000009d550
        .... link  0xc0000000001e5e34
        .... xer   0x0
        .... ccr   0x84022882
        .... softe 0x0
        .... trap  0xf01
        .... dar   0x0
        .... dsisr 0xf00040060000004
         ... thread: :4522:4522
         ...... dso: /root/.debug/.build-id/b0/ef11b1a1629e62ac9de75199117ee5ef9469e9
                   :4522 4522 496.768515: 1 cycles: c0000000001e538c
                   .perf_event_context_sched_in (/boot/vmlinux)
      Signed-off-by: NAnju T <anju@linux.vnet.ibm.com>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      dc642e83
  21. 08 4月, 2016 1 次提交
    • A
      perf tools: Build syscall table .c header from kernel's syscall_64.tbl · 1b700c99
      Arnaldo Carvalho de Melo 提交于
      We used libaudit to map ids to syscall names and vice-versa, but that
      imposes a delay in supporting new syscalls, having to wait for libaudit
      to get those new syscalls on its tables.
      
      To remove that delay, for x86_64 initially, grab a copy of
      arch/x86/entry/syscalls/syscall_64.tbl and use it to generate those
      tables.
      
      Syscalls currently not available in audit-libs:
      
        # trace -e copy_file_range,membarrier,mlock2,pread64,pwrite64,timerfd_create,userfaultfd
        Error:	Invalid syscall copy_file_range, membarrier, mlock2, pread64, pwrite64, timerfd_create, userfaultfd
        Hint:	try 'perf list syscalls:sys_enter_*'
        Hint:	and: 'man syscalls'
        #
      
      With this patch:
      
        # trace -e copy_file_range,membarrier,mlock2,pread64,pwrite64,timerfd_create,userfaultfd
          8505.733 ( 0.010 ms): gnome-shell/2519 timerfd_create(flags: 524288) = 36
          8506.688 ( 0.005 ms): gnome-shell/2519 timerfd_create(flags: 524288) = 40
         30023.097 ( 0.025 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63ae382000, count: 4096, pos: 529592320) = 4096
         31268.712 ( 0.028 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63afd8b000, count: 4096, pos: 2314133504) = 4096
         31268.854 ( 0.016 ms): qemu-system-x8/24629 pwrite64(fd: 18, buf: 0x7f63afda2000, count: 4096, pos: 2314137600) = 4096
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-51xfjbxevdsucmnbc4ka5r88@git.kernel.org
      [ Added make dep for 'prepare' in 'LIBPERF_IN', fix by Wang Nan to fix parallell build ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b700c99
  22. 06 4月, 2016 2 次提交
  23. 19 3月, 2016 1 次提交
  24. 11 3月, 2016 1 次提交
    • J
      perf jitdump: Build only on supported archs · e12b202f
      Jiri Olsa 提交于
      Build jitdump only on architectures defined in util/genelf.h file, to avoid
      breaking the build on such arches.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Davidlohr Bueso <dbueso@suse.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Mel Gorman <mgorman@suse.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20160310164113.GA11357@krava.redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e12b202f
  25. 05 2月, 2016 1 次提交
  26. 30 1月, 2016 1 次提交
  27. 16 1月, 2016 1 次提交
  28. 12 1月, 2016 3 次提交