1. 19 Jul, 2017 29 commits
  2. 12 Jul, 2017 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Accept zero as the kernel base address · 4b1303d0
      Arnaldo Carvalho de Melo authored
      Which is the case in S/390, where symbols were not being resolved
      because machine__get_kernel_start was only setting machine->kernel_start
      when the just successfully loaded kernel symtab had its map->start set
      to !0, when it was left at (1ULL << 63) assuming a partitioning of the
      address space for user/kernel, which is not the case in S/390 nor in
      Sparc.
      
      So just check if map__load() was successfull and set
      machine->kernel_start to zero, fixing kernel symbol resolution on S/390.
      
      Test performed by Thomas:
      
       ----
      
        I like this patch. I have done a new build and removed all my debug output to start
        from scratch. Without your patch I get this:
      
        # Samples: 4  of event 'cpu-clock'
        # Event count (approx.): 1000000
        #
        # Children      Self  Command  Shared Object     Symbol
        # ........  ........  .......  ................  ........................
            75.00%     0.00%  true     [unknown]         [k] 0x00000000004bedda
                    |
                    ---0x4bedda
                       |
                       |--50.00%--0x42693a
                       |          |
                       |           --25.00%--0x2a72e0
                       |                     0x2af0ca
                       |                     0x3d1003fe4c0
                       |
                        --25.00%--0x4272bc
                                  0x26fa84
      
        and with your patch (I just rebuilt the perf tool, nothing else and used the same
        perf.data file as input):
      
        # Samples: 4  of event 'cpu-clock'
        # Event count (approx.): 1000000
        #
        # Children      Self  Command  Shared Object               Symbol
        # ........  ........  .......  ..........................  ..................................
            75.00%     0.00%  true     [kernel.vmlinux]            [k] pgm_check_handler
                    |
                    ---pgm_check_handler
                       do_dat_exception
                       handle_mm_fault
                       __handle_mm_fault
                       filemap_map_pages
                       |
                       |--25.00%--rcu_read_lock_held
                       |          rcu_lockdep_current_cpu_online
                       |          0x3d1003ff4c0
                       |
                        --25.00%--lock_release
      
        Looks good to me....
       ----
      Reported-and-Tested-by: default avatarThomas-Mich Richter <tmricht@linux.vnet.ibm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Zvonko Kosic <zvonko.kosic@de.ibm.com>
      Link: http://lkml.kernel.org/n/tip-dk0n1uzmbe0tbthrpfqlx6bz@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4b1303d0
  3. 11 Jul, 2017 2 commits
  4. 10 Jul, 2017 3 commits
  5. 08 Jul, 2017 3 commits
  6. 05 Jul, 2017 1 commit
  7. 04 Jul, 2017 1 commit
    • Jiri Olsa's avatar
      perf unwind: Do not fail due to missing unwind support · 1934adf7
      Jiri Olsa authored
      We currently fail the MMAP event processing if we don't have the MMAP
      event's specific arch unwind support compiled in.
      
      That's wrong and can lead to unresolved mmaps in report output for 32bit
      binaries on 64bit server, like in this example on x86_64 server:
      
        $ cat ex.c
        int main(int argc, char **argv)
        {
                while (1) {}
        }
        $ gcc -o ex -m32 ex.c
        $ perf record ./ex
        ^C[ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 0.371 MB perf.data (9322 samples) ]
      
      Before:
        $ perf report --stdio
      
        SNIP
      
        # Overhead  Command  Shared Object     Symbol
        # ........  .......  ................  ......................
        #
           100.00%  ex       [unknown]         [.] 0x00000000080483de
             0.00%  ex       [unknown]         [.] 0x00000000f76dba4f
             0.00%  ex       [unknown]         [.] 0x00000000f76e4c11
             0.00%  ex       [unknown]         [.] 0x00000000f76daa30
      
      After:
        $ perf report --stdio
      
        SNIP
      
        # Overhead  Command  Shared Object  Symbol
        # ........  .......  .............  ...............
        #
           100.00%  ex       ex             [.] main
             0.00%  ex       ld-2.24.so     [.] _dl_start
             0.00%  ex       ld-2.24.so     [.] do_lookup_x
             0.00%  ex       ld-2.24.so     [.] _start
      
      The fix is not to fail, just warn if there's not unwind support compiled
      in.
      Reported-by: default avatarMichael Lyle <mlyle@lyle.org>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20170704131131.27508-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1934adf7