1. 15 10月, 2020 4 次提交
  2. 14 10月, 2020 1 次提交
  3. 23 6月, 2020 1 次提交
  4. 28 5月, 2020 1 次提交
  5. 06 5月, 2020 1 次提交
  6. 30 4月, 2020 1 次提交
  7. 18 4月, 2020 1 次提交
  8. 15 1月, 2020 1 次提交
    • A
      perf c2c: Fix return type for histogram sorting comparision functions · c1c8013e
      Andres Freund 提交于
      Commit 722ddfde ("perf tools: Fix time sorting") changed - correctly
      so - hist_entry__sort to return int64. Unfortunately several of the
      builtin-c2c.c comparison routines only happened to work due the cast
      caused by the wrong return type.
      
      This causes meaningless ordering of both the cacheline list, and the
      cacheline details page. E.g a simple:
      
        perf c2c record -a sleep 3
        perf c2c report
      
      will result in cacheline table like
        =================================================
                   Shared Data Cache Line Table
        =================================================
        #
        #        ------- Cacheline ----------    Total     Tot  - LLC Load Hitm -  - Store Reference -  - Load Dram -     LLC  Total  - Core Load Hit -  - LLC Load Hit -
        # Index         Address  Node  PA cnt  records    Hitm  Total  Lcl    Rmt  Total  L1Hit  L1Miss     Lcl   Rmt  Ld Miss  Loads    FB    L1   L2     Llc      Rmt
        # .....  ..............  ....  ......  .......  ......  .....  .....  ...  ....   .....  ......  ......  ....  ......   .....  .....  ..... ...  ....     .......
      
              0  0x7f0d27ffba00   N/A       0       52   0.12%     13      6    7    12      12       0       0     7      14      40      4     16    0    0           0
              1  0x7f0d27ff61c0   N/A       0     6353  14.04%   1475    801  674   779     779       0       0   718    1392    5574   1299   1967    0  115           0
              2  0x7f0d26d3ec80   N/A       0       71   0.15%     16      4   12    13      13       0       0    12      24      58      1     20    0    9           0
              3  0x7f0d26d3ec00   N/A       0       98   0.22%     23     17    6    19      19       0       0     6      12      79      0     40    0   10           0
      
      i.e. with the list not being ordered by Total Hitm.
      
      Fixes: 722ddfde ("perf tools: Fix time sorting")
      Signed-off-by: NAndres Freund <andres@anarazel.de>
      Tested-by: NMichael Petlan <mpetlan@redhat.com>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org # v3.16+
      Link: http://lore.kernel.org/lkml/20200109043030.233746-1-andres@anarazel.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c1c8013e
  9. 06 1月, 2020 1 次提交
  10. 15 10月, 2019 1 次提交
  11. 21 9月, 2019 1 次提交
  12. 20 9月, 2019 1 次提交
  13. 01 9月, 2019 3 次提交
  14. 30 8月, 2019 2 次提交
  15. 26 8月, 2019 1 次提交
  16. 23 8月, 2019 1 次提交
  17. 22 8月, 2019 1 次提交
  18. 30 7月, 2019 3 次提交
  19. 09 7月, 2019 1 次提交
  20. 07 3月, 2019 1 次提交
  21. 23 2月, 2019 1 次提交
    • J
      perf data: Add global path holder · 2d4f2799
      Jiri Olsa 提交于
      Add a 'path' member to 'struct perf_data'. It will keep the configured
      path for the data (const char *). The path in struct perf_data_file is
      now dynamically allocated (duped) from it.
      
      This scheme is useful/used in following patches where struct
      perf_data::path holds the 'configure' directory path and struct
      perf_data_file::path holds the allocated path for specific files.
      
      Also it actually makes the code little simpler.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/20190221094145.9151-3-jolsa@kernel.org
      [ Fixup data-convert-bt.c missing conversion ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2d4f2799
  22. 06 2月, 2019 2 次提交
  23. 25 1月, 2019 1 次提交
  24. 22 1月, 2019 1 次提交
    • R
      perf tools: Replace automatic const char[] variables by statics · 49b8e2be
      Rasmus Villemoes 提交于
      An automatic const char[] variable gets initialized at runtime, just
      like any other automatic variable. For long strings, that uses a lot of
      stack and wastes time building the string; e.g. for the "No %s
      allocation events..." case one has:
      
        444516:       48 b8 4e 6f 20 25 73 20 61 6c   movabs $0x6c61207325206f4e,%rax # "No %s al"
        ...
        444674:       48 89 45 80                     mov    %rax,-0x80(%rbp)
        444678:       48 b8 6c 6f 63 61 74 69 6f 6e   movabs $0x6e6f697461636f6c,%rax # "location"
        444682:       48 89 45 88                     mov    %rax,-0x78(%rbp)
        444686:       48 b8 20 65 76 65 6e 74 73 20   movabs $0x2073746e65766520,%rax # " events "
        444690:       66 44 89 55 c4                  mov    %r10w,-0x3c(%rbp)
        444695:       48 89 45 90                     mov    %rax,-0x70(%rbp)
        444699:       48 b8 66 6f 75 6e 64 2e 20 20   movabs $0x20202e646e756f66,%rax
      
      Make them all static so that the compiler just references objects in .rodata.
      
      Committer testing:
      
      Ok, using dwarves's codiff tool:
      
          $ codiff --functions /tmp/perf.before ~/bin/perf
        builtin-sched.c:
          cmd_sched                 |  -48
         1 function changed, 48 bytes removed, diff: -48
      
        builtin-report.c:
          cmd_report                |  -32
         1 function changed, 32 bytes removed, diff: -32
      
        builtin-kmem.c:
          cmd_kmem                  |  -64
          build_alloc_func_list     |  -50
         2 functions changed, 114 bytes removed, diff: -114
      
        builtin-c2c.c:
          perf_c2c__report          | -390
         1 function changed, 390 bytes removed, diff: -390
      
        ui/browsers/header.c:
          tui__header_window        | -104
         1 function changed, 104 bytes removed, diff: -104
      
        /home/acme/bin/perf:
         9 functions changed, 688 bytes removed, diff: -688
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20181102230624.20064-1-linux@rasmusvillemoes.dkSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      49b8e2be
  25. 29 12月, 2018 2 次提交
  26. 31 7月, 2018 1 次提交
    • J
      perf c2c report: Fix crash for empty browser · 73978332
      Jiri Olsa 提交于
      'perf c2c' scans read/write accesses and tries to find false sharing
      cases, so when the events it wants were not asked for or ended up not
      taking place, we get no histograms.
      
      So do not try to display entry details if there's not any. Currently
      this ends up in crash:
      
        $ perf c2c report # then press 'd'
        perf: Segmentation fault
        $
      
      Committer testing:
      
      Before:
      
      Record a perf.data file without events of interest to 'perf c2c report',
      then call it and press 'd':
      
        # perf record sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.001 MB perf.data (6 samples) ]
        # perf c2c report
        perf: Segmentation fault
        -------- backtrace --------
        perf[0x5b1d2a]
        /lib64/libc.so.6(+0x346df)[0x7fcb566e36df]
        perf[0x46fcae]
        perf[0x4a9f1e]
        perf[0x4aa220]
        perf(main+0x301)[0x42c561]
        /lib64/libc.so.6(__libc_start_main+0xe9)[0x7fcb566cff29]
        perf(_start+0x29)[0x42c999]
        #
      
      After the patch the segfault doesn't take place, a follow up patch to
      tell the user why nothing changes when 'd' is pressed would be good.
      
      Reported-by: rodia@autistici.org
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      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 <peterz@infradead.org>
      Fixes: f1c5fd4d ("perf c2c report: Add TUI cacheline browser")
      Link: http://lkml.kernel.org/r/20180724062008.26126-1-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      73978332
  27. 25 7月, 2018 1 次提交
  28. 09 6月, 2018 1 次提交
  29. 04 6月, 2018 1 次提交
  30. 17 3月, 2018 1 次提交
    • J
      perf c2c report: Add cacheline address count column · 03d9fcb7
      Jiri Olsa 提交于
      Adding the 'PA cnt' column grouped under data cacheline address.
      
      It shows how many times the physical addresses changed for the hist
      entry. It does not show the number of different physical addresses for
      entry, because we don't store those. We only track the number of times
      we got different address than we currently hold, which is not expensive
      and gives similar info.
      
        $ perf c2c report --stdio
      
        #        ----------- Cacheline ----------    Total      Tot  ----- LLC Load Hitm -----
        # Index             Address  Node  PA cnt  records     Hitm    Total      Lcl      Rmt
        # .....  ..................  ....  ......  .......  .......  .......  .......  .......
        #
              0  0xffff9ad56dca0a80     0       9       10    7.69%        2        2        0
              1  0xffff9ad56dce0a80     0       9        9    7.69%        2        2        0
              2  0xffff9ad37659ad80     0       1        2    3.85%        1        1        0
      
        ...
      
        #        ----- HITM -----  -- Store Refs --  --------- Data address ---------
        #   Num      Rmt      Lcl   L1 Hit  L1 Miss              Offset  Node  PA cnt      Pid
        # .....  .......  .......  .......  .......  ..................  ....  ......  .......
        #
          -------------------------------------------------------------
              0        0        2        3        0  0xffff9ad56dca0a80
          -------------------------------------------------------------
                   0.00%    0.00%   33.33%    0.00%                 0x0     0       1     2510
                   0.00%    0.00%   33.33%    0.00%                 0x4     0       1     2476
                   0.00%    0.00%   33.33%    0.00%                0x20     0       1        0
                   0.00%  100.00%    0.00%    0.00%                0x38     0       1        0
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Joe Mario <jmario@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180309101442.9224-10-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      03d9fcb7