1. 08 3月, 2018 1 次提交
  2. 15 2月, 2018 1 次提交
  3. 17 1月, 2018 1 次提交
    • A
      perf unwind: Do not look just at the global callchain_param.record_mode · eabad8c6
      Arnaldo Carvalho de Melo 提交于
      When setting up DWARF callchains on specific events, without using
      'record' or 'trace' --call-graph, but instead doing it like:
      
      	perf trace -e cycles/call-graph=dwarf/
      
      The unwind__prepare_access() call in thread__insert_map() when we
      process PERF_RECORD_MMAP(2) metadata events were not being performed,
      precluding us from using per-event DWARF callchains, handling them just
      when we asked for all events to be DWARF, using "--call-graph dwarf".
      
      We do it in the PERF_RECORD_MMAP because we have to look at one of the
      executable maps to figure out the executable type (64-bit, 32-bit) of
      the DSO laid out in that mmap. Also to look at the architecture where
      the perf.data file was recorded.
      
      All this probably should be deferred to when we process a sample for
      some thread that has callchains, so that we do this processing only for
      the threads with samples, not for all of them.
      
      For now, fix using DWARF on specific events.
      
      Before:
      
        # perf trace --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1
        PING ::1(::1) 56 data bytes
        64 bytes from ::1: icmp_seq=1 ttl=64 time=0.048 ms
      
        --- ::1 ping statistics ---
        1 packets transmitted, 1 received, 0% packet loss, time 0ms
        rtt min/avg/max/mdev = 0.048/0.048/0.048/0.000 ms
           0.000 probe_libc:inet_pton:(7fe9597bb350))
        Problem processing probe_libc:inet_pton callchain, skipping...
        #
      
      After:
      
        # perf trace --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1
        PING ::1(::1) 56 data bytes
        64 bytes from ::1: icmp_seq=1 ttl=64 time=0.060 ms
      
        --- ::1 ping statistics ---
        1 packets transmitted, 1 received, 0% packet loss, time 0ms
        rtt min/avg/max/mdev = 0.060/0.060/0.060/0.000 ms
             0.000 probe_libc:inet_pton:(7fd4aa930350))
                                               __inet_pton (inlined)
                                               gaih_inet.constprop.7 (/usr/lib64/libc-2.26.so)
                                               __GI_getaddrinfo (inlined)
                                               [0xffffaa804e51af3f] (/usr/bin/ping)
                                               __libc_start_main (/usr/lib64/libc-2.26.so)
                                               [0xffffaa804e51b379] (/usr/bin/ping)
        #
        # perf trace --call-graph=dwarf --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1
        PING ::1(::1) 56 data bytes
        64 bytes from ::1: icmp_seq=1 ttl=64 time=0.057 ms
      
        --- ::1 ping statistics ---
        1 packets transmitted, 1 received, 0% packet loss, time 0ms
        rtt min/avg/max/mdev = 0.057/0.057/0.057/0.000 ms
             0.000 probe_libc:inet_pton:(7f9363b9e350))
                                               __inet_pton (inlined)
                                               gaih_inet.constprop.7 (/usr/lib64/libc-2.26.so)
                                               __GI_getaddrinfo (inlined)
                                               [0xffffa9e8a14e0f3f] (/usr/bin/ping)
                                               __libc_start_main (/usr/lib64/libc-2.26.so)
                                               [0xffffa9e8a14e1379] (/usr/bin/ping)
        #
        # perf trace --call-graph=fp --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1
        PING ::1(::1) 56 data bytes
        64 bytes from ::1: icmp_seq=1 ttl=64 time=0.077 ms
      
        --- ::1 ping statistics ---
        1 packets transmitted, 1 received, 0% packet loss, time 0ms
        rtt min/avg/max/mdev = 0.077/0.077/0.077/0.000 ms
             0.000 probe_libc:inet_pton:(7f4947e1c350))
                                               __inet_pton (inlined)
                                               gaih_inet.constprop.7 (/usr/lib64/libc-2.26.so)
                                               __GI_getaddrinfo (inlined)
                                               [0xffffaa716d88ef3f] (/usr/bin/ping)
                                               __libc_start_main (/usr/lib64/libc-2.26.so)
                                               [0xffffaa716d88f379] (/usr/bin/ping)
        #
        # perf trace --no-syscalls -e probe_libc:inet_pton/call-graph=fp/ ping -6 -c 1 ::1
        PING ::1(::1) 56 data bytes
        64 bytes from ::1: icmp_seq=1 ttl=64 time=0.078 ms
      
        --- ::1 ping statistics ---
        1 packets transmitted, 1 received, 0% packet loss, time 0ms
        rtt min/avg/max/mdev = 0.078/0.078/0.078/0.000 ms
             0.000 probe_libc:inet_pton:(7fa157696350))
                                               __GI___inet_pton (/usr/lib64/libc-2.26.so)
                                               getaddrinfo (/usr/lib64/libc-2.26.so)
                                               [0xffffa9ba39c74f40] (/usr/bin/ping)
        #
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hendrick Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/r/20180116182650.GE16107@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eabad8c6
  4. 27 12月, 2017 1 次提交
  5. 17 11月, 2017 1 次提交
  6. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  7. 31 10月, 2017 2 次提交
  8. 18 9月, 2017 1 次提交
  9. 27 6月, 2017 1 次提交
  10. 26 4月, 2017 1 次提交
  11. 25 4月, 2017 2 次提交
  12. 20 4月, 2017 2 次提交
  13. 27 3月, 2017 1 次提交
  14. 07 3月, 2017 2 次提交
  15. 21 1月, 2017 2 次提交
  16. 16 12月, 2016 1 次提交
  17. 23 11月, 2016 4 次提交
  18. 21 10月, 2016 15 次提交
    • J
      perf c2c report: Add --show-all option · af09b2d3
      Jiri Olsa 提交于
      Normally we limit the main list to contain only entries with HITM %
      value > 0.0005, but it might be useful to display all captured entries.
      Adding --show-all option for that.
      Requested-and-Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NJiri 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/n/tip-nokgjdwikbegec5jzj4mxhqc@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      af09b2d3
    • J
      perf c2c report: Add --no-source option · 18f278d2
      Jiri Olsa 提交于
      Add a possibility to disable source line column with new --no-source
      option. It source line data could take lot of time to retrieve, so it
      could be a performance burden for big data.
      Signed-off-by: NJiri 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/n/tip-8p6s2727fq8nbsm3it5gix3p@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      18f278d2
    • J
      perf c2c: Add man page and credits · 465f27a3
      Jiri Olsa 提交于
      Add man page for c2c command and credits to builtin-c2c.c file.
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NJiri 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/n/tip-twbp391v8v9f5idp584hlfov@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      465f27a3
    • J
      perf c2c report: Add help windows · 9a406eb6
      Jiri Olsa 提交于
      Adding help windows to display key/action mappings
      for both browsers.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-zni4apopx6a9eyxsosm1ebh1@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9a406eb6
    • J
      perf c2c report: Iterate node display in browser · 1a56a425
      Jiri Olsa 提交于
      Adding TUI support to switch between Node entry versions
      in real time with 'n' key.
      Signed-off-by: NJiri 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/n/tip-xqbw4h4dxig54wff7fd14lao@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1a56a425
    • J
      perf c2c report: Add support to manage symbol name length · 590b6a3a
      Jiri Olsa 提交于
      The width of symbol and source line entries could get really long
      and not convenient to display. Adding support to display only
      patrt of such strings and possibility to switch to full length
      by uing --full-symbols option or 's' key in TUI browser.
      Signed-off-by: NJiri 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/n/tip-yxf5hfteyfaoi8xrgczqtyha@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      590b6a3a
    • J
      perf c2c report: Add cacheline index entry · bb342dae
      Jiri Olsa 提交于
      It's convenient to have an index for each cacheline to help discussions
      about results over the phone.
      
      Add new 'Index' and 'Num' fields in main and single cacheline tables.
      
      $ perf c2c report
        =================================================
                   Shared Data Cache Line Table
        =================================================
        #
        #                              Total      Lcl  ----- LLC Load Hitm -----
        # Index           Cacheline  records     Hitm    Total      Lcl      Rmt  ...
        # .....  ..................  .......  .......  .......  .......  .......
        #
              0  0xffff880036233b40        1   11.11%        1        1        0
              1  0xffff88009ccb2900        1   11.11%        1        1        0
              2  0xffff8800b5b3bc40        7   11.11%        1        1        0
        ...
      
        =================================================
              Shared Cache Line Distribution Pareto
        =================================================
        #
        #        ----- HITM -----  -- Store Refs --        Data address
        #   Num      Rmt      Lcl   L1 Hit  L1 Miss              Offset      Pid  ...
        # .....  .......  .......  .......  .......  ..................  .......
        #
          -------------------------------------------------------------
              0        0        1        0        0  0xffff880036233b40
          -------------------------------------------------------------
                   0.00%  100.00%    0.00%    0.00%                0x30        0
      
          -------------------------------------------------------------
              1        0        1        0        0  0xffff88009ccb2900
          -------------------------------------------------------------
                   0.00%  100.00%    0.00%    0.00%                0x28      549
        ...
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-4dhfagaz57tvrfjbg8nd2h4u@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bb342dae
    • J
      perf c2c report: Recalc width of global sort entries · 25aa84e3
      Jiri Olsa 提交于
      Using resort callbacks to compute the columns' width.
      
      Computing only the global ones, c2c entries have fixed width only.
      Signed-off-by: NJiri 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/n/tip-zyayvq2u3dzyf3y7i9jza0lw@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      25aa84e3
    • J
      perf c2c report: Allow to set cacheline sort fields · fc9c630e
      Jiri Olsa 提交于
      Allowing user to configure the way the single cacheline
      data are sorted after being sorted by offset.
      
      Adding 'c' option to specify sorting fields for single cacheline:
      
          -c, --coalesce <coalesce fields>
                                coalesce fields: pid,tid,iaddr,dso
      
      It's allowed to use following combination of fields:
        pid   - process pid
        tid   - process tid
        iaddr - code address
        dso   - shared object
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-aka8z31umxoq2gqr5mjd81zr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fc9c630e
    • J
      perf c2c report: Add support to choose local HITMs · 55b95776
      Jiri Olsa 提交于
      Currently we sort and limit displayed data based on the remote HITMs
      count. Adding support to switch to local HITMs via --display option:
      
              --display ...     lcl,rmt
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-inykbom2f19difvsu1e18avr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      55b95776
    • J
      perf c2c report: Limit the cachelines table entries · 9857b717
      Jiri Olsa 提交于
      Add a limit for entries number of the cachelines table entries. By
      default now it's the 0.0005% minimum of remote HITMs.
      
      Also display only cachelines with remote hitm or store data.
      Signed-off-by: NJiri 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/n/tip-inykbom2f19difvsu1e18avr@git.kernel.org
      [ Disabled for now ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9857b717
    • J
      perf c2c report: Allow to report callchains · dd805768
      Jiri Olsa 提交于
      Add --call-graph option to properly setup callchain code. Adding default
      settings to display callchains whenever they are stored in the
      perf.data.
      
      Committer Notes:
      
      Testing it:
      
        [root@jouet ~]# perf c2c record -a -g sleep 5
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 5.331 MB perf.data (4263 samples) ]
        [root@jouet ~]# perf evlist -v
        cpu/mem-loads,ldlat=30/P: type: 4, size: 112, config: 0x1cd, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ADDR|CALLCHAIN|ID|CPU|PERIOD|DATA_SRC|WEIGHT, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1, precise_ip: 3, mmap_data: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, { bp_addr, config1 }: 0x1f
        cpu/mem-stores/P: type: 4, size: 112, config: 0x82d0, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ADDR|CALLCHAIN|ID|CPU|PERIOD|DATA_SRC|WEIGHT, read_format: ID, disabled: 1, inherit: 1, freq: 1, precise_ip: 3, sample_id_all: 1
        [root@jouet ~]# perf c2c report --stats
        =================================================
                    Trace Event Information
        =================================================
          Total records                     :       4263
          Locked Load/Store Operations      :        220
          Load Operations                   :       2130
          Loads - uncacheable               :          1
          Loads - IO                        :          7
          Loads - Miss                      :         86
          Loads - no mapping                :          5
          Load Fill Buffer Hit              :        609
          Load L1D hit                      :        612
        =================================================
                    Trace Event Information
        =================================================
          Total records                     :       4263
          Locked Load/Store Operations      :        220
          Load Operations                   :       2130
          Loads - uncacheable               :          1
          Loads - IO                        :          7
          Loads - Miss                      :         86
          Loads - no mapping                :          5
          Load Fill Buffer Hit              :        609
          Load L1D hit                      :        612
          Load L2D hit                      :         27
          Load LLC hit                      :        607
          Load Local HITM                   :         15
          Load Remote HITM                  :          0
          Load Remote HIT                   :          0
          Load Local DRAM                   :        176
          Load Remote DRAM                  :          0
          Load MESI State Exclusive         :        176
          Load MESI State Shared            :          0
          Load LLC Misses                   :        176
          LLC Misses to Local DRAM          :      100.0%
          LLC Misses to Remote DRAM         :        0.0%
          LLC Misses to Remote cache (HIT)  :        0.0%
          LLC Misses to Remote cache (HITM) :        0.0%
          Store Operations                  :       2133
          Store - uncacheable               :          0
          Store - no mapping                :          1
          Store L1D Hit                     :       1967
          Store L1D Miss                    :        165
          No Page Map Rejects               :        145
          Unable to parse data source       :          0
      
        =================================================
            Global Shared Cache Line Event Information
        =================================================
          Total Shared Cache Lines          :         15
          Load HITs on shared lines         :         26
          Fill Buffer Hits on shared lines  :          7
          L1D hits on shared lines          :          3
          L2D hits on shared lines          :          0
          LLC hits on shared lines          :         16
          Locked Access on shared lines     :          2
          Store HITs on shared lines        :          8
          Store L1D hits on shared lines    :          7
          Total Merged records              :         23
      
        =================================================
                         c2c details
        =================================================
          Events                            : cpu/mem-loads,ldlat=30/P
                                            : cpu/mem-stores/P
        [root@jouet ~]#
      
        [root@jouet ~]# perf c2c report
      Shared Data Cache Line Table (2378 entries)
                              Total           --- LLC Load Hitm --  -- Store Reference -  - Load Dram -   LLC      Total  - Core Load Hit -
                 Cacheline  records    %hitm  Total   Lcl      Rmt  Total  L1Hit  L1Miss  Lcl  Rmt        Ld Miss  Loads   FB       L1   L2
      - 0xffff880024380c00       10    0.00%      0     0        0      6      6       0    0    0        0            4    1        3    0
         - 0.13% _raw_spin_lock_irqsave
            - 0.07% ep_poll
                 sys_epoll_wait
                 do_syscall_64
                 return_from_SYSCALL_64
               + 0x103573
            - 0.05% ep_poll_callback
                 __wake_up_common
               - __wake_up_sync_key
                  - 0.02% pipe_read
                       __vfs_read
                       vfs_read
                       sys_read
                       do_syscall_64
                       return_from_SYSCALL_64
                       0xfdad
                  + 0.02% sock_def_readable
            + 0.02% ep_scan_ready_list.constprop.12
         + 0.00% mutex_lock
         + 0.00% __wake_up_common
      + 0xffff880024380c40        1    0.00%      0     0        0      1      1       0    0    0        0            0    0        0    0
      + 0xffff880024380c80        1    0.00%      0     0        0      0      0       0    0    0        0            1    0        0    0
      - 0xffff8800243e9f00        1    0.00%      0     0        0      1      1       0    0    0        0            0    0        0    0
           enqueue_entity
           enqueue_task_fair
           activate_task
           ttwu_do_activate
           try_to_wake_up
           wake_up_process
           hrtimer_wakeup
           __hrtimer_run_queues
           hrtimer_interrupt
           local_apic_timer_interrupt
           smp_apic_timer_interrupt
           apic_timer_interrupt
           cpuidle_enter
           call_cpuidle
      help
      
       -------------
      
      And when presing 'd' to see the cacheline details:
      
      Cacheline 0xffff880024380c00
        ----- HITM -----  -- Store Refs --                                       --------- cycles -----  cpu
            Rmt      Lcl   L1 Hit  L1 Miss    Off     Pid                   Tid  rmt hitm lcl hitm load  cnt                      Symbol
      -   0.00%    0.00%  100.00%    0.00%    0x0    1473  1474:Chrome_ChildIOT         0        0   41    2  [k] _raw_spin_lock_irqsave [kernel]
         - _raw_spin_lock_irqsave
            - 51.52% ep_poll
                 sys_epoll_wait
                 do_syscall_64
                 return_from_SYSCALL_64
               - 0x103573
                    47.19% 0
                    4.33% 0xc30bd
            - 35.93% ep_poll_callback
                 __wake_up_common
               - __wake_up_sync_key
                  - 18.20% pipe_read
                       __vfs_read
                       vfs_read
                       sys_read
                       do_syscall_64
                       return_from_SYSCALL_64
                       0xfdad
                  - 17.73% sock_def_readable
                       unix_stream_sendmsg
                       sock_sendmsg
                       ___sys_sendmsg
                       __sys_sendmsg
                       sys_sendmsg
                       do_syscall_64
                       return_from_SYSCALL_64
                       __GI___libc_sendmsg
                       0x12c036af1fc0
                       0x16a4050
                       0x894928ec83485354
            + 12.45% ep_scan_ready_list.constprop.12
      +   0.00%    0.00%    0.00%    0.00%    0x8    1473  1474:Chrome_ChildIOT         0        0  102    1  [k] mutex_lock             [kernel]
      +   0.00%    0.00%    0.00%    0.00%   0x38    1473  1473:chrome                  0        0   88    1  [k] __wake_up_common       [kernel]
      
      help
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-inykbom2f19difvsu1e18avr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dd805768
    • J
      perf c2c report: Add c2c related stats stdio output · 2709b97d
      Jiri Olsa 提交于
      Display c2c related configuration options/setup.
      So far it's output of monitored events:
      
        $ perf c2c report --stats
        ...
      
        =================================================
                         c2c details
        =================================================
          Events                            : cpu/mem-loads,ldlat=50/pp
                                            : cpu/mem-stores/pp
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      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/n/tip-ypz84f3a9fumyttrxurm458z@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2709b97d
    • J
      perf c2c report: Add shared cachelines stats stdio output · 7ef2efaa
      Jiri Olsa 提交于
      Display global shared cachelines related stats table as part of the
      stdio output or when --stats option is speicified:
      
        $ perf c2c report --stats
        ...
        =================================================
            Global Shared Cache Line Event Information
        =================================================
          Total Shared Cache Lines          :       1384
          Load HITs on shared lines         :       5995
          Fill Buffer Hits on shared lines  :       1726
          L1D hits on shared lines          :       1943
          L2D hits on shared lines          :          0
          LLC hits on shared lines          :       1360
          Locked Access on shared lines     :       1993
          Store HITs on shared lines        :       1504
          Store L1D hits on shared lines    :       1446
          Total Merged records              :       3527
      Original-patch-by: NDick Fowles <rfowles@redhat.com>
      Original-patch-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.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/n/tip-p0gty8ctbdzisrniwqxhqmhq@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ef2efaa
    • J
      perf c2c report: Add global stats stdio output · 74c63a25
      Jiri Olsa 提交于
      Display global stats table as part of the stdio output
      or when --stats option is speicified:
      
        $ perf c2c report --stats
        =================================================
                    Trace Event Information
        =================================================
          Total records                     :      41237
          Locked Load/Store Operations      :       4075
          Load Operations                   :      20526
          Loads - uncacheable               :          0
          Loads - IO                        :          0
          Loads - Miss                      :        552
          Loads - no mapping                :         31
          Load Fill Buffer Hit              :       7333
          Load L1D hit                      :       6398
          Load L2D hit                      :        144
          Load LLC hit                      :       4889
          Load Local HITM                   :       1185
          Load Remote HITM                  :        838
          Load Remote HIT                   :         52
          Load Local DRAM                   :        183
          Load Remote DRAM                  :        106
          Load MESI State Exclusive         :        289
          Load MESI State Shared            :          0
          Load LLC Misses                   :       1179
          LLC Misses to Local DRAM          :       15.5%
          LLC Misses to Remote DRAM         :        9.0%
          LLC Misses to Remote cache (HIT)  :        4.4%
          LLC Misses to Remote cache (HITM) :       71.1%
          Store Operations                  :      20711
          Store - uncacheable               :          0
          Store - no mapping                :          1
          Store L1D Hit                     :      20158
          Store L1D Miss                    :        552
          No Page Map Rejects               :          7
          Unable to parse data source       :          0
      Original-patch-by: NDick Fowles <rfowles@redhat.com>
      Original-patch-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.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/n/tip-qkyvao3qsrnwazf0w1jvsh7z@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      74c63a25