]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
7 years agotools lib: Add for_each_clear_bit macro
Jiri Olsa [Mon, 10 Oct 2016 07:26:33 +0000 (09:26 +0200)]
tools lib: Add for_each_clear_bit macro

Adding for_each_clear_bit macro plus all its the necessary backbone
functions. Taken from related kernel code. It will be used in following
patch.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-cayv2zbqi0nlmg5sjjxs1775@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agotools lib traceevent: Add version for traceevent shared object
Jiri Olsa [Sun, 31 Jul 2016 14:52:34 +0000 (16:52 +0200)]
tools lib traceevent: Add version for traceevent shared object

Adding version support for libtraceevent.so object.

Using the existing EVENT_PARSE_VERSION variable to construct
the .so object version string, which now consists of:

  $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION)

Looks like it was created for this purpose anyway.

The build will now produce following traeceevent libraries:

  $ ll libtraceevent*
  libtraceevent.a
  libtraceevent.so -> libtraceevent.so.1.1.0
  libtraceevent.so.1 -> libtraceevent.so.1.1.0
  libtraceevent.so.1.1.0

Also the install target will carry them:

  $ make DESTDIR=/tmp/krava prefix=/usr install
  INSTALL  trace_plugins
  INSTALL  libtraceevent.a
  INSTALL  libtraceevent.so.1.1.0

  $ find /tmp/krava/ | xargs ls -l
  ...
  /tmp/krava/usr/lib64:
  total 572
  libtraceevent.a
  libtraceevent.so -> libtraceevent.so.1.1.0
  libtraceevent.so.1 -> libtraceevent.so.1.1.0
  libtraceevent.so.1.1.0
  ...

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-v64z62fh0dwt0ueie5usrnac@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agotools lib traceevent: Rename LIB_FILE to LIB_TARGET
Jiri Olsa [Mon, 1 Aug 2016 07:55:51 +0000 (09:55 +0200)]
tools lib traceevent: Rename LIB_FILE to LIB_TARGET

To ease up following patch.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-zpv5gd8y7clwrhh6dq03ucd5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agotools lib traceevent: Add do_install_mkdir Makefile function
Jiri Olsa [Sun, 31 Jul 2016 14:49:33 +0000 (16:49 +0200)]
tools lib traceevent: Add do_install_mkdir Makefile function

Decompose the do_install function to ease up
the following patch a little.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-zzs19yx8seyors532vuer37w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agotools lib traceevent: Add install_headers target
Jiri Olsa [Sat, 16 Jul 2016 16:57:51 +0000 (18:57 +0200)]
tools lib traceevent: Add install_headers target

Adding install_headers target to install all headers
under 'include/traceevent' path, like:

  $ make DESTDIR=/tmp/krava prefix=/usr install_headers
  $ find /tmp/krava/ -type f
  /tmp/krava/usr/include/traceevent/kbuffer.h
  /tmp/krava/usr/include/traceevent/event-utils.h
  /tmp/krava/usr/include/traceevent/event-parse.h

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-if70lj3zhdc3csdqm5webjvc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf tools: Sync copy of x86's syscall table
Arnaldo Carvalho de Melo [Fri, 7 Oct 2016 16:25:51 +0000 (13:25 -0300)]
perf tools: Sync copy of x86's syscall table

To get up to the recent compat pread/pwrite changes, that albeit not
being used by 'perf trace' due to some raw_syscalls tracepoint
limitations, trigger this warning when building perf:

  Warning: x86_64's syscall_64.tbl differs from kernel

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ilgqhxd9ubkg5f66bx0bht2t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf script: Support insn and insnlen
Andi Kleen [Fri, 7 Oct 2016 13:42:27 +0000 (16:42 +0300)]
perf script: Support insn and insnlen

When looking at Intel PT traces with perf script it is useful to have
some indication of the instruction. Dump the instruction bytes and
instruction length, which can be used for simple pattern analysis in
scripts.

% perf record -e intel_pt// foo
% perf script --itrace=i0ns -F ip,insn,insnlen
 ffffffff8101232f ilen: 5 insn: 0f 1f 44 00 00
 ffffffff81012334 ilen: 1 insn: 5b
 ffffffff81012335 ilen: 1 insn: 5d
 ffffffff81012336 ilen: 1 insn: c3
 ffffffff810123e3 ilen: 1 insn: 5b
 ffffffff810123e4 ilen: 2 insn: 41 5c
 ffffffff810123e6 ilen: 1 insn: 5d
 ffffffff810123e7 ilen: 1 insn: c3
 ffffffff810124a6 ilen: 2 insn: 31 c0
 ffffffff810124a8 ilen: 9 insn: 41 83 bc 24 a8 01 00 00 01
 ffffffff810124b1 ilen: 2 insn: 75 87
...

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/1475847747-30994-4-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf intel-pt/bts: Report instruction bytes and length in sample
Andi Kleen [Fri, 7 Oct 2016 13:42:26 +0000 (16:42 +0300)]
perf intel-pt/bts: Report instruction bytes and length in sample

Change Intel PT and BTS to pass up the length and the instruction
bytes of the decoded or sampled instruction in the perf sample.

The decoder already knows this information, we just need to pass it
up. Since it is only a couple of movs it is not very expensive.

Handle instruction cache too. Make sure ilen is always initialized.

Used in the next patch.

[Adrian: re-base on top (and adjust for) instruction buffer size tidy-up]
[Adrian: add BTS support and adjust commit message accordingly]

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/1475847747-30994-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf intel-pt/bts: Tidy instruction buffer size usage
Adrian Hunter [Fri, 7 Oct 2016 13:42:25 +0000 (16:42 +0300)]
perf intel-pt/bts: Tidy instruction buffer size usage

Tidy instruction buffer size usage in preparation for copying the
instruction bytes onto samples.

The instruction buffer is presently used for debugging, so rename its
size macro from INTEL_PT_INSN_DBG_BUF_SZ to INTEL_PT_INSN_BUF_SZ, and
use it everywhere.

