1. 03 7月, 2020 3 次提交
    • A
      perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result · 7ff520b0
      Adrian Hunter 提交于
      Using ctrl-F ('Find') would not find 'unknown' because it matches id zero.
      Fix by excluding id zero from selection.
      
      Example:
      
        $ perf record -e intel_pt//u uname
        Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.034 MB perf.data ]
        $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
        2020-06-26 15:32:14.928997 Creating database ...
        2020-06-26 15:32:14.933971 Writing records...
        2020-06-26 15:32:15.535251 Adding indexes
        2020-06-26 15:32:15.542993 Dropping unused tables
        2020-06-26 15:32:15.549716 Done
        $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
        Select: Reports -> Context-Sensitive Call Graph
        Press: Ctrl-F
        Enter: unknown
        Press: Enter
      
      Before: gets stuck
      After: tree is expanded to line showing 'unknown'
      
      Fixes: 254c0d82 ("perf scripts python: exported-sql-viewer.py: Factor out CallGraphModelBase")
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-5-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ff520b0
    • A
      perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result · 3a3cf7c5
      Adrian Hunter 提交于
      Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find')
      would not expand the tree to the result. Fix by using setExpanded().
      
      Example:
      
        $ perf record -e intel_pt//u uname
        Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.034 MB perf.data ]
        $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls
        2020-06-26 15:32:14.928997 Creating database ...
        2020-06-26 15:32:14.933971 Writing records...
        2020-06-26 15:32:15.535251 Adding indexes
        2020-06-26 15:32:15.542993 Dropping unused tables
        2020-06-26 15:32:15.549716 Done
        $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
      
        Select: Reports -> Context-Sensitive Call Graph    or     Reports -> Call Tree
        Press: Ctrl-F
        Enter: main
        Press: Enter
      
      Before: line showing 'main' does not display
      
      After: tree is expanded to line showing 'main'
      
      Fixes: ebd70c7d ("perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph")
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-4-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3a3cf7c5
    • A
      perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument · 640432e6
      Adrian Hunter 提交于
      Python 3.8 is requiring that arguments being packed as integers are also
      integers.  Add int() accordingly.
      
       Before:
      
         $ perf record -e intel_pt//u uname
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:10.547256 Creating database...
         2020-06-25 16:09:10.733185 Writing to intermediate files...
         Traceback (most recent call last):
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1106, in synth_data
             cbr(id, raw_buf)
           File "/home/ahunter/libexec/perf-core/scripts/python/export-to-postgresql.py", line 1058, in cbr
             value = struct.pack("!hiqiiiiii", 4, 8, id, 4, cbr, 4, MHz, 4, percent)
         struct.error: required argument is not an integer
         Fatal Python error: problem in Python trace event handler
         Python runtime state: initialized
      
         Current thread 0x00007f35d3695780 (most recent call first):
         <no Python frame>
         Aborted (core dumped)
      
       After:
      
         $ dropdb perf_data_db
         $ rm -rf perf_data_db-perf-data
         $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-postgresql.py perf_data_db branches calls
         2020-06-25 16:09:40.990267 Creating database...
         2020-06-25 16:09:41.207009 Writing to intermediate files...
         2020-06-25 16:09:41.270915 Copying to database...
         2020-06-25 16:09:41.382030 Removing intermediate files...
         2020-06-25 16:09:41.384630 Adding primary keys
         2020-06-25 16:09:41.541894 Adding foreign keys
         2020-06-25 16:09:41.677044 Dropping unused tables
         2020-06-25 16:09:41.703761 Done
      
      Fixes: aba44287 ("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events")
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200629091955.17090-2-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      640432e6
  2. 23 6月, 2020 1 次提交
  3. 06 5月, 2020 1 次提交
    • A
      perf flamegraph: Use /bin/bash for report and record scripts · 19ce2321
      Arnaldo Carvalho de Melo 提交于
      As all the other tools/perf/scripts/python/bin/*-{report,record}
      scripts, fixing the this problem reported by Daniel Diaz:
      
        Our OpenEmbedded builds detected an issue with 5287f926 ("perf
        script: Add flamegraph.py script"):
          ERROR: perf-1.0-r9 do_package_qa: QA Issue:
        /usr/libexec/perf-core/scripts/python/bin/flamegraph-report contained
        in package perf-python requires /usr/bin/sh, but no providers found in
        RDEPENDS_perf-python? [file-rdeps]
      
        This means that there is a new binary pulled in in the shebang line
        which was unaccounted for: `/usr/bin/sh`. I don't see any other usage
        of /usr/bin/sh in the kernel tree (does not even exist on my Ubuntu
        dev machine) but plenty of /bin/sh. This patch is needed:
        -----8<----------8<----------8<-----
        diff --git a/tools/perf/scripts/python/bin/flamegraph-record
        b/tools/perf/scripts/python/bin/flamegraph-record
        index 725d66e71570..a2f3fa25ef81 100755
        --- a/tools/perf/scripts/python/bin/flamegraph-record
        +++ b/tools/perf/scripts/python/bin/flamegraph-record
        @@ -1,2 +1,2 @@
        -#!/usr/bin/sh
        +#!/bin/sh
         perf record -g "$@"
        diff --git a/tools/perf/scripts/python/bin/flamegraph-report
        b/tools/perf/scripts/python/bin/flamegraph-report
        index b1a79afd903b..b0177355619b 100755
        --- a/tools/perf/scripts/python/bin/flamegraph-report
        +++ b/tools/perf/scripts/python/bin/flamegraph-report
        @@ -1,3 +1,3 @@
        -#!/usr/bin/sh
        +#!/bin/sh
         # description: create flame graphs
         perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py -- "$@"
        ----->8---------->8---------->8-----
      
      Fixes: 5287f926 ("perf script: Add flamegraph.py script")
      Reported-by: NDaniel Díaz <daniel.diaz@linaro.org>
      Acked-by: NAndreas Gerstmayr <agerstmayr@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: lkft-triage@lists.linaro.org
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/CAEUSe7_wmKS361mKLTB1eYbzYXcKkXdU26BX5BojdKRz8MfPCw@mail.gmail.com
      Link: http://lore.kernel.org/lkml/20200505170320.GZ30487@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      19ce2321
  4. 16 4月, 2020 1 次提交
    • A
      perf script: Add flamegraph.py script · 5287f926
      Andreas Gerstmayr 提交于
      This script works in tandem with d3-flame-graph to generate flame graphs
      from perf. It supports two output formats: JSON and HTML (the default).
      The HTML format will look for a standalone d3-flame-graph template file
      in /usr/share/d3-flame-graph/d3-flamegraph-base.html and fill in the
      collected stacks.
      
      Usage:
      
          perf record -a -g -F 99 sleep 60
          perf script report flamegraph
      
      Combined:
      
          perf script flamegraph -a -F 99 sleep 60
      
      Committer testing:
      
      Tested both with "PYTHON=python3" and with the default, that uses
      python2-devel:
      
      Complete set of instructions:
      
        $ mkdir /tmp/build/perf
        $ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin
        $ export PATH=~/bin:$PATH
        $ perf record -a -g -F 99 sleep 60
        $ perf script report flamegraph
      
      Now go and open the generated flamegraph.html file in a browser.
      
      At first this required building with PYTHON=python3, but after I
      reported this Andreas was kind enough to send a patch making it work
      with both python and python3.
      Signed-off-by: NAndreas Gerstmayr <agerstmayr@redhat.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Brendan Gregg <bgregg@netflix.com>
      Cc: Martin Spier <mspier@netflix.com>
      Link: http://lore.kernel.org/lkml/20200320151355.66302-1-agerstmayr@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5287f926
  5. 13 11月, 2019 1 次提交
  6. 07 10月, 2019 6 次提交
  7. 30 8月, 2019 1 次提交
  8. 11 7月, 2019 1 次提交
  9. 10 7月, 2019 7 次提交
  10. 09 7月, 2019 2 次提交
  11. 25 6月, 2019 2 次提交
  12. 05 6月, 2019 7 次提交
    • A
      perf scripts python: exported-sql-viewer.py: Select find text when find bar is activated · 80b3fb64
      Adrian Hunter 提交于
      The user probably wants to replace the find text, so select the find
      text when the find bar is activated.
      
      That is fairly standard behaviour for search text entry.
      
      Entering text will replace the current text, but using edit keys
      (arrows, home, end etc) cancels the selection and enables editing.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-23-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      80b3fb64
    • A
      perf scripts python: exported-sql-viewer.py: Add IPC information to Call Tree · b3b66079
      Adrian Hunter 提交于
      Enhance the call tree to display IPC information if it is available.
      
      Committer testing:
      
      [acme@quaco adrian.hunter]$ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db
      
      Reports -> Call Tree, then expand a few trees, then select with the
      mouse and press control+C (copy):
      
      Call Path                   Object        Call Time Time  Time(%) Insn  Insn   Cyc   Cyc   IPC Branch Branch
      ▼ simple-retpolin                                   (ns)          Cnt   Cnt(%) Cnt   Cnt(%)     Count Count(%)
        ▼ 23003:23003
          ▼ _start                ld-2.28.so    112195670 218295 100.0 127746 100.0 207320 100.0 0.62 13046 100.0
             unknown             unknown       112195987   3202   1.5      0   0.0      0   0.0    0     1   0.0
             _dl_start           ld-2.28.so    112199189 188471  86.3 123394  96.6 180007  86.8 0.69 12529  96.0
            ▼ _dl_init            ld-2.28.so    112387660  13406   6.1   3207   2.5  14868   7.2 0.22   327   2.5
               call_init.part.0  ld-2.28.so    112387773    117   0.9     70   2.2    639   4.3 0.11     3   0.9
               call_init.part.0  ld-2.28.so    112387890  13129  97.9   3103  96.8  14100  94.8 0.22   315  96.3
               call_init.part.0  ld-2.28.so    112401020      0   0.0      0   0.0      0   0.0    0     2   0.6
            ▼ _start              simple-retpol 112401066  12899   5.9   1142   0.9  11561   5.6 0.10   184   1.4
               unknown           unknown       112401388    846   6.6      0   0.0      0   0.0    0     1   0.5
              ▼ __libc_start_main libc-2.28.so  112402344  11621  90.1   1129  98.9  10350  89.5 0.11   181  98.4
                 __cxa_atexit    libc-2.28.so  112402360   2302  19.8    101   8.9   1817  17.6 0.06    13   7.2
                 __libc_csu_init simple-retpol 112404673    121   1.0     43   3.8    340   3.3 0.13     8   4.4
                 _setjmp         libc-2.28.so  112404794     74   0.6     46   4.1    206   2.0 0.22     4   2.2
                ▼ main            simple-retpol 112404892     44   0.4     23   2.0    126   1.2 0.18    12   6.6
                  ▼ foo           simple-retpol 112404892     19  43.2     12  52.2     55  43.7 0.22     5  41.7
                      bar         simple-retpol 112404896     12  63.2      3  25.0     34  61.8 0.09     1  20.0
                  ▼ foo           simple-retpol 112404911     25  56.8     11  47.8     71  56.3 0.15     5  41.7
                     bar         simple-retpol 112404924     10  40.0      3  27.3     27  38.0 0.11     1  20.0
                 exit            libc-2.28.so  112404936   9029  77.7    878  77.8   7765  75.0 0.11   139  76.8
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-22-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b3b66079
    • A
      perf scripts python: exported-sql-viewer.py: Add IPC information to Call Graph Graph · 38a846d4
      Adrian Hunter 提交于
      Enhance the call graph to display IPC information if it is available.
      
      Committer testing:
      
      [acme@quaco adrian.hunter]$ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db
      
      Reports -> Context Sensitive Callgraph, then expand a few trees, then
      select with the mouse and press control+C:
      
      Call Path                     Object          Count Time(ns) Time(%) Insn Insn   Cyc   Cyc    IPC Branch Branch
      ▼ simple-retpolin                                                    Cnt  Cnt(%) Cnt   Cnt(%)     Cnt    Cnt(%)
        ▼ 23003:23003
          ▼ _start                  ld-2.28.so         1 218295   100.0  127746 100.0 207320 100.0 0.62 13046  100.0
             unknown               unknown            1   3202     1.5       0   0.0      0   0.0    0     1    0.0
             _dl_start             ld-2.28.so         1 188471    86.3  123394  96.6 180007  86.8 0.69 12529   96.0
             _dl_init              ld-2.28.so         1  13406     6.1    3207   2.5  14868   7.2 0.22   327    2.5
            ▼ _start                simple-retpoline   1  12899     5.9    1142   0.9  11561   5.6 0.10   184    1.4
               unknown             unknown            1    846     6.6       0   0.0      0   0.0    0     1    0.5
              ▼ __libc_start_main   libc-2.28.so       1  11621    90.1    1129  98.9  10350  89.5 0.11   181   98.4
                 __cxa_atexit      libc-2.28.so       1   2302    19.8     101   8.9   1817  17.6 0.06    13    7.2
                 __libc_csu_init   simple-retpoline   1    121     1.0      43   3.8    340   3.3 0.13     8    4.4
                ▼ _setjmp           libc-2.28.so       1     74     0.6      46   4.1    206   2.0 0.22     4    2.2
                  ▼ __sigsetjmp     libc-2.28.so       1     74   100.0      46 100.0    206 100.0 0.22     3   75.0
                     __sigjmp_save libc-2.28.so       1      0     0.0       0   0.0      0   0.0    0     1   33.3
                ▼ main              simple-retpoline   1     44     0.4      23   2.0    126   1.2 0.18    12    6.6
                  ▼ foo             simple-retpoline   2     44   100.0      23 100.0    126 100.0 0.18    10   83.3
                      bar           simple-retpoline   2     22    50.0       6  26.1     61  48.4 0.10     2   20.0
                 exit              libc-2.28.so       1   9029    77.7     878  77.8   7765  75.0 0.11   139   76.8
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-21-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      38a846d4
    • A
      perf scripts python: exported-sql-viewer.py: Add CallGraphModelParams · 4a0979d4
      Adrian Hunter 提交于
      Add a parameter to call graph and call tree, to determine whether IPC
      information is available.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-20-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4a0979d4
    • A
      perf scripts python: exported-sql-viewer.py: Add IPC information to the Branch reports · 530e22fd
      Adrian Hunter 提交于
      Enhance the "All branches" and "Selected branches" reports to display IPC
      information if it is available.
      
      Committer testing:
      
      So, testing this I noticed that it all starts with the left arrow in every
      line, that should mean there is some tree there, i.e. look at all those 
      symbols:
      
      Reports -> All Branches:
      
      Time              CPU Command         PID   TID   Branch Type  In Tx  Insn Cnt  Cyc Cnt  IPC  Branch
       187836112195670 7   simple-retpolin 23003 23003 trace begin  No     0         0        0               0 unknown (unknown) -> 7f6f33d4f110
      +_start (ld-2.28.so)
       187836112195987 7   simple-retpolin 23003 23003 trace end    No     0         883      0    7f6f33d4f110 _start (ld-2.28.so) -> 0 unknown
      +(unknown)
       187836112199189 7   simple-retpolin 23003 23003 trace begin  No     0         0        0               0 unknown (unknown) -> 7f6f33d4f110
      +_start (ld-2.28.so)
       187836112199189 7   simple-retpolin 23003 23003 call         No     0         0        0    7f6f33d4f113 _start+0x3 (ld-2.28.so) -> 7f6f33d4ff50
      +_dl_start (ld-2.28.so)
       187836112199544 7   simple-retpolin 23003 23003 trace end    No     17        996      0.02 7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so) -> 0
      +unknown (unknown)
       187836112200939 7   simple-retpolin 23003 23003 trace begin  No     0         0        0               0 unknown (unknown) -> 7f6f33d4ff73
      +_dl_start+0x23 (ld-2.28.so)
       187836112201229 7   simple-retpolin 23003 23003 trace end    No     1         816      0.00 7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so) -> 0
      +unknown (unknown)
       187836112203500 7   simple-retpolin 23003 23003 trace begin  No     0         0        0               0 unknown (unknown) -> 7f6f33d4ff7a
      +_dl_start+0x2a (ld-2.28.so)
      
      But if you click on it, that  disappears and a new click doesn't make
      it reappear, looks buggy, minor oddity, reported to Adrian.
      
      Reports -> Selected Branches, then ask for branches in the ld-2.28.so
      DSO:
      
      Time               CPU  Command          PID    TID    Branch Type        In Tx  Insn Cnt  Cyc Cnt  IPC   Branch
       187836112195987  7    simple-retpolin  23003  23003  trace end          No     0         883      0     7f6f33d4f110 _start (ld-2.28.so) -> 0 unknown (unknown)
       187836112199189  7    simple-retpolin  23003  23003  trace begin        No     0         0        0                0 unknown (unknown) -> 7f6f33d4f110 _start (ld-2.28.so)
       187836112199189  7    simple-retpolin  23003  23003  call               No     0         0        0     7f6f33d4f113 _start+0x3 (ld-2.28.so) -> 7f6f33d4ff50 _dl_start (ld-2.28.so)
       187836112199544  7    simple-retpolin  23003  23003  trace end          No     17        996      0.02  7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so) -> 0 unknown (unknown)
       187836112200939  7    simple-retpolin  23003  23003  trace begin        No     0         0        0                0 unknown (unknown) -> 7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so)
       187836112201229  7    simple-retpolin  23003  23003  trace end          No     1         816      0.00  7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so) -> 0 unknown (unknown)
       187836112203500  7    simple-retpolin  23003  23003  trace begin        No     0         0        0                0 unknown (unknown) -> 7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so)
       187836112203528  7    simple-retpolin  23003  23003  unconditional jump No     0         0        0     7f6f33d4ffe7 _dl_start+0x97 (ld-2.28.so) -> 7f6f33d5000b _dl_start+0xbb (ld-2.28.so)
       187836112203528  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so)
       187836112203528  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so)
       187836112203539  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d50025 _dl_start+0xd5 (ld-2.28.so) -> 7f6f33d50210 _dl_start+0x2c0 (ld-2.28.so)
       187836112203539  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d5021a _dl_start+0x2ca (ld-2.28.so) -> 7f6f33d50360 _dl_start+0x410 (ld-2.28.so)
       187836112203539  7    simple-retpolin  23003  23003  unconditional jump No     0         0        0     7f6f33d50377 _dl_start+0x427 (ld-2.28.so) -> 7f6f33d4ffff _dl_start+0xaf (ld-2.28.so)
       187836112203539  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so)
       187836112203562  7    simple-retpolin  23003  23003  conditional jump   No     0         0        0     7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so)
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-19-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      530e22fd
    • A
      perf scripts python: export-to-postgresql.py: Export IPC information · ec7f448e
      Adrian Hunter 提交于
      Export cycle and instruction counts on samples and calls tables.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-18-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ec7f448e
    • A
      perf scripts python: export-to-sqlite.py: Export IPC information · 64adadb3
      Adrian Hunter 提交于
      Export cycle and instruction counts on samples and calls tables.
      
      Committer testing:
      
      First runs some workload collecting intel_pt with the 'cyc' ter just for
      userspace:
      
        [root@quaco adrian.hunter]# perf record -o simple-retpoline.perf.data -e intel_pt/cyc/u ./simple-retpoline
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.035 MB simple-retpoline.perf.data ]
        [root@quaco adrian.hunter]#
      
      Then use the export-to-sqlite.py script to see if the changes in this
      cset don't make it to break and if the changes in the db schema are the
      ones expected:
      
        [root@quaco adrian.hunter]# perf script -i simple-retpoline.perf.data --itrace=be -s ~acme/libexec/perf-core/scripts/python/export-to-sqlite.py simple-retpoline.db branches calls
        2019-05-31 11:50:46.942710 Creating database ...
        2019-05-31 11:50:46.949663 Writing records...
        2019-05-31 11:50:47.224033 Adding indexes
        2019-05-31 11:50:47.231599 Done
        [root@quaco adrian.hunter]#
      
      Now lets use the db:
      
        [root@quaco adrian.hunter]# sqlite3 simple-retpoline.db
        SQLite version 3.26.0 2018-12-01 12:34:55
        Enter ".help" for usage hints.
        sqlite> .schema samples
        CREATE TABLE samples (id integer NOT NULL PRIMARY KEY,evsel_id bigint,machine_id bigint,thread_id bigint,comm_id bigint,dso_id bigint,symbol_id bigint,sym_offset bigint,ip bigint,time bigint,cpuinteger,to_dso_id bigint,to_symbol_id bigint,to_sym_offset bigint,to_ip bigint,branch_type integer,in_tx boolean,call_path_id bigint,insn_count bigint,cyc_count bigint);
        sqlite>
      
      Cool, the 'insn_count' and 'cyc_count' are there, now lets see if we can
      use them in a query:
      
        sqlite> select insn_count,cyc_count from samples where cyc_count > 1500 and insn_count < 10;
        6|1507
        sqlite> select insn_count,cyc_count from samples where cyc_count > 1500;
        118|2210
        140|1516
        3783|1861
        132|1521
        6|1507
        sqlite>
      
      Seems to work :-)
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190520113728.14389-17-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      64adadb3
  13. 31 5月, 2019 1 次提交
  14. 29 5月, 2019 5 次提交
  15. 16 5月, 2019 1 次提交