1. 21 10月, 2016 7 次提交
    • 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
    • J
      perf c2c report: Add TUI cacheline browser · f1c5fd4d
      Jiri Olsa 提交于
      Adding simple TUI cacheline browser. It triggers when you press 'd' in
      the main browser on the specific cacheline.
      
      It allows to navigate through cacheline's offsets and display callchains
      (implemented in following patches).
      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-fovjwgyusv3rz5qxk3hnahtl@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f1c5fd4d
    • J
      perf c2c report: Add main TUI browser · 5a1a99cd
      Jiri Olsa 提交于
      Add the main cachelines TUI browser. It allows to navigate through
      cachelines and display their details and callchains (implemented in the
      following patches).
      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: Kim Phillips <kim.phillips@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-pk632k4h1uwc5t0lqc7k61zg@git.kernel.org
      Link: http://lkml.kernel.org/r/20161021001706.GB23970@krava
      [ Handle file with no entries, fixing segfault reported by Kim Phillips ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5a1a99cd
  2. 20 10月, 2016 33 次提交