Note that the maximum instruction size is 15 which is a less efficient size
to copy than 16, which is why a separate buffer size is used.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1475847747-30994-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoMerge tag 'perf-c2c-for-mingo-20161021' of git://git.kernel.org/pub/scm/linux/kernel...
Ingo Molnar [Sat, 22 Oct 2016 08:22:05 +0000 (10:22 +0200)]
Merge tag 'perf-c2c-for-mingo-20161021' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Pull new 'perf c2c' tool from Arnaldo Carvalho de Melo:

- The 'perf c2c' tool provides means for Shared Data C2C/HITM analysis.

  It allows you to track down cacheline contention. The tool is based
  on x86's load latency and precise store facility events provided by
  Intel CPUs.

  It was tested by Joe Mario and has proven to be useful, finding some
  cacheline contentions. Joe also wrote a blog about c2c tool with
  examples:

    https://joemario.github.io/blog/2016/09/01/c2c-blog/

  Excerpt of the content on this site:

  ---
    At a high level, “perf c2c” will show you:

    * The cachelines where false sharing was detected.
    * The readers and writers to those cachelines, and the offsets where those accesses occurred.
    * The pid, tid, instruction addr, function name, binary object name for those readers and writers.
    * The source file and line number for each reader and writer.
    * The average load latency for the loads to those cachelines.
    * Which numa nodes the samples a cacheline came from and which CPUs were involved.

    Using perf c2c is similar to using the Linux perf tool today.
    First collect data with “perf c2c record” Then generate a report output with “perf c2c report”
  ---

  There one finds extensive details on using the tool, with tips on
  reducing the volume of samples while still capturing enough to do
  its job. (Dick Fowles, Joe Mario, Don Zickus, Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
7 years agoperf c2c report: Add --show-all option
Jiri Olsa [Tue, 11 Oct 2016 11:52:05 +0000 (13:52 +0200)]
perf c2c report: Add --show-all option

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: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add --no-source option
Jiri Olsa [Tue, 11 Oct 2016 11:39:47 +0000 (13:39 +0200)]
perf c2c report: Add --no-source option

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: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Add man page and credits
Jiri Olsa [Fri, 26 Aug 2016 08:36:12 +0000 (10:36 +0200)]
perf c2c: Add man page and credits

Add man page for c2c command and credits to builtin-c2c.c file.

Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add help windows
Jiri Olsa [Wed, 17 Aug 2016 13:54:58 +0000 (15:54 +0200)]
perf c2c report: Add help windows

Adding help windows to display key/action mappings
for both browsers.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Iterate node display in browser
Jiri Olsa [Sun, 10 Jul 2016 14:30:27 +0000 (16:30 +0200)]
perf c2c report: Iterate node display in browser

Adding TUI support to switch between Node entry versions
in real time with 'n' key.

Signed-off-by: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add support to manage symbol name length
Jiri Olsa [Sun, 10 Jul 2016 14:25:15 +0000 (16:25 +0200)]
perf c2c report: Add support to manage symbol name length

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: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add cacheline index entry
Jiri Olsa [Wed, 6 Jul 2016 13:40:09 +0000 (15:40 +0200)]
perf c2c report: Add cacheline index entry

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Recalc width of global sort entries
Jiri Olsa [Tue, 7 Jun 2016 17:02:43 +0000 (19:02 +0200)]
perf c2c report: Recalc width of global sort entries

Using resort callbacks to compute the columns' width.

Computing only the global ones, c2c entries have fixed width only.

Signed-off-by: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Allow to set cacheline sort fields
Jiri Olsa [Tue, 24 May 2016 12:14:38 +0000 (14:14 +0200)]
perf c2c report: Allow to set cacheline sort fields

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: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add support to choose local HITMs
Jiri Olsa [Sun, 29 May 2016 08:21:45 +0000 (10:21 +0200)]
perf c2c report: Add support to choose local HITMs

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Limit the cachelines table entries
Jiri Olsa [Wed, 17 Aug 2016 12:55:23 +0000 (14:55 +0200)]
perf c2c report: Limit the cachelines table entries

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: Jiri 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: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Allow to report callchains
Jiri Olsa [Wed, 11 May 2016 16:23:48 +0000 (18:23 +0200)]
perf c2c report: Allow to report callchains

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add c2c related stats stdio output
Jiri Olsa [Sat, 27 Aug 2016 09:40:23 +0000 (11:40 +0200)]
perf c2c report: Add c2c related stats stdio output

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add shared cachelines stats stdio output
Jiri Olsa [Fri, 1 Jul 2016 09:12:11 +0000 (11:12 +0200)]
perf c2c report: Add shared cachelines stats stdio output

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: Dick Fowles <rfowles@redhat.com>
Original-patch-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add global stats stdio output
Jiri Olsa [Mon, 2 May 2016 18:01:59 +0000 (20:01 +0200)]
perf c2c report: Add global stats stdio output

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: Dick Fowles <rfowles@redhat.com>
Original-patch-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add TUI cacheline browser
Jiri Olsa [Mon, 2 May 2016 16:30:44 +0000 (18:30 +0200)]
perf c2c report: Add TUI cacheline browser

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add main TUI browser
Jiri Olsa [Wed, 6 Jan 2016 15:59:02 +0000 (16:59 +0100)]
perf c2c report: Add main TUI browser

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: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add stdio output support
Jiri Olsa [Tue, 3 May 2016 12:32:56 +0000 (14:32 +0200)]
perf c2c report: Add stdio output support

Adding the --stdio option output support. The output
tables are dumped directly to the stdio.

$ perf c2c report
  =================================================
             Shared Data Cache Line Table
  =================================================
  #
  #                       Total           ----- LLC Load Hitm -----  ---- Store Reference ----  --- Load Dram ----      LLC    Total  ----- Core Load Hit -----  -- LLC Load Hit --
  #          Cacheline  records    %hitm    Total      Lcl      Rmt    Total    L1Hit   L1Miss       Lcl       Rmt  Ld Miss    Loads       FB       L1       L2       Llc       Rmt
  # ..................  .......  .......  .......  .......  .......  .......  .......  .......  ........  ........  .......  .......  .......  .......  .......  ........  ........
  #
    0xffff88000235f840       17    0.00%        0        0        0       17       17        0         0         0        0        0        0        0        0         0         0
  ...

  =================================================
        Shared Cache Line Distribution Pareto
  =================================================
  #
  # ----- HITM -----  -- Store Refs --        Data address                                  ---------- cycles ----------       cpu                                   Shared
  #     Rmt      Lcl   L1 Hit  L1 Miss              Offset      Pid                    Tid  rmt hitm  lcl hitm      load       cnt                Symbol             Object  Node
  # .......  .......  .......  .......  ..................  .......  .....................  ........  ........  ........  ........  ....................  .................  ....
  #
    ------------------------------------------------------
          0        0       17        0  0xffff88000235f840
    ------------------------------------------------------
      0.00%    0.00%    5.88%    0.00%                 0x0    11474    11474:kworker/u16:5         0         0         0         1  [k] rmap_walk_file             [kernel.kallsyms]   0
      0.00%    0.00%    5.88%    0.00%                0x10    11474    11474:kworker/u16:5         0         0         0         1  [k] lock_page_memcg            [kernel.kallsyms]   0
      0.00%    0.00%   11.76%    0.00%                0x20    11474    11474:kworker/u16:5         0         0         0         1  [k] page_mapping               [kernel.kallsyms]   0
      0.00%    0.00%   64.71%    0.00%                0x28    11474    11474:kworker/u16:5         0         0         0         1  [k] __test_set_page_writeback  [kernel.kallsyms]   0
      0.00%    0.00%   11.76%    0.00%                0x30    11474    11474:kworker/u16:5         0         0         0         1  [k] page_mapped                [kernel.kallsyms]   0
  ...

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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-eorco9r0oeesjve77pkkg43s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Set final resort fields
Jiri Olsa [Tue, 10 May 2016 12:08:29 +0000 (14:08 +0200)]
perf c2c report: Set final resort fields

Set resort/display fields for both cachelines and single cacheline
displays.

Cachelines are sorted on:

  rmt_hitm

will be made configurable in following patches.

Following fields are display for cachelines:

  dcacheline
  tot_recs
  percent_hitm
  tot_hitm,lcl_hitm,rmt_hitm
  stores,stores_l1hit,stores_l1miss
  dram_lcl,dram_rmt
  ld_llcmiss
  tot_loads
  ld_fbhit,ld_l1hit,ld_l2hit
  ld_lclhit,ld_rmthit

The single cacheline is sort by:

  offset,rmt_hitm,lcl_hitm

will be made configurable in following patches.

Following fields are display for each cacheline:

  percent_rmt_hitm
  percent_lcl_hitm
  percent_stores_l1hit
  percent_stores_l1miss
  offset
  pid
  tid
  mean_rmt
  mean_lcl
  mean_load
  cpucnt
  symbol
  dso
  node

Signed-off-by: Jiri 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-0rclftliywdq9qr2sjbugb6b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Setup number of header lines for hists
Jiri Olsa [Tue, 24 May 2016 08:12:31 +0000 (10:12 +0200)]
perf c2c report: Setup number of header lines for hists

Allow to setup number of header lines for c2c hists objects.

Signed-off-by: Jiri 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-4ilsf0ulubrd4y96g7tnpwzk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add src line sort key
Jiri Olsa [Sun, 10 Jul 2016 13:47:40 +0000 (15:47 +0200)]
perf c2c report: Add src line sort key

It is to be displayed in the single cacheline output:

  cl_srcline

It displays source line related to the code address that accessed
cacheline. It's a wrapper to global srcline sort entry.

Signed-off-by: Jiri 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-cmnzgm37mjz56ozsg4mnbgxq@git.kernel.org
[ Remove __maybe_unused from now used 'he' parameter in filter_cb() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'cpucnt' sort key
Jiri Olsa [Thu, 23 Jun 2016 21:05:52 +0000 (23:05 +0200)]
perf c2c report: Add 'cpucnt' sort key

It is to be displayed in the single cacheline output:

  cpucnt

It displays number of distinct cpus that hit cacheline.

Signed-off-by: Jiri 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-ib2kdwam52fby9u2k3ij6lhm@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add stats related sort keys
Jiri Olsa [Sun, 5 Jun 2016 11:40:53 +0000 (13:40 +0200)]
perf c2c report: Add stats related sort keys

It is to be displayed in the single cacheline output:

  median, mean_rmt, mean_lcl, mean_load, stddev

It displays statistics hits related to cacheline accesses.

Signed-off-by: Jiri 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-m1r4uc9lcykf1jhpvwk2gkj8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'node' sort key
Jiri Olsa [Fri, 3 Jun 2016 13:40:28 +0000 (15:40 +0200)]
perf c2c report: Add 'node' sort key

It is to be displayed in the single cacheline output:

  node

It displays nodes hits related to cacheline accesses.

The node filed comes in 3 flavors:
  - node IDs separated by ','
  - node IDs with stats for each ID, in following format:
      Node{cpus %hitms %stores}
  - node IDs with list of affected CPUs in following format:
      Node{cpu list}

User can switch the flavor with -N option (-NN,-NNN).
It will be available in TUI to switch this with 'n' key.

Signed-off-by: Jiri 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-6742e6g0r7n63y5wc4rrgxx5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'symbol' and 'dso' sort keys
Jiri Olsa [Tue, 24 May 2016 21:41:52 +0000 (23:41 +0200)]
perf c2c report: Add 'symbol' and 'dso' sort keys

They are to be displayed in the single cacheline output:

  symbol, dso

They are wrappers for global sort_sym and sort_dso sort entries with c2c
specific headers.

Signed-off-by: Jiri 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-6742e6g0r7n63y5wc4rrgxx5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'tid' sort key
Jiri Olsa [Wed, 25 May 2016 06:50:10 +0000 (08:50 +0200)]
perf c2c report: Add 'tid' sort key

It is to be displayed in the single cacheline output:

  tid

It's a wrapper for global sort_thread sort entry with c2c specific
header.

Signed-off-by: Jiri 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-fr0socae5skzvz5qbkl85prn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'pid' sort key
Jiri Olsa [Tue, 24 May 2016 11:09:47 +0000 (13:09 +0200)]
perf c2c report: Add 'pid' sort key

It is to be displayed in the single cacheline output:

  pid

We currently don't have a single 'pid' sort/display entry, which would
output just pid number, hence adding it into c2c code.

Signed-off-by: Jiri 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-3o23qrspxc99b04ci1swlzr6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add dram related sort keys
Jiri Olsa [Sat, 28 May 2016 10:30:13 +0000 (12:30 +0200)]
perf c2c report: Add dram related sort keys

They are to be displayed in the main cachelines overall output:

  dram_lcl, dram_rmt

They display DRAM rmt/lcl access numbers for specific cacheline.

Signed-off-by: Jiri 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-tl3qqi9ehk6g1fla4z7y0ykd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add hitm/store percent related sort keys
Jiri Olsa [Wed, 4 May 2016 10:16:50 +0000 (12:16 +0200)]
perf c2c report: Add hitm/store percent related sort keys

They are to be displayed in the single cacheline output:

  percent_rmt_hitm, percent_lcl_hitm, percent_stores_l1hit, percent_stores_l1miss

They display percentage of HITMs/stores for specific offset in the
cacheline.

Signed-off-by: Jiri 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-t365aosxtdut8sgrgn8mfoe4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add hitm percent sort key
Jiri Olsa [Wed, 4 May 2016 08:50:09 +0000 (10:50 +0200)]
perf c2c report: Add hitm percent sort key

It is to be displayed in the main cachelines overall output:

  percent_hitm

It displays HITMs percentage for cacheline.

It counts remote HITMs at the moment, but it is changed later to support
local as well, based on the sort configuration.

Signed-off-by: Jiri 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-czd17qsh5u5z0yc1estz9l2y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add total loads sort key
Jiri Olsa [Thu, 19 May 2016 07:52:37 +0000 (09:52 +0200)]
perf c2c report: Add total loads sort key

It is to be displayed in the main cachelines overall output:

  tot_loads

It displays sum of all load accesses for cacheline.

Signed-off-by: Jiri 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-czd17qsh5u5z0yc1estz9l2y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add total record sort key
Jiri Olsa [Wed, 4 May 2016 08:35:29 +0000 (10:35 +0200)]
perf c2c report: Add total record sort key

It is to be displayed in the main cachelines overall output:

  tot_recs

It displays sum of all cachelines accesses.

Signed-off-by: Jiri 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-wojujik7zzen770mxn295mxa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add llc load miss dimension key
Jiri Olsa [Thu, 19 May 2016 08:10:51 +0000 (10:10 +0200)]
perf c2c report: Add llc load miss dimension key

It is to be displayed in the main cachelines overall output:

  ld_llcmiss

It displays bare number of LLC misses for cacheline.

Signed-off-by: Jiri 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-wojujik7zzen770mxn295mxa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add llc and remote loads related dimension keys
Jiri Olsa [Wed, 4 May 2016 08:27:51 +0000 (10:27 +0200)]
perf c2c report: Add llc and remote loads related dimension keys

Add 2 LLC load related dimension key wrappers.

They are to be displayed in the main cachelines overall output:

  ld_lclhit, ld_rmthit

They display bare numbers of LLC and remote loads for cacheline.

Signed-off-by: Jiri 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-ahjg0voaufefboemjuj9yefh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add loads related dimension keys
Jiri Olsa [Wed, 4 May 2016 08:18:24 +0000 (10:18 +0200)]
perf c2c report: Add loads related dimension keys

Add 3 loads related dimension key wrappers.

They are to be displayed in the main cachelines overall output:

  ld_fbhit, ld_l1hit, ld_l2hit

They all display bare numbers of loads for
FB (Fill Buffer), L1 and L2 cache.

Signed-off-by: Jiri 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-wxrzhy74zl8fvkvgjae3w1ju@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add stores related dimension keys
Jiri Olsa [Wed, 4 May 2016 08:10:11 +0000 (10:10 +0200)]
perf c2c report: Add stores related dimension keys

Add 5 stores related dimension key wrappers.

First 3 are to be displayed in the main cachelines overall output:

  stores, stores_l1hit, stores_l1miss

The latter 2 are to be displayed within single cacheline output:

  cl_stores_l1hit, cl_stores_l1miss

They all display bare numbers of stores for cacheline or its related
offsets.

Signed-off-by: Jiri 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-qeml8v53v6q3wl5n8vgbf64r@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add hitm related dimension keys
Jiri Olsa [Mon, 23 May 2016 14:20:14 +0000 (16:20 +0200)]
perf c2c report: Add hitm related dimension keys

Adding 5 hitm related dimension key wrappers.

First 3 are to be displayed in the main cachelines overall output:

  tot_hitm, lcl_hitm, rmt_hitm

The latter 2 are to be displayed within single cacheline output:

  cl_rmt_hitm, cl_lcl_hitm

They all display bare numbers of remote/local/total HITMs for cacheline
or its related offsets.

Signed-off-by: Jiri 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-iju5239xa5heqqben65g1u7e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'iaddr' dimension key
Jiri Olsa [Tue, 3 May 2016 19:48:56 +0000 (21:48 +0200)]
perf c2c report: Add 'iaddr' dimension key

It displays the code address (as hex number) responsible for the
accesses.

Using c2c wrapper to standard 'symbol_iaddr' object to define own header
and simple (just address) code address output.

Signed-off-by: Jiri 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-rhshygbst6kr75kju0muwt5x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'offset' dimension key
Jiri Olsa [Fri, 29 Apr 2016 12:37:06 +0000 (14:37 +0200)]
perf c2c report: Add 'offset' dimension key

It displays cacheline offset as hex number.

Signed-off-by: Jiri 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-m0424ye98lqveg5nopto8qww@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add 'dcacheline' dimension key
Jiri Olsa [Thu, 22 Sep 2016 15:36:48 +0000 (17:36 +0200)]
perf c2c report: Add 'dcacheline' dimension key

It displays cacheline address as hex number.

Using c2c wrapper to standard 'dcacheline' object to defined own header
and simple (just address) cacheline output.

Signed-off-by: Jiri 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/r/1474558645-19956-21-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add header macros
Jiri Olsa [Thu, 22 Sep 2016 15:36:47 +0000 (17:36 +0200)]
perf c2c report: Add header macros

Adding helping macros to define header objects.  It will be used in
following patches, that add new dimensions.

The c2c report will support 2 line headers, hence we only define
line[0/1] in macros.

Signed-off-by: Jiri 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/r/1474558645-19956-20-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Decode c2c_stats for hist entries
Jiri Olsa [Thu, 22 Sep 2016 15:36:46 +0000 (17:36 +0200)]
perf c2c report: Decode c2c_stats for hist entries

Decoding and storing c2c_stats for each hist entry.  Changing related
function to work with c2c_* objects.

Signed-off-by: Jiri 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/r/1474558645-19956-19-git-send-email-jolsa@kernel.org
[ Add '.nr_entries = 0' to the c2c_stats initialization to fix the build on older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add cacheline hists processing
Jiri Olsa [Thu, 22 Sep 2016 15:36:45 +0000 (17:36 +0200)]
perf c2c report: Add cacheline hists processing

Store cacheline related entries in nested hist object for each cacheline
data. Nested entries are sorted by 'offset' within related cacheline.

We will allow specific sort keys to be configured for nested cacheline
data entries in following patches.

Signed-off-by: Jiri 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/r/1474558645-19956-18-git-send-email-jolsa@kernel.org
[ he__get_hists() should return NULL when c2c_hists__init() fails ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add sample processing
Jiri Olsa [Thu, 22 Sep 2016 15:36:44 +0000 (17:36 +0200)]
perf c2c report: Add sample processing

Adding basic sample processing specific hist_entry allocation callbacks
(via hists__add_entry_ops).

Overloading 'struct hist_entry' object with new 'struct c2c_hist_entry'.
The new hist entry object will carry specific stats and nested hists
objects.

Signed-off-by: Jiri 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/r/1474558645-19956-17-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Fallback to standard dimensions
Jiri Olsa [Thu, 22 Sep 2016 15:36:43 +0000 (17:36 +0200)]
perf c2c report: Fallback to standard dimensions

Fallback to standard dimensions in case we don't find the dimension
within c2c ones.

Signed-off-by: Jiri 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/r/1474558645-19956-16-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add sort_entry dimension support
Jiri Olsa [Thu, 22 Sep 2016 15:36:42 +0000 (17:36 +0200)]
perf c2c report: Add sort_entry dimension support

Allow to reuse 'struct sort_entry' objects within c2c dimension support.

In case the 'struct sort_entry' object meets the need of c2c report we
will use it directly in following patches.

Signed-off-by: Jiri 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/r/1474558645-19956-15-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c report: Add dimension support
Jiri Olsa [Thu, 22 Sep 2016 15:36:41 +0000 (17:36 +0200)]
perf c2c report: Add dimension support

Adding bare bones of dimension support for c2c report.

Main interface functions are:

  c2c_hists__init
  c2c_hists__reinit

which re/initialize 'struct c2c_hists' object with sort/display entries
string, in a similar way that setup_sorting function does.

We overload the dimension to provide multi line header support for
sort/display entries.

Also we overload base 'struct perf_hpp_fmt' object with 'struct c2c_fmt'
to define c2c specific functions to deal with multi line headers and
spans.

Signed-off-by: Jiri 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/r/1474558645-19956-14-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Add report subcommand
Jiri Olsa [Thu, 22 Sep 2016 15:36:40 +0000 (17:36 +0200)]
perf c2c: Add report subcommand

Adding c2c report subcommand. It reads the perf.data and displays shared
data analysis.

This patch adds report basic wirings. It gets fully implemented in
following patches.

Signed-off-by: Jiri 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/r/1474558645-19956-13-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Add record subcommand
Jiri Olsa [Thu, 22 Sep 2016 15:36:39 +0000 (17:36 +0200)]
perf c2c: Add record subcommand

Adding c2c record subcommand. It setups options related to HITM
cacheline analysis and calls standard perf record command.

  $ sudo perf c2c record -v -- -a
  calling: record -W -d --sample-cpu -e cpu/mem-loads,ldlat=30/P -e cpu/mem-stores/P -a
  ...

It produces perf.data, which is to be reported by perf c2c report, that
comes in following patches.

Details are described in the man page, which is added in one of the
following patches.

Committer notes:

Testing it:

  # perf c2c record -a sleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 5.050 MB perf.data (412 samples) ]
  # ls -la perf.data
  -rw-------. 1 root root 5301752 Oct  4 13:32 perf.data
  # perf evlist
  cpu/mem-loads,ldlat=30/P
  cpu/mem-stores/P
  # 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|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|ID|CPU|PERIOD|DATA_SRC|WEIGHT, read_format: ID, disabled: 1, inherit: 1, freq: 1, precise_ip: 3, sample_id_all: 1
  #
  # perf report --stdio
  <SNIP>
  # Total Lost Samples: 14
  # Samples: 216  of event 'cpu/mem-loads,ldlat=30/P'
  # Event count (approx.): 15207
  # Overhead  Symbol                                 Shared Object
  # ........  .....................................  ............................
      10.32%  [k] update_blocked_averages            [kernel.vmlinux]
       3.43%  [.] 0x00000000001a2122                 qemu-system-x86_64 (deleted)
       2.52%  [k] enqueue_entity                     [kernel.vmlinux]
       1.88%  [.] g_main_context_query               libglib-2.0.so.0.4800.2
       1.86%  [k] __schedule                         [kernel.vmlinux]
  <SNIP>
  # Samples: 196  of event 'cpu/mem-stores/P'
  # Event count (approx.): 14771346
  # Overhead  Symbol                               Shared Object
  # ........  ...................................  ............................
      13.91%  [k] intel_idle                       [kernel.vmlinux]
       3.02%  [.] 0x00000000022f06ea               chrome
       2.94%  [.] 0x00000000001a1b4c               qemu-system-x86_64 (deleted)
       2.94%  [.] 0x000000000019d8e4               qemu-system-x86_64 (deleted)
       2.38%  [.] 0x00000000001a1c52               qemu-system-x86_64 (deleted)
  <SNIP>

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo 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/r/1474558645-19956-12-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Add c2c command
Jiri Olsa [Thu, 22 Sep 2016 15:36:38 +0000 (17:36 +0200)]
perf c2c: Add c2c command

Adding c2c command base wirings. Its implementation is going to be added
gradually in following patches.

Signed-off-by: Jiri 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/r/1474558645-19956-11-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Introduce c2c_add_stats function
Jiri Olsa [Thu, 22 Sep 2016 15:36:31 +0000 (17:36 +0200)]
perf c2c: Introduce c2c_add_stats function

Introducing c2c_add_stats function helper to cumulate c2c_stats.

Original-patch-by: Dick Fowles <rfowles@redhat.com>
Original-patch-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Jiri 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/r/1474558645-19956-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf c2c: Introduce c2c_decode_stats function
Jiri Olsa [Thu, 22 Sep 2016 15:36:30 +0000 (17:36 +0200)]
perf c2c: Introduce c2c_decode_stats function

Introducing c2c_decode_stats function, which decodes
data_src data into new struct c2c_stats.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Original-patch-by: Dick Fowles <rfowles@redhat.com>
Original-patch-by: Don Zickus <dzickus@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/r/1474558645-19956-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoMerge tag 'perf-vendor_events-for-mingo-20161018' of git://git.kernel.org/pub/scm...
Ingo Molnar [Wed, 19 Oct 2016 13:22:26 +0000 (15:22 +0200)]
Merge tag 'perf-vendor_events-for-mingo-20161018' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Pull perf/vendor_events event tables from Arnaldo Carvalho de Melo:

- Add JSON files with vendor event naming for Intel and Power8 processors,
  allowing users of tools like oprofile to keep using the event names they
  are used to, as well as people reading vendor documentation, where such
  naming is used. (Andi Kleen, Sukadev Bhattiprolu)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
7 years agoMerge tag 'for-f2fs-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
Linus Torvalds [Tue, 18 Oct 2016 21:15:23 +0000 (14:15 -0700)]
Merge tag 'for-f2fs-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs

Pull f2fs bugfix from Jaegeuk Kim:
 "This fixes a bug which referenced the wrong pointer, sum_page, in
  f2fs_gc.  It was newly introduced in 4.9-rc1.

* tag 'for-f2fs-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
  f2fs: fix wrong sum_page pointer in f2fs_gc

7 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:59:04 +0000 (09:59 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes, plus hw-enablement changes:

   - fix persistent RAM handling
   - remove pkeys warning
   - remove duplicate macro
   - fix debug warning in irq handler
   - add new 'Knights Mill' CPU related constants and enable the perf bits"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/uncore: Add Knights Mill CPUID
  perf/x86/intel/rapl: Add Knights Mill CPUID
  perf/x86/intel: Add Knights Mill CPUID
  x86/cpu/intel: Add Knights Mill to Intel family
  x86/e820: Don't merge consecutive E820_PRAM ranges
  pkeys: Remove easily triggered WARN
  x86: Remove duplicate rtit status MSR macro
  x86/smp: Add irq_enter/exit() in smp_reschedule_interrupt()

7 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:57:12 +0000 (09:57 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixlet from Ingo Molnar:
 "Remove an unused variable"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  alarmtimer: Remove unused but set variable

7 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:53:59 +0000 (09:53 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
 "Fix a crash that can trigger when racing with CPU hotplug: we didn't
  use sched-domains data structures carefully enough in select_idle_cpu()"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/fair: Fix sched domains NULL dereference in select_idle_sibling()

7 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:30:18 +0000 (09:30 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Four tooling fixes, two kprobes KASAN related fixes and an x86 PMU
  driver fix/cleanup"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf jit: Fix build issue on Ubuntu
  perf jevents: Handle events including .c and .o
  perf/x86/intel: Remove an inconsistent NULL check
  kprobes: Unpoison stack in jprobe_return() for KASAN
  kprobes: Avoid false KASAN reports during stack copy
  perf header: Set nr_numa_nodes only when we parsed all the data
  perf top: Fix refreshing hierarchy entries on TUI

7 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:04:17 +0000 (09:04 -0700)]
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar:
 "Two fixes:

   - a file locks fix (missing critical section, bug introduced in this
     merge window)

   - an x86 down_write() stack frame annotation"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking, fs/locks: Add missing file_sem locks
  locking/rwsem/x86: Add stack frame dependency for ____down_write()

7 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 16:01:22 +0000 (09:01 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:
 "Three irqchip driver fixes"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gicv3: Handle loop timeout proper
  irqchip/jcore: Fix lost per-cpu interrupts
  irqchip/eznps: Acknowledge NPS_IPI before calling the handler

7 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Oct 2016 15:35:07 +0000 (08:35 -0700)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc fixes from Ingo Molnar:
 "A CPU hotplug debuggability fix and three objtool false positive
  warnings fixes for new GCC6 code generation patterns"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  cpu/hotplug: Use distinct name for cpu_hotplug.dep_map
  objtool: Skip all "unreachable instruction" warnings for gcov kernels
  objtool: Improve rare switch jump table pattern detection
  objtool: Support '-mtune=atom' stack frame setup instruction

7 years agoMerge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 18 Oct 2016 15:28:08 +0000 (08:28 -0700)]
Merge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fixlet from Stefan Richter:
 "IEEE 1394 subsystem patch: catch an initialization error in the packet
  sniffer nosy"

* tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: nosy: do not ignore errors in ioremap_nocache()

7 years agoMerge tag 'drm-fixes-for-v4.9-rc2' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Tue, 18 Oct 2016 15:05:29 +0000 (08:05 -0700)]
Merge tag 'drm-fixes-for-v4.9-rc2' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Just had a couple of amdgpu fixes and one core fix I wanted to get out
  early to fix some regressions.

  I'm sure I'll have more stuff this week for -rc2"

* tag 'drm-fixes-for-v4.9-rc2' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  drm: Print device information again in debugfs
  drm/amd/powerplay: fix bug stop dpm can't work on Vi.
  drm/amd/powerplay: notify smu no display by default.
  drm/amdgpu/dpm: implement thermal sensor for CZ/ST
  drm/amdgpu/powerplay: implement thermal sensor for CZ/ST
  drm/amdgpu: disable smu hw first on tear down
  drm/amdgpu: fix amdgpu_need_full_reset (v2)
  drm/amdgpu/si_dpm: Limit clocks on HD86xx part
  drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c
  drm/amdgpu: potential NULL dereference in debugfs code
  drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c
  drm/amd/powerplay: fix static checker warnings in iceland_smc.c
  drm/radeon: change vblank_time's calculation method to reduce computational error.
  drm/amdgpu: change vblank_time's calculation method to reduce computational error.
  drm/amdgpu: clarify UVD/VCE special handling for CG
  drm/amd/amdgpu: enable clockgating only after late init
  drm/radeon: allow TA_CS_BC_BASE_ADDR on SI
  drm/amdgpu: initialize the context reset_counter in amdgpu_ctx_init
  drm/amdgpu/gfx8: fix CGCG_CGLS handling
  drm/radeon: fix modeset tear down code
  ...

7 years agolocking, fs/locks: Add missing file_sem locks
Peter Zijlstra [Sat, 8 Oct 2016 08:12:28 +0000 (10:12 +0200)]
locking, fs/locks: Add missing file_sem locks

I overlooked a few code-paths that can lead to
locks_delete_global_locks().

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Bruce Fields <bfields@fieldses.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-fsdevel@vger.kernel.org
Cc: syzkaller <syzkaller@googlegroups.com>
Link: http://lkml.kernel.org/r/20161008081228.GF3142@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
7 years agolocking/rwsem/x86: Add stack frame dependency for ____down_write()
Josh Poimboeuf [Thu, 13 Oct 2016 21:26:15 +0000 (16:26 -0500)]
locking/rwsem/x86: Add stack frame dependency for ____down_write()

Arnd reported the following objtool warning:

  kernel/locking/rwsem.o: warning: objtool: down_write_killable()+0x16: call without frame pointer save/setup

The warning means gcc placed the ____down_write() inline asm (and its
call instruction) before the frame pointer setup in
down_write_killable(), which breaks frame pointer convention and can
result in incorrect stack traces.

Force the stack frame to be created before the call instruction by
listing the stack pointer as an output operand in the inline asm
statement.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1188b7015f04baf361e59de499ee2d7272c59dce.1476393828.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
7 years agobtrfs: assign error values to the correct bio structs
Junjie Mao [Mon, 17 Oct 2016 01:20:25 +0000 (09:20 +0800)]
btrfs: assign error values to the correct bio structs

Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio")
Signed-off-by: Junjie Mao <junjie.mao@enight.me>
Acked-by: David Sterba <dsterba@suse.cz>
Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agox86, pkeys: remove cruft from never-merged syscalls
Dave Hansen [Mon, 17 Oct 2016 20:57:09 +0000 (13:57 -0700)]
x86, pkeys: remove cruft from never-merged syscalls

pkey_set() and pkey_get() were syscalls present in older versions
of the protection keys patches.  The syscall number definitions
were inadvertently left in place.  This patch removes them.

I did a git grep and verified that these are the last places in
the tree that these appear, save for the protection_keys.c tests
and Documentation.  Those spots talk about functions called
pkey_get/set() which are wrappers for the direct PKRU
instructions, not the syscalls.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: mgorman@techsingularity.net
Cc: arnd@arndb.de
Cc: linux-api@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: luto@kernel.org
Cc: akpm@linux-foundation.org
Fixes: f9afc6197e9bb ("x86: Wire up protection keys system calls")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agogeneric syscalls: kill cruft from removed pkey syscalls
Dave Hansen [Mon, 17 Oct 2016 15:18:15 +0000 (08:18 -0700)]
generic syscalls: kill cruft from removed pkey syscalls

pkey_set() and pkey_get() were syscalls present in older versions
of the protection keys patches.  They were fully excised from the
x86 code, but some cruft was left in the generic syscall code.  The
C++ comments were intended to help to make it more glaring to me to
fix them before actually submitting them.  That technique worked,
but later than I would have liked.

I test-compiled this for arm64.

Fixes: a60f7b69d92c0 ("generic syscalls: Wire up memory protection keys syscalls")
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Cc: linux-arch@vger.kernel.org
Cc: mgorman@techsingularity.net
Cc: linux-api@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: luto@kernel.org
Cc: akpm@linux-foundation.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoperf vendor events: Support couple more POWER8 PVRs in mapfile
Madhavan Srinivasan [Mon, 8 Jun 2015 08:05:16 +0000 (13:35 +0530)]
perf vendor events: Support couple more POWER8 PVRs in mapfile

Add support for Power8 PVR 004b0201 for tuleta and 0x004d0200 for
firestone.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
CC: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wr6rf3d3vvggy8180ftt2ro1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add power8 PMU events
Sukadev Bhattiprolu [Thu, 15 Sep 2016 22:09:30 +0000 (18:09 -0400)]
perf vendor events: Add power8 PMU events

Add mapfile.csv and power8.json files for the Power8 processor.

Changelog[v3]
- [Namhyung Kim] Remove text from PublicDescription fields if it is
          identical to or prefix of BriefDescription.

Changelog[v2]
- [Andi Kleen] Replace the vendor-family-model,version fields with
  cpuid,version fields (to simplify mapfile)
- Reuse the JSON files when possible (i.e multiple cpuids can refer
  to the same JSON file) - so drop the 004d0100.json and use
  power8.json in multiple entries in mapfile.
- Add few more Power8 PVRs to mapfile

Changelog[v21]
- Group events into per topic per cpu model.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
CC: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-wr6rf3d3vvggy8180ftt2ro1@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add WestmereEX V2 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:11 +0000 (09:53 -0700)]
perf vendor events: Add WestmereEX V2 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-2comz45lmusdf8i0n2va1ul5@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add WestmereEP-SP V2 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:10 +0000 (09:53 -0700)]
perf vendor events: Add WestmereEP-SP V2 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-rvc0618wzt6indqmvsbpsuwv@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add WestmereEP-DP V2 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:10 +0000 (09:53 -0700)]
perf vendor events: Add WestmereEP-DP V2 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-vuq872d1qdfettbbxkw74yv1@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add SandyBridge V15 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:10 +0000 (09:53 -0700)]
perf vendor events: Add SandyBridge V15 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-5x9p0g7q5peodpow01tvayyf@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Silvermont V13 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:10 +0000 (09:53 -0700)]
perf vendor events: Add Silvermont V13 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-m72axmpkxcdproq9x04zulqs@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Skylake V24 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:10 +0000 (09:53 -0700)]
perf vendor events: Add Skylake V24 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-h6mjvfxcyfx2w4pf22xb3e8d@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add NehalemEX V2 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:09 +0000 (09:53 -0700)]
perf vendor events: Add NehalemEX V2 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-ls90fv1f9japmtqbwfr28acf@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add NehalemEP V2 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:09 +0000 (09:53 -0700)]
perf vendor events: Add NehalemEP V2 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-ae0xxgo3k6w8hczxwqcfzgc7@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add KnightsLanding V9 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:09 +0000 (09:53 -0700)]
perf vendor events: Add KnightsLanding V9 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-3x2we5evro8uhwmergz1mbd7@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Jaketown V20 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:09 +0000 (09:53 -0700)]
perf vendor events: Add Jaketown V20 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-0vzsmw92s0m3mcwmdh27ds12@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add IvyTown V19 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:09 +0000 (09:53 -0700)]
perf vendor events: Add IvyTown V19 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-p5mtp091orxty69pot9vd6ga@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add IvyBridge V18 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:08 +0000 (09:53 -0700)]
perf vendor events: Add IvyBridge V18 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-9nxxibicdvhb2t5wc6rw032m@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add HaswellX V17 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:08 +0000 (09:53 -0700)]
perf vendor events: Add HaswellX V17 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-ungwt9avwpysik3yd1a06kpx@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Haswell V24 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:08 +0000 (09:53 -0700)]
perf vendor events: Add Haswell V24 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-q87xlo75ffonydbmvf6lr18n@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Goldmont V8 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:08 +0000 (09:53 -0700)]
perf vendor events: Add Goldmont V8 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-q87xlo75ffonydbmvf6lr18n@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Bonnell V4 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:08 +0000 (09:53 -0700)]
perf vendor events: Add Bonnell V4 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-7r1wcyb5ucqxsqzcljt3iz3b@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add BroadwellX V10 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:07 +0000 (09:53 -0700)]
perf vendor events: Add BroadwellX V10 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-min8rez83cab2zrb9i3dlkx5@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add Broadwell V17 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:07 +0000 (09:53 -0700)]
perf vendor events: Add Broadwell V17 event file

