1. 29 Sep, 2016 15 commits
  2. 28 Sep, 2016 3 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Beautify sched_[gs]et_attr return value · f0bbd602
      Arnaldo Carvalho de Melo authored
      Both return errno, show the string associated then.
      
      More work needed to capture the sched_attr arg to beautify it in turn,
      probably using BPF.
      
      Before:
      
           0.210 ( 0.001 ms): sched_setattr(uattr: 0x7ffc684f02b0) = -22
      
      After the patch, for this sched_attr, all other parms are zero, so not
      shown:
      
              struct sched_attr attr = {
                      .size           = sizeof(attr),
                      .sched_policy   = SCHED_DEADLINE,
                      .sched_runtime  = 10 * USECS_PER_SEC,
                      .sched_period   = 30 * USECS_PER_SEC,
                      .sched_deadline = attr.sched_period,
              };
      
           0.321 ( 0.002 ms): sched_setattr(uattr: 0x7ffc44116da0) = -1 EINVAL Invalid argument
      
        [root@jouet c]# perf trace -e sched_setattr ./sched_deadline
        Couldn't negotiate deadline: Invalid argument
           0.229 ( 0.003 ms): sched_setattr(uattr: 0x7ffd8dcd8df0) = -1 EINVAL Invalid argument
        [root@jouet c]#
      
      Now to figure out the reason for this EINVAL.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-tyot2n7e48zm8pdw8tbcm3sl@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f0bbd602
    • Wang Nan's avatar
      perf data: Fix building in 32 bit platform with libbabeltrace · f2c8852e
      Wang Nan authored
      On ARM32 building it report following error when we build with
      libbabeltrace:
      
        util/data-convert-bt.c: In function 'add_bpf_output_values':
        util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
        cc1: all warnings being treated as errors
      
      Fix it by changing %lu to %zu.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Fixes: 6122d57e ("perf data: Support converting data from bpf_perf_event_output()")
      Link: http://lkml.kernel.org/r/1475035126-146587-1-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f2c8852e
    • Adrian Hunter's avatar
      perf tools: Fix MMAP event synthesis broken by MAP_HUGETLB change · 973186ca
      Adrian Hunter authored
      Patch "perf record: Mark MAP_HUGETLB when synthesizing mmap events") breaks
      MMAP event synthesis.  The executable name comparison will match any name
      if the length is zero, resulting in all the user space maps becoming
      anonymous.  This is particularly noticeable with system-wide traces.
      Example:
      
      	perf record -a sleep 1
      	perf script --show-mmap-events
      
      Committer note:
      
      That is not the case when, say, one has a qemu instance and libvirt actually
      mounts hugetlbfs. To test this I had to first umount it:
      
      [root@jouet ~]# mount | grep hugetlbfs
      hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
      [root@jouet ~]#
      
      After unmount it the error fixed by this patch manifests itself:
      
        # perf record -a sleep 1
        # perf script --show-mmap-events | grep PERF_RECORD_MMAP2 | head -5
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x557d47ed8000(0x167000) @ 0 fd:00 3146896 7362875424355726126]: r-xp //anon
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c488d000(0x4000) @ 0 fd:00 3153214 7362875424355726126]: r-xp //anon
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4a92000(0x3d000) @ 0 fd:00 3159276 7362875424355726126]: r-xp //anon
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4cd5000(0x15000) @ 0 fd:00 3153725 7362875424355726126]: r-xp //anon
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4eeb000(0x25000) @ 0 fd:00 3153260 7362875424355726126]: r-xp //anon
        #
      
      Fixed version:
      
        # perf record -a sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 1.419 MB perf.data (182 samples) ]
        # perf script --show-mmap-events | grep PERF_RECORD_MMAP2 | head -5
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x557d47ed8000(0x167000) @ 0 fd:00 3146896 7362875424355726126]: r-xp /usr/lib/systemd/systemd
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c488d000(0x4000) @ 0 fd:00 3153214 7362875424355726126]: r-xp /usr/lib64/libuuid.so.1.3.0
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4a92000(0x3d000) @ 0 fd:00 3159276 7362875424355726126]: r-xp /usr/lib64/libblkid.so.1.1.0
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4cd5000(0x15000) @ 0 fd:00 3153725 7362875424355726126]: r-xp /usr/lib64/libz.so.1.2.8
          systemd 0 [000] 0.000000: PERF_RECORD_MMAP2 1/1: [0x7f96c4eeb000(0x25000) @ 0 fd:00 3153260 7362875424355726126]: r-xp /usr/lib64/liblzma.so.5.2.2
      [root@jouet ~]#
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Link: http://lkml.kernel.org/r/1474641528-18776-3-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      973186ca
  3. 27 Sep, 2016 1 commit
  4. 23 Sep, 2016 2 commits
  5. 22 Sep, 2016 15 commits
  6. 21 Sep, 2016 2 commits
  7. 20 Sep, 2016 2 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160920' of... · 89f1c2c5
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160920' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      - Support event group view with hierarchy mode in 'perf top' and 'perf report'
        (Namhyung Kim)
      
        e.g.:
      
        $ perf record -e '{cycles,instructions}' make
        $ perf report --hierarchy --stdio
        ...
        #               Overhead  Command / Shared Object / Symbol
        # ......................  ..................................
        ...
            25.74%  27.18%        sh
               19.96%  24.14%        libc-2.24.so
                  9.55%  14.64%        [.] __strcmp_sse2
                  1.54%   0.00%        [.] __tfind
                  1.07%   1.13%        [.] _int_malloc
                  0.95%   0.00%        [.] __strchr_sse2
                  0.89%   1.39%        [.] __tsearch
                  0.76%   0.00%        [.] strlen
      
      - Fix the dwarf regs table for x86_64, adding a missing % to the "%di"
        register, noticed with a failing 'perf test bpf' (Arnaldo Carvalho de Melo)
      
      - Fix handling of mmap parameters in the 'perf trace' beautifier in
        architectures that don't have the same mappings as x86_64 (Wang Nan)
      
      - Handle hugetbl mappings in older systems running new kernels (Wang Nan)
      
      - Resolve 'call' operands in 'annotate', that when using /proc/kcore
        were appearing just as hexadecimal addresses, to function names
        (Arnaldo Carvalho de Melo)
      
      - Fix width computation for srcline sort entry (Jiri Olsa)
      
      - Do not ignore call instruction with indirect target in 'annotate'
        (Ravi Bangoria)
      
      - Handle MADV_FREE in the madvise 'trace' beautifier (Wang Nan)
      
      - Fix build of 'perf trace' mman beautifier in !x86_64 (Wang Nan)
      
      Infrastructure changes:
      
      - Add infrastructure for PMU specific configuration, allowing to pass
        config variables directly to the kernel PMU driver, prefixing those
        variables with a '@', part of a larger series to support Coresight (Mathieu Poirier)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      89f1c2c5
    • Jiri Olsa's avatar
      perf symbols: Do not open device files · 3c028a0c
      Jiri Olsa authored
      The dso__read_binary_type_filename gets the dso's file name to open. We
      need to check it for regular file before trying to open it, otherwise we
      might get stuck with device file.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Joe Mario <jmario@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20160920161245.GA8995@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3c028a0c