1. 08 Dec, 2015 3 commits
  2. 07 Dec, 2015 19 commits
  3. 06 Dec, 2015 10 commits
  4. 04 Dec, 2015 1 commit
  5. 28 Nov, 2015 6 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · ac675d0d
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' 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:
      
        - Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
          in an array used just for printing available events, robustify the code
          involved (Arnaldo Carvalho de Melo)
      
        - 'perf test unwind' should create kernel maps, now that entry works and the
          test passes (Jiri Olsa)
      
        - Fix showing the running kernel build id in 'perf buildid-list' (Michael Petlan)
      
        - Fix command line symbol filtering in 'perf report' (Namhyung Kim)
      
      Infrastructure changes:
      
        - Extract and collect map info from BPF object files in libbpf (Wang Nan)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ac675d0d
    • Wang Nan's avatar
      perf bpf: Rename bpf config to program config · 0bb93490
      Wang Nan authored
      Following patches are going to introduce BPF object level configuration
      to enable setting values into BPF maps. To avoid confusion, this patch
      renames existing 'config' in bpf-loader.c to 'program config'. Following
      patches would introduce 'object config'.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1448614067-197576-4-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0bb93490
    • Wang Nan's avatar
      tools lib bpf: Extract and collect map names from BPF object file · 561bbcca
      Wang Nan authored
      This patch collects name of maps in BPF object files and saves them into
      'maps' field in 'struct bpf_object'. 'bpf_object__get_map_by_name' is
      introduced to retrive fd and definitions of a map through its name.
      Signed-off-by: default avatarHe Kuang <hekuang@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1448614067-197576-3-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      561bbcca
    • Wang Nan's avatar
      tools lib bpf: Collect map definition in bpf_object · 9d759a9b
      Wang Nan authored
      This patch collects more information from maps sections in BPF object
      files into 'struct bpf_object', enables later patches access those
      information (such as the type and size of the map).
      
      In this patch, a new handler 'struct bpf_map' is extracted in parallel
      with bpf_object and bpf_program. Its iterator and accessor is also
      created.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1448614067-197576-2-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9d759a9b
    • Namhyung Kim's avatar
      perf hists browser: Update nr entries regardless of min percent · 03905048
      Namhyung Kim authored
      When perf report on TUI was called with -S symbol filter, it should
      update nr entries even if min_pcnt is 0.  IIRC the reason was to update
      nr entries after applying minimum percent threshold.  But if symbol
      filter was given on command line (with -S option), it should use
      hists->nr_non_filtered_entries instead of hists->nr_entries.
      
      So this patch fixes a bug of navigating hists browser that the cursor
      goes beyond the number of entries when -S (or similar) option is used.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1448645559-31167-3-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      03905048
    • Namhyung Kim's avatar
      perf hists: Do not skip elided fields when processing samples · e72655d9
      Namhyung Kim authored
      If user gives a filter, perf marks the corresponding column elided and
      omits the output.  But it should process and aggregates samples using
      the field, otherwise samples will be aggregated as if the column was not
      there resulted in incorrect output.
      
      For example, I'd like to set a filter on native_write_msr_safe.  The
      original overhead of the function is negligible.
      
        $ perf report | grep native_write_msr_safe
            0.00%  swapper  [kernel.vmlinux]  native_write_msr_safe
            0.00%  perf     [kernel.vmlinux]  native_write_msr_safe
      
      However adding -S option gives different output.
      
        $ perf report -S native_write_msr_safe --percentage absolute | \
        > grep -e swapper -e perf
           51.47%  swapper  [kernel.vmlinux]
            4.14%  perf     [kernel.vmlinux]
      
      Since it aggregated samples using comm and dso only.  In fact, the above
      values are same when it sorts with -s comm,dso.
      
        $ perf report -s comm,dso | grep -e swapper -e perf
           51.47%  swapper  [kernel.vmlinux]
            4.14%  perf     [kernel.vmlinux]
      
      This resulted in TUI failure with -ERANGE since it tries to increase
      sample hit count for annotation with wrong symbols due to incorrect
      aggregation.
      
      This patch fixes it not to skip elided fields when comparing samples in
      order to insert them to the hists.
      
      Commiter note:
      
      After the patch, with a different workloads:
      
        # perf report --show-total-period -S native_write_msr_safe --stdio
        #
        # symbol: native_write_msr_safe
        #
        # Samples: 455  of event 'cycles:pp'
        # Event count (approx.): 134787489
        #
        # Overhead Period Command         Shared Object
        # ........ ...... ............... ................
        #
             0.22% 293081 qemu-system-x86 [vmlinux]
             0.19% 255914 swapper         [vmlinux]
             0.00%   2054 Timer           [vmlinux]
             0.00%   1021 firefox         [vmlinux]
             0.00%      2 perf            [vmlinux]
      
        # perf report --show-total-period | grep native_write_msr_safe
        Failed to open /tmp/perf-14838.map, continuing without symbols
             0.22% 293081 qemu-system-x86 [vmlinux]  [k] native_write_msr_safe
             0.19% 255914 swapper         [vmlinux]  [k] native_write_msr_safe
             0.00%   2054 Timer           [vmlinux]  [k] native_write_msr_safe
             0.00%   1021 firefox         [vmlinux]  [k] native_write_msr_safe
             0.00%      2 perf            [vmlinux]  [k] native_write_msr_safe
        #
      Reported-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1448645559-31167-2-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e72655d9
  6. 27 Nov, 2015 1 commit