1. 03 7月, 2019 10 次提交
    • A
      perf list: Avoid extra : for --raw metrics · 9c344d15
      Andi Kleen 提交于
      When printing the metrics raw, don't print : after the metricgroups.
      This helps the command line completion to complete those too.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20190628220737.13259-2-andi@firstfloor.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9c344d15
    • A
      perf vendor events intel: Metric fixes for SKX/CLX · 4df79ba3
      Andi Kleen 提交于
      - Add a missing filter for the DRAM_Latency / DRAM_Parallel_Reads metrics
      - Remove the useless PMM_* metrics from Skylake
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20190628220737.13259-1-andi@firstfloor.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4df79ba3
    • A
      perf tools: Fix typos / broken sentences · 734ac47e
      Andi Kleen 提交于
      - Fix a typo in the man page
      - Fix a tip that doesn't make any sense.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20190628220900.13741-1-andi@firstfloor.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      734ac47e
    • J
      perf jevents: Add support for Hisi hip08 L3C PMU aliasing · edd93a40
      John Garry 提交于
      Add support for Hisi hip08 L3C PMU aliasing.
      
      The kernel driver is in drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lkml.kernel.org/r/1561732552-143038-5-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      edd93a40
    • J
      perf jevents: Add support for Hisi hip08 HHA PMU aliasing · 8f5b703a
      John Garry 提交于
      Add support for Hisi hip08 HHA PMU aliasing.
      
      The kernel driver is in drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lkml.kernel.org/r/1561732552-143038-4-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8f5b703a
    • J
      perf jevents: Add support for Hisi hip08 DDRC PMU aliasing · 57cc7324
      John Garry 提交于
      Add support for Hisi hip08 DDRC PMU aliasing. We can now do something like
      this:
      
      $perf list
      
      [snip]
      
      uncore ddrc:
        uncore_hisi_ddrc.act_cmd
             [DDRC active commands. Unit: hisi_sccl,ddrc]
        uncore_hisi_ddrc.flux_rcmd
             [DDRC read commands. Unit: hisi_sccl,ddrc]
        uncore_hisi_ddrc.flux_wcmd
             [DDRC write commands. Unit: hisi_sccl,ddrc]
        uncore_hisi_ddrc.flux_wr
             [DDRC precharge commands. Unit: hisi_sccl,ddrc]
        uncore_hisi_ddrc.rnk_chg
             [DDRC rank commands. Unit: hisi_sccl,ddrc]
        uncore_hisi_ddrc.rw_chg
             [DDRC read and write changes. Unit: hisi_sccl,ddrc]
      
      Performance counter stats for 'system wide':
      
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc0]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc1]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc2]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc3]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc0]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc1]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc3]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc1]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc2]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc3]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc0]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc1]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc2]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc0]
                  20,421      uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc2]
                       0      uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc3]
      
             1.001559011 seconds time elapsed
      
      The kernel driver is in drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lkml.kernel.org/r/1561732552-143038-3-git-send-email-john.garry@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      57cc7324
    • J
      perf pmu: Support more complex PMU event aliasing · 730670b1
      John Garry 提交于
      The jevent "Unit" field is used for uncore PMU alias definition.
      
      The form uncore_pmu_example_X is supported, where "X" is a wildcard, to
      support multiple instances of the same PMU in a system.
      
      Unfortunately this format not suitable for all uncore PMUs; take the
      Hisi DDRC uncore PMU for example, where the name is in the form
      hisi_scclX_ddrcY.
      
      For for current jevent parsing, we would be required to hardcode an
      uncore alias translation for each possible value of X. This is not
      scalable.
      
      Instead, add support for "Unit" field in the form "hisi_sccl,ddrc",
      where we can match by hisi_scclX and ddrcY. Tokens  in Unit field are
      delimited by ','.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxarm@huawei.com
      Link: http://lkml.kernel.org/r/1561732552-143038-2-git-send-email-john.garry@huawei.com
      [ Shut up older gcc complianing about the last arg to strtok_r() being uninitialized, set that tmp to NULL ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      730670b1
    • J
      perf diff: Documentation -c cycles option · c8f7bc1a
      Jin Yao 提交于
      Documentation the new computation selection 'cycles'.
      
       v4:
       ---
       Change the column 'Block cycles diff [start:end]' to
       '[Program Block Range] Cycles Diff'
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1561713784-30533-8-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c8f7bc1a
    • J
      perf diff: Print the basic block cycles diff · b10c78c5
      Jin Yao 提交于
       $ perf record -b ./div
       $ perf record -b ./div
      
      Following is the default perf diff output
      
       $ perf diff
      
       # Event 'cycles'
       #
       # Baseline  Delta Abs  Shared Object     Symbol
       # ........  .........  ................  ..................................
       #
           48.75%     +0.33%  div               [.] main
            8.21%     -0.20%  div               [.] compute_flag
           19.02%     -0.12%  libc-2.23.so      [.] __random_r
           16.17%     -0.09%  libc-2.23.so      [.] __random
            2.27%     -0.03%  div               [.] rand@plt
                      +0.02%  [i915]            [k] gen8_irq_handler
            5.52%     +0.02%  libc-2.23.so      [.] rand
      
      This patch creates a new computation selection 'cycles'.
      
       $ perf diff -c cycles
      
       # Event 'cycles'
       #
       # Baseline       [Program Block Range] Cycles Diff Shared Object Symbol
       # ........ ....................................... .........................................
       #
           48.75%             [div.c:42 -> div.c:45]  147 div           [.] main
           48.75%             [div.c:31 -> div.c:40]    4 div           [.] main
           48.75%             [div.c:40 -> div.c:40]    0 div           [.] main
           48.75%             [div.c:42 -> div.c:42]    0 div           [.] main
           48.75%             [div.c:42 -> div.c:44]    0 div           [.] main
           19.02% [random_r.c:357 -> random_r.c:360]    0 libc-2.23.so  [.] __random_r
           19.02% [random_r.c:357 -> random_r.c:373]    0 libc-2.23.so  [.] __random_r
           19.02% [random_r.c:357 -> random_r.c:376]    0 libc-2.23.so  [.] __random_r
           19.02% [random_r.c:357 -> random_r.c:380]    0 libc-2.23.so  [.] __random_r
           19.02% [random_r.c:357 -> random_r.c:392]    0 libc-2.23.so  [.] __random_r
           16.17%     [random.c:288 -> random.c:291]    0 libc-2.23.so  [.] __random
           16.17%     [random.c:288 -> random.c:291]    0 libc-2.23.so  [.] __random
           16.17%     [random.c:288 -> random.c:295]    0 libc-2.23.so  [.] __random
           16.17%     [random.c:288 -> random.c:297]    0 libc-2.23.so  [.] __random
           16.17%     [random.c:291 -> random.c:291]    0 libc-2.23.so  [.] __random
           16.17%     [random.c:293 -> random.c:293]    0 libc-2.23.so  [.] __random
            8.21%             [div.c:22 -> div.c:22]  148 div           [.] compute_flag
            8.21%             [div.c:22 -> div.c:25]    0 div           [.] compute_flag
            8.21%             [div.c:27 -> div.c:28]    0 div           [.] compute_flag
            5.52%           [rand.c:26 -> rand.c:27]    0 libc-2.23.so  [.] rand
            5.52%           [rand.c:26 -> rand.c:28]    0 libc-2.23.so  [.] rand
            2.27%         [rand@plt+0 -> rand@plt+0]    0 div           [.] rand@plt
            0.01% [entry_64.S:694 -> entry_64.S:694]   16 [vmlinux]     [k] native_irq_return_iret
            0.00%       [fair.c:7676 -> fair.c:7665]  162 [vmlinux]     [k] update_blocked_averages
      
      "[Program Block Range]" indicates the range of program basic block
      (start -> end). If we can find the source line it prints the source line
      otherwise it prints the symbol+offset instead.
      
       v4:
       ---
       Use source lines or symbol+offset to indicate the basic block. It should
       be easier to understand.
      
       v3:
       ---
       Cast 'struct hist_entry' to 'struct block_hist' in hist_entry__block_fprintf.
       Use symbol_conf.report_block to check if executing hist_entry__block_fprintf.
      
       v2:
       ---
       Keep standard perf diff format and display the 'Baseline' and
       'Shared Object'.
      
      The output is sorted by "Baseline" and the basic blocks in the same
      function are sorted by cycles diff.
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1561713784-30533-7-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b10c78c5
    • J
      perf diff: Link same basic blocks among different data · f3810817
      Jin Yao 提交于
      The target is to compare the performance difference (cycles diff) for
      the same basic blocks in different data files.
      
      The same basic block means same function, same start address and same
      end address. This patch finds the same basic blocks from different data
      files and link them together and resort by the cycles diff.
      
       v3:
       ---
       The block stuffs are maintained by new structure 'block_hist',
       so this patch is update accordingly.
      
       v2:
       ---
       Since now the basic block hists is changed to per symbol,
       the patch only links the basic block hists for the same
       symbol in different data files.
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1561713784-30533-6-git-send-email-yao.jin@linux.intel.com
      [ sym->name is an array, not a pointer, so no need to check it for NULL, fixes de build in some distros ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f3810817
  2. 02 7月, 2019 15 次提交
  3. 26 6月, 2019 15 次提交