Add a Intel event file for perf.

Committer note:

Testing it on a ThinkPad t450s:

  [acme@jouet linux]$ perf list
<SNIP>
  Cache:
    l1d.replacement
         [L1D data line replacements]
    l1d_pend_miss.fb_full
         [Cycles a demand request was blocked due to Fill Buffers inavailability]
    l1d_pend_miss.pending
         [L1D miss oustandings duration in cycles]
    l1d_pend_miss.pending_cycles
         [Cycles with L1D load Misses outstanding]
<SNIP>

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-3qh7e0quf7qlttjoz250hfcl@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoperf vendor events: Add BroadwellDE V5 event file
Andi Kleen [Wed, 5 Oct 2016 16:53:07 +0000 (09:53 -0700)]
perf vendor events: Add BroadwellDE V5 event file

Add a Intel event file for perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-q87xlo75ffonydbmvf6lr18n@git.kernel.org
[ Lowercased the directory and file names ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
7 years agoMerge tag 'perf-urgent-for-mingo-20161017' of git://git.kernel.org/pub/scm/linux...
Ingo Molnar [Mon, 17 Oct 2016 14:49:16 +0000 (16:49 +0200)]
Merge tag 'perf-urgent-for-mingo-20161017' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

- Fix handling of NUMA nodes in perf.data files (Jiri Olsa)

- Fix scrolling when refreshing 'perf top --tui --hierarchy' entries (Namhyung Kim)

- Fix building of JIT support on Ubuntu 16.04 (Anton Blanchard)

- Fix handling of events including .c and .o, that were being treated as
  BPF scripts instead of vendor ones (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>