All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/25] perf/core improvements and fixes
@ 2012-10-08 22:32 Arnaldo Carvalho de Melo
  2012-10-09 13:34 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-08 22:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo,
	Andi Kleen, Bernhard Rosenkraenzer, Corey Ashford, David Ahern,
	Dong Hao, Frederic Weisbecker, Irina Tirdea, Jiri Olsa,
	Mike Galbraith, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Pekka Enberg, Peter Zijlstra, Stephane Eranian, Steven Rostedt,
	Wei Yongjun, Xiao Guangrong, arnaldo.melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 139c0815903de1a7865fe1d6beac5e995fefdf46:

  perf hists: Add more helpers for hist entry stat (2012-10-04 13:36:18 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 7747e2f4fb5fb840994613dd1474c17cddb7836b:

  Documentation: add documentation on compiling for Android (2012-10-08 17:44:39 -0300)

----------------------------------------------------------------

perf/core improvements and fixes

. Handle PERF_RECORD_EXIT events in sched and annotate.

. struct machine refactorings to help in top and trace.

. Add on_exit implementation for systems without one, e.g. Android, from
  Bernhard Rosenkraenzer.

. Only process events for vcpus of interest, helps handling large number
  of events, from David Ahern.

. Cross compiling fixes for Android, from Irina Tirdea.

. Add documentation on compiling for Android, from Irina Tirdea.

. perf diff improvements from Jiri Olsa.

. Target (task/user/cpu/syswide) handling improvements, from Namhyung Kim.

. Add support in 'trace' for tracing workload given by command line, from
  Namhyung Kim.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------

Arnaldo Carvalho de Melo (6):
      perf tools: Have the page size value available for all tools
      perf machine: Introduce find_thread method
      perf event: No need to create a thread when handling PERF_RECORD_EXIT
      perf annotate: Handle PERF_RECORD_EXIT events
      perf sched: Handle PERF_RECORD_EXIT events
      perf machine: Carve up event processing specific from perf_tool

Bernhard Rosenkraenzer (1):
      perf tools: Add on_exit implementation

David Ahern (4):
      perf kvm: Only process events for vcpus of interest
      perf kvm: Remove typecast in init_kvm_event_record
      perf kvm: Total count is a u64, print as so
      perf kvm: Add braces around multi-line statements

Irina Tirdea (2):
      perf tools: Update Makefile for Android
      Documentation: add documentation on compiling for Android

Jiri Olsa (8):
      perf diff: Add -b option for perf diff to display paired entries only
      perf diff: Add ratio computation way to compare hist entries
      perf diff: Add option to sort entries based on diff computation
      perf diff: Add weighted diff computation way to compare hist entries
      perf diff: Add -p option to display period values for hist entries
      perf diff: Add -F option to display formula for computation
      perf diff: Include samples without symbol in overall stats
      perf diff: Display empty space for non paired samples

Namhyung Kim (3):
      perf trace: Validate target task/user/cpu argument
      perf trace: Explicitly enable system-wide mode if no option is given
      perf trace: Add support for tracing workload given by command line

Wei Yongjun (1):
      perf tools: Remove duplicated include from trace-event-python.c

 tools/perf/Documentation/android.txt               |   75 ++++
 tools/perf/Documentation/perf-diff.txt             |   60 +++
 tools/perf/Makefile                                |   33 +-
 tools/perf/builtin-annotate.c                      |    3 +-
 tools/perf/builtin-diff.c                          |  405 +++++++++++++++++++-
 tools/perf/builtin-inject.c                        |    6 +-
 tools/perf/builtin-kvm.c                           |   35 +-
 tools/perf/builtin-record.c                        |   32 ++
 tools/perf/builtin-report.c                        |    4 +-
 tools/perf/builtin-sched.c                         |    3 +-
 tools/perf/builtin-script.c                        |    4 +-
 tools/perf/builtin-test.c                          |    2 -
 tools/perf/builtin-top.c                           |    3 +-
 tools/perf/builtin-trace.c                         |   53 ++-
 tools/perf/config/feature-tests.mak                |   20 +-
 tools/perf/perf.c                                  |    2 +
 tools/perf/ui/hist.c                               |  134 ++++++-
 tools/perf/ui/stdio/hist.c                         |    2 +-
 tools/perf/util/build-id.c                         |    2 +-
 tools/perf/util/event.c                            |  215 +----------
 tools/perf/util/event.h                            |    6 +-
 tools/perf/util/evlist.c                           |    3 -
 tools/perf/util/hist.h                             |    8 +
 tools/perf/util/machine.c                          |  277 +++++++++++++
 tools/perf/util/machine.h                          |   19 +
 .../util/scripting-engines/trace-event-python.c    |    1 -
 tools/perf/util/session.c                          |    4 +-
 tools/perf/util/sort.h                             |   18 +
 tools/perf/util/thread.c                           |   41 +-
 tools/perf/util/thread.h                           |    2 +
 tools/perf/util/trace-event-read.c                 |    2 -
 tools/perf/util/util.c                             |    2 +
 tools/perf/util/util.h                             |    2 +
 33 files changed, 1173 insertions(+), 305 deletions(-)
 create mode 100644 tools/perf/Documentation/android.txt
 create mode 100644 tools/perf/util/machine.c
 create mode 100644 tools/perf/util/machine.h

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2012-10-08 22:32 Arnaldo Carvalho de Melo
@ 2012-10-09 13:34 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2012-10-09 13:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Bernhard Rosenkraenzer, Corey Ashford, David Ahern, Dong Hao,
	Frederic Weisbecker, Irina Tirdea, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt, Wei Yongjun,
	Xiao Guangrong, arnaldo.melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 139c0815903de1a7865fe1d6beac5e995fefdf46:
> 
>   perf hists: Add more helpers for hist entry stat (2012-10-04 13:36:18 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 7747e2f4fb5fb840994613dd1474c17cddb7836b:
> 
>   Documentation: add documentation on compiling for Android (2012-10-08 17:44:39 -0300)
> 
> ----------------------------------------------------------------
> 
> perf/core improvements and fixes
> 
> . Handle PERF_RECORD_EXIT events in sched and annotate.
> 
> . struct machine refactorings to help in top and trace.
> 
> . Add on_exit implementation for systems without one, e.g. Android, from
>   Bernhard Rosenkraenzer.
> 
> . Only process events for vcpus of interest, helps handling large number
>   of events, from David Ahern.
> 
> . Cross compiling fixes for Android, from Irina Tirdea.
> 
> . Add documentation on compiling for Android, from Irina Tirdea.
> 
> . perf diff improvements from Jiri Olsa.
> 
> . Target (task/user/cpu/syswide) handling improvements, from Namhyung Kim.
> 
> . Add support in 'trace' for tracing workload given by command line, from
>   Namhyung Kim.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> 
> Arnaldo Carvalho de Melo (6):
>       perf tools: Have the page size value available for all tools
>       perf machine: Introduce find_thread method
>       perf event: No need to create a thread when handling PERF_RECORD_EXIT
>       perf annotate: Handle PERF_RECORD_EXIT events
>       perf sched: Handle PERF_RECORD_EXIT events
>       perf machine: Carve up event processing specific from perf_tool
> 
> Bernhard Rosenkraenzer (1):
>       perf tools: Add on_exit implementation
> 
> David Ahern (4):
>       perf kvm: Only process events for vcpus of interest
>       perf kvm: Remove typecast in init_kvm_event_record
>       perf kvm: Total count is a u64, print as so
>       perf kvm: Add braces around multi-line statements
> 
> Irina Tirdea (2):
>       perf tools: Update Makefile for Android
>       Documentation: add documentation on compiling for Android
> 
> Jiri Olsa (8):
>       perf diff: Add -b option for perf diff to display paired entries only
>       perf diff: Add ratio computation way to compare hist entries
>       perf diff: Add option to sort entries based on diff computation
>       perf diff: Add weighted diff computation way to compare hist entries
>       perf diff: Add -p option to display period values for hist entries
>       perf diff: Add -F option to display formula for computation
>       perf diff: Include samples without symbol in overall stats
>       perf diff: Display empty space for non paired samples
> 
> Namhyung Kim (3):
>       perf trace: Validate target task/user/cpu argument
>       perf trace: Explicitly enable system-wide mode if no option is given
>       perf trace: Add support for tracing workload given by command line
> 
> Wei Yongjun (1):
>       perf tools: Remove duplicated include from trace-event-python.c
> 
>  tools/perf/Documentation/android.txt               |   75 ++++
>  tools/perf/Documentation/perf-diff.txt             |   60 +++
>  tools/perf/Makefile                                |   33 +-
>  tools/perf/builtin-annotate.c                      |    3 +-
>  tools/perf/builtin-diff.c                          |  405 +++++++++++++++++++-
>  tools/perf/builtin-inject.c                        |    6 +-
>  tools/perf/builtin-kvm.c                           |   35 +-
>  tools/perf/builtin-record.c                        |   32 ++
>  tools/perf/builtin-report.c                        |    4 +-
>  tools/perf/builtin-sched.c                         |    3 +-
>  tools/perf/builtin-script.c                        |    4 +-
>  tools/perf/builtin-test.c                          |    2 -
>  tools/perf/builtin-top.c                           |    3 +-
>  tools/perf/builtin-trace.c                         |   53 ++-
>  tools/perf/config/feature-tests.mak                |   20 +-
>  tools/perf/perf.c                                  |    2 +
>  tools/perf/ui/hist.c                               |  134 ++++++-
>  tools/perf/ui/stdio/hist.c                         |    2 +-
>  tools/perf/util/build-id.c                         |    2 +-
>  tools/perf/util/event.c                            |  215 +----------
>  tools/perf/util/event.h                            |    6 +-
>  tools/perf/util/evlist.c                           |    3 -
>  tools/perf/util/hist.h                             |    8 +
>  tools/perf/util/machine.c                          |  277 +++++++++++++
>  tools/perf/util/machine.h                          |   19 +
>  .../util/scripting-engines/trace-event-python.c    |    1 -
>  tools/perf/util/session.c                          |    4 +-
>  tools/perf/util/sort.h                             |   18 +
>  tools/perf/util/thread.c                           |   41 +-
>  tools/perf/util/thread.h                           |    2 +
>  tools/perf/util/trace-event-read.c                 |    2 -
>  tools/perf/util/util.c                             |    2 +
>  tools/perf/util/util.h                             |    2 +
>  33 files changed, 1173 insertions(+), 305 deletions(-)
>  create mode 100644 tools/perf/Documentation/android.txt
>  create mode 100644 tools/perf/util/machine.c
>  create mode 100644 tools/perf/util/machine.h

Pulled, thanks Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2013-01-31 17:25 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-31 17:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo,
	Robert Richter, Andi Kleen, Peter Zijlstra, Frederic Weisbecker,
	Namhyung Kim, Anton Blanchard, linux-kernel, Stephane Eranian,
	Pekka Enberg, linuxppc-dev, Paul Mackerras, Mike Galbraith, acme,
	David Ahern, Namhyung Kim, Sukadev Bhattiprolu, Jiri Olsa

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 152fefa921535665f95840c08062844ab2f5593e:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-01-31 10:20:14 +0100)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 2ac3634a7e1c8eedc961030c87c5c36ebd5bbf8e:

  perf: Document the ABI of perf sysfs entries (2013-01-31 13:07:51 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

. Make some POWER7 events available in sysfs, equivalent to
  what was done on x86, from Sukadev Bhattiprolu.

. Add event group view, from Namyung Kim:

  To use it, 'perf record' should group events when recording. And then perf
  report parses the saved group relation from file header and prints them
  together if --group option is provided.  You can use 'perf evlist' command to
  see event group information:

    $ perf record -e '{ref-cycles,cycles}' noploop 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]

    $ perf evlist --group
    {ref-cycles,cycles}

  With this example, default perf report will show you each event
  separately like this:

    $ perf report
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 3K of event 'ref-cycles'
    # Event count (approx.): 3153797218
    #
    # Overhead  Command      Shared Object                      Symbol
    # ........  .......  .................  ..........................
        99.84%  noploop  noploop            [.] main
         0.07%  noploop  ld-2.15.so         [.] strcmp
         0.03%  noploop  [kernel.kallsyms]  [k] timerqueue_del
         0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%  noploop  [kernel.kallsyms]  [k] account_user_time
         0.01%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
         0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe

    # Samples: 3K of event 'cycles'
    # Event count (approx.): 3722310525
    #
    # Overhead  Command      Shared Object                     Symbol
    # ........  .......  .................  .........................
        99.76%  noploop  noploop            [.] main
         0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
         0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
         0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
         0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
         0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe

  In this case the event group information will be shown in the end of
  header area.  So you can use --group option to enable event group view.

    $ perf report --group
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 7K of event 'anon group { ref-cycles, cycles }'
    # Event count (approx.): 6876107743
    #
    #         Overhead  Command      Shared Object                      Symbol
    # ................  .......  .................  ..........................
        99.84%  99.76%  noploop  noploop            [.] main
         0.07%   0.00%  noploop  ld-2.15.so         [.] strcmp
         0.03%   0.00%  noploop  [kernel.kallsyms]  [k] timerqueue_del
         0.03%   0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%   0.00%  noploop  [kernel.kallsyms]  [k] account_user_time
         0.01%   0.00%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
         0.00%   0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
         0.00%   0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
         0.00%   0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
         0.00%   0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
         0.00%   0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time

  As you can see the Overhead column now contains both of ref-cycles and
  cycles and header line shows group information also - 'anon group {
  ref-cycles, cycles }'.  The output is sorted by period of group leader
  first.

  If perf.data file doesn't contain group information, this --group
  option does nothing.  So if you want enable event group view by
  default you can set it in ~/.perfconfig file:

    $ cat ~/.perfconfig
    [report]
    group = true

  It can be overridden with command line if you want:

    $ perf report --no-group

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf top: Stop using exit()
      perf top: Delete maps on exit

Namhyung Kim (18):
      perf tools: Keep group information
      perf tests: Add group test conditions
      perf header: Add HEADER_GROUP_DESC feature
      perf report: Make another loop for linking group hists
      perf hists: Resort hist entries using group members for output
      perf ui/hist: Consolidate hpp helpers
      perf hists browser: Convert hpp helpers to a function
      perf gtk/browser: Convert hpp helpers to a function
      perf ui/hist: Add support for event group view
      perf hists browser: Move coloring logic to hpp functions
      perf hists browser: Add suppport for event group view
      perf gtk/browser: Add support for event group view
      perf gtk/browser: Trim column header string when event group enabled
      perf report: Bypass non-leader events when event group is enabled
      perf report: Show group description when event group is enabled
      perf report: Add --group option
      perf report: Add report.group config option
      perf evlist: Add --group option

Sukadev Bhattiprolu (5):
      perf/Power7: Use macros to identify perf events
      perf: Make EVENT_ATTR global
      perf/POWER7: Make generic event translations available in sysfs
      perf/POWER7: Make some POWER7 events available in sysfs
      perf: Document the ABI of perf sysfs entries

 .../testing/sysfs-bus-event_source-devices-events  |  62 +++++
 arch/powerpc/include/asm/perf_event_server.h       |  26 ++
 arch/powerpc/perf/core-book3s.c                    |  12 +
 arch/powerpc/perf/power7-pmu.c                     |  80 +++++-
 arch/x86/kernel/cpu/perf_event.c                   |  13 +-
 include/linux/perf_event.h                         |  11 +
 tools/perf/Documentation/perf-evlist.txt           |   4 +
 tools/perf/Documentation/perf-report.txt           |   3 +
 tools/perf/builtin-evlist.c                        |   7 +
 tools/perf/builtin-record.c                        |   3 +
 tools/perf/builtin-report.c                        |  47 +++-
 tools/perf/builtin-top.c                           |  62 +++--
 tools/perf/tests/parse-events.c                    |  28 ++
 tools/perf/ui/browsers/hists.c                     | 217 ++++++++++++---
 tools/perf/ui/gtk/hists.c                          | 130 +++++++--
 tools/perf/ui/hist.c                               | 306 ++++++++++-----------
 tools/perf/ui/stdio/hist.c                         |   2 +
 tools/perf/util/evlist.c                           |   7 +-
 tools/perf/util/evlist.h                           |   1 +
 tools/perf/util/evsel.c                            |  49 +++-
 tools/perf/util/evsel.h                            |  16 ++
 tools/perf/util/header.c                           | 164 +++++++++++
 tools/perf/util/header.h                           |   2 +
 tools/perf/util/hist.c                             |  59 +++-
 tools/perf/util/parse-events.c                     |   1 +
 tools/perf/util/parse-events.h                     |   1 +
 tools/perf/util/parse-events.y                     |  10 +
 tools/perf/util/symbol.h                           |   3 +-
 28 files changed, 1059 insertions(+), 267 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2013-01-31 17:25 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-31 17:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen,
	Anton Blanchard, David Ahern, Frederic Weisbecker, Jiri Olsa,
	linuxppc-dev, Mike Galbraith, Namhyung Kim, Namhyung Kim,
	Paul Mackerras, Pekka Enberg, Peter Zijlstra, Robert Richter,
	Stephane Eranian, Sukadev Bhattiprolu, acme,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 152fefa921535665f95840c08062844ab2f5593e:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-01-31 10:20:14 +0100)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 2ac3634a7e1c8eedc961030c87c5c36ebd5bbf8e:

  perf: Document the ABI of perf sysfs entries (2013-01-31 13:07:51 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

. Make some POWER7 events available in sysfs, equivalent to
  what was done on x86, from Sukadev Bhattiprolu.

. Add event group view, from Namyung Kim:

  To use it, 'perf record' should group events when recording. And then perf
  report parses the saved group relation from file header and prints them
  together if --group option is provided.  You can use 'perf evlist' command to
  see event group information:

    $ perf record -e '{ref-cycles,cycles}' noploop 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]

    $ perf evlist --group
    {ref-cycles,cycles}

  With this example, default perf report will show you each event
  separately like this:

    $ perf report
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 3K of event 'ref-cycles'
    # Event count (approx.): 3153797218
    #
    # Overhead  Command      Shared Object                      Symbol
    # ........  .......  .................  ..........................
        99.84%  noploop  noploop            [.] main
         0.07%  noploop  ld-2.15.so         [.] strcmp
         0.03%  noploop  [kernel.kallsyms]  [k] timerqueue_del
         0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%  noploop  [kernel.kallsyms]  [k] account_user_time
         0.01%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
         0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe

    # Samples: 3K of event 'cycles'
    # Event count (approx.): 3722310525
    #
    # Overhead  Command      Shared Object                     Symbol
    # ........  .......  .................  .........................
        99.76%  noploop  noploop            [.] main
         0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
         0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
         0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
         0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
         0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe

  In this case the event group information will be shown in the end of
  header area.  So you can use --group option to enable event group view.

    $ perf report --group
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 7K of event 'anon group { ref-cycles, cycles }'
    # Event count (approx.): 6876107743
    #
    #         Overhead  Command      Shared Object                      Symbol
    # ................  .......  .................  ..........................
        99.84%  99.76%  noploop  noploop            [.] main
         0.07%   0.00%  noploop  ld-2.15.so         [.] strcmp
         0.03%   0.00%  noploop  [kernel.kallsyms]  [k] timerqueue_del
         0.03%   0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
         0.02%   0.00%  noploop  [kernel.kallsyms]  [k] account_user_time
         0.01%   0.00%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
         0.00%   0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
         0.00%   0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
         0.00%   0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
         0.00%   0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
         0.00%   0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time

  As you can see the Overhead column now contains both of ref-cycles and
  cycles and header line shows group information also - 'anon group {
  ref-cycles, cycles }'.  The output is sorted by period of group leader
  first.

  If perf.data file doesn't contain group information, this --group
  option does nothing.  So if you want enable event group view by
  default you can set it in ~/.perfconfig file:

    $ cat ~/.perfconfig
    [report]
    group = true

  It can be overridden with command line if you want:

    $ perf report --no-group

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf top: Stop using exit()
      perf top: Delete maps on exit

Namhyung Kim (18):
      perf tools: Keep group information
      perf tests: Add group test conditions
      perf header: Add HEADER_GROUP_DESC feature
      perf report: Make another loop for linking group hists
      perf hists: Resort hist entries using group members for output
      perf ui/hist: Consolidate hpp helpers
      perf hists browser: Convert hpp helpers to a function
      perf gtk/browser: Convert hpp helpers to a function
      perf ui/hist: Add support for event group view
      perf hists browser: Move coloring logic to hpp functions
      perf hists browser: Add suppport for event group view
      perf gtk/browser: Add support for event group view
      perf gtk/browser: Trim column header string when event group enabled
      perf report: Bypass non-leader events when event group is enabled
      perf report: Show group description when event group is enabled
      perf report: Add --group option
      perf report: Add report.group config option
      perf evlist: Add --group option

Sukadev Bhattiprolu (5):
      perf/Power7: Use macros to identify perf events
      perf: Make EVENT_ATTR global
      perf/POWER7: Make generic event translations available in sysfs
      perf/POWER7: Make some POWER7 events available in sysfs
      perf: Document the ABI of perf sysfs entries

 .../testing/sysfs-bus-event_source-devices-events  |  62 +++++
 arch/powerpc/include/asm/perf_event_server.h       |  26 ++
 arch/powerpc/perf/core-book3s.c                    |  12 +
 arch/powerpc/perf/power7-pmu.c                     |  80 +++++-
 arch/x86/kernel/cpu/perf_event.c                   |  13 +-
 include/linux/perf_event.h                         |  11 +
 tools/perf/Documentation/perf-evlist.txt           |   4 +
 tools/perf/Documentation/perf-report.txt           |   3 +
 tools/perf/builtin-evlist.c                        |   7 +
 tools/perf/builtin-record.c                        |   3 +
 tools/perf/builtin-report.c                        |  47 +++-
 tools/perf/builtin-top.c                           |  62 +++--
 tools/perf/tests/parse-events.c                    |  28 ++
 tools/perf/ui/browsers/hists.c                     | 217 ++++++++++++---
 tools/perf/ui/gtk/hists.c                          | 130 +++++++--
 tools/perf/ui/hist.c                               | 306 ++++++++++-----------
 tools/perf/ui/stdio/hist.c                         |   2 +
 tools/perf/util/evlist.c                           |   7 +-
 tools/perf/util/evlist.h                           |   1 +
 tools/perf/util/evsel.c                            |  49 +++-
 tools/perf/util/evsel.h                            |  16 ++
 tools/perf/util/header.c                           | 164 +++++++++++
 tools/perf/util/header.h                           |   2 +
 tools/perf/util/hist.c                             |  59 +++-
 tools/perf/util/parse-events.c                     |   1 +
 tools/perf/util/parse-events.h                     |   1 +
 tools/perf/util/parse-events.y                     |  10 +
 tools/perf/util/symbol.h                           |   3 +-
 28 files changed, 1059 insertions(+), 267 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2013-01-31 17:25 ` Arnaldo Carvalho de Melo
@ 2013-02-01 10:18   ` Ingo Molnar
  -1 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2013-02-01 10:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Arnaldo Carvalho de Melo, Robert Richter, Andi Kleen,
	Peter Zijlstra, Frederic Weisbecker, Namhyung Kim,
	Anton Blanchard, linux-kernel, Stephane Eranian, Pekka Enberg,
	linuxppc-dev, Paul Mackerras, Mike Galbraith, acme, David Ahern,
	Namhyung Kim, Sukadev Bhattiprolu, Jiri Olsa


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 152fefa921535665f95840c08062844ab2f5593e:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-01-31 10:20:14 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 2ac3634a7e1c8eedc961030c87c5c36ebd5bbf8e:
> 
>   perf: Document the ABI of perf sysfs entries (2013-01-31 13:07:51 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Make some POWER7 events available in sysfs, equivalent to
>   what was done on x86, from Sukadev Bhattiprolu.
> 
> . Add event group view, from Namyung Kim:
> 
>   To use it, 'perf record' should group events when recording. And then perf
>   report parses the saved group relation from file header and prints them
>   together if --group option is provided.  You can use 'perf evlist' command to
>   see event group information:
> 
>     $ perf record -e '{ref-cycles,cycles}' noploop 1
>     [ perf record: Woken up 2 times to write data ]
>     [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]
> 
>     $ perf evlist --group
>     {ref-cycles,cycles}
> 
>   With this example, default perf report will show you each event
>   separately like this:
> 
>     $ perf report
>     ...
>     # group: {ref-cycles,cycles}
>     # ========
>     # Samples: 3K of event 'ref-cycles'
>     # Event count (approx.): 3153797218
>     #
>     # Overhead  Command      Shared Object                      Symbol
>     # ........  .......  .................  ..........................
>         99.84%  noploop  noploop            [.] main
>          0.07%  noploop  ld-2.15.so         [.] strcmp
>          0.03%  noploop  [kernel.kallsyms]  [k] timerqueue_del
>          0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%  noploop  [kernel.kallsyms]  [k] account_user_time
>          0.01%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
>          0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
> 
>     # Samples: 3K of event 'cycles'
>     # Event count (approx.): 3722310525
>     #
>     # Overhead  Command      Shared Object                     Symbol
>     # ........  .......  .................  .........................
>         99.76%  noploop  noploop            [.] main
>          0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
>          0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
>          0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
>          0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
>          0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
> 
>   In this case the event group information will be shown in the end of
>   header area.  So you can use --group option to enable event group view.
> 
>     $ perf report --group
>     ...
>     # group: {ref-cycles,cycles}
>     # ========
>     # Samples: 7K of event 'anon group { ref-cycles, cycles }'
>     # Event count (approx.): 6876107743
>     #
>     #         Overhead  Command      Shared Object                      Symbol
>     # ................  .......  .................  ..........................
>         99.84%  99.76%  noploop  noploop            [.] main
>          0.07%   0.00%  noploop  ld-2.15.so         [.] strcmp
>          0.03%   0.00%  noploop  [kernel.kallsyms]  [k] timerqueue_del
>          0.03%   0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%   0.00%  noploop  [kernel.kallsyms]  [k] account_user_time
>          0.01%   0.00%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
>          0.00%   0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
>          0.00%   0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
>          0.00%   0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
>          0.00%   0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
>          0.00%   0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
> 
>   As you can see the Overhead column now contains both of ref-cycles and
>   cycles and header line shows group information also - 'anon group {
>   ref-cycles, cycles }'.  The output is sorted by period of group leader
>   first.
> 
>   If perf.data file doesn't contain group information, this --group
>   option does nothing.  So if you want enable event group view by
>   default you can set it in ~/.perfconfig file:
> 
>     $ cat ~/.perfconfig
>     [report]
>     group = true
> 
>   It can be overridden with command line if you want:
> 
>     $ perf report --no-group
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf top: Stop using exit()
>       perf top: Delete maps on exit
> 
> Namhyung Kim (18):
>       perf tools: Keep group information
>       perf tests: Add group test conditions
>       perf header: Add HEADER_GROUP_DESC feature
>       perf report: Make another loop for linking group hists
>       perf hists: Resort hist entries using group members for output
>       perf ui/hist: Consolidate hpp helpers
>       perf hists browser: Convert hpp helpers to a function
>       perf gtk/browser: Convert hpp helpers to a function
>       perf ui/hist: Add support for event group view
>       perf hists browser: Move coloring logic to hpp functions
>       perf hists browser: Add suppport for event group view
>       perf gtk/browser: Add support for event group view
>       perf gtk/browser: Trim column header string when event group enabled
>       perf report: Bypass non-leader events when event group is enabled
>       perf report: Show group description when event group is enabled
>       perf report: Add --group option
>       perf report: Add report.group config option
>       perf evlist: Add --group option
> 
> Sukadev Bhattiprolu (5):
>       perf/Power7: Use macros to identify perf events
>       perf: Make EVENT_ATTR global
>       perf/POWER7: Make generic event translations available in sysfs
>       perf/POWER7: Make some POWER7 events available in sysfs
>       perf: Document the ABI of perf sysfs entries
> 
>  .../testing/sysfs-bus-event_source-devices-events  |  62 +++++
>  arch/powerpc/include/asm/perf_event_server.h       |  26 ++
>  arch/powerpc/perf/core-book3s.c                    |  12 +
>  arch/powerpc/perf/power7-pmu.c                     |  80 +++++-
>  arch/x86/kernel/cpu/perf_event.c                   |  13 +-
>  include/linux/perf_event.h                         |  11 +
>  tools/perf/Documentation/perf-evlist.txt           |   4 +
>  tools/perf/Documentation/perf-report.txt           |   3 +
>  tools/perf/builtin-evlist.c                        |   7 +
>  tools/perf/builtin-record.c                        |   3 +
>  tools/perf/builtin-report.c                        |  47 +++-
>  tools/perf/builtin-top.c                           |  62 +++--
>  tools/perf/tests/parse-events.c                    |  28 ++
>  tools/perf/ui/browsers/hists.c                     | 217 ++++++++++++---
>  tools/perf/ui/gtk/hists.c                          | 130 +++++++--
>  tools/perf/ui/hist.c                               | 306 ++++++++++-----------
>  tools/perf/ui/stdio/hist.c                         |   2 +
>  tools/perf/util/evlist.c                           |   7 +-
>  tools/perf/util/evlist.h                           |   1 +
>  tools/perf/util/evsel.c                            |  49 +++-
>  tools/perf/util/evsel.h                            |  16 ++
>  tools/perf/util/header.c                           | 164 +++++++++++
>  tools/perf/util/header.h                           |   2 +
>  tools/perf/util/hist.c                             |  59 +++-
>  tools/perf/util/parse-events.c                     |   1 +
>  tools/perf/util/parse-events.h                     |   1 +
>  tools/perf/util/parse-events.y                     |  10 +
>  tools/perf/util/symbol.h                           |   3 +-
>  28 files changed, 1059 insertions(+), 267 deletions(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
@ 2013-02-01 10:18   ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2013-02-01 10:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andi Kleen, Anton Blanchard, David Ahern,
	Frederic Weisbecker, Jiri Olsa, linuxppc-dev, Mike Galbraith,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Robert Richter, Stephane Eranian,
	Sukadev Bhattiprolu, acme, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 152fefa921535665f95840c08062844ab2f5593e:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2013-01-31 10:20:14 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 2ac3634a7e1c8eedc961030c87c5c36ebd5bbf8e:
> 
>   perf: Document the ABI of perf sysfs entries (2013-01-31 13:07:51 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Make some POWER7 events available in sysfs, equivalent to
>   what was done on x86, from Sukadev Bhattiprolu.
> 
> . Add event group view, from Namyung Kim:
> 
>   To use it, 'perf record' should group events when recording. And then perf
>   report parses the saved group relation from file header and prints them
>   together if --group option is provided.  You can use 'perf evlist' command to
>   see event group information:
> 
>     $ perf record -e '{ref-cycles,cycles}' noploop 1
>     [ perf record: Woken up 2 times to write data ]
>     [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]
> 
>     $ perf evlist --group
>     {ref-cycles,cycles}
> 
>   With this example, default perf report will show you each event
>   separately like this:
> 
>     $ perf report
>     ...
>     # group: {ref-cycles,cycles}
>     # ========
>     # Samples: 3K of event 'ref-cycles'
>     # Event count (approx.): 3153797218
>     #
>     # Overhead  Command      Shared Object                      Symbol
>     # ........  .......  .................  ..........................
>         99.84%  noploop  noploop            [.] main
>          0.07%  noploop  ld-2.15.so         [.] strcmp
>          0.03%  noploop  [kernel.kallsyms]  [k] timerqueue_del
>          0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%  noploop  [kernel.kallsyms]  [k] account_user_time
>          0.01%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
>          0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
> 
>     # Samples: 3K of event 'cycles'
>     # Event count (approx.): 3722310525
>     #
>     # Overhead  Command      Shared Object                     Symbol
>     # ........  .......  .................  .........................
>         99.76%  noploop  noploop            [.] main
>          0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
>          0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
>          0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
>          0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
>          0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
> 
>   In this case the event group information will be shown in the end of
>   header area.  So you can use --group option to enable event group view.
> 
>     $ perf report --group
>     ...
>     # group: {ref-cycles,cycles}
>     # ========
>     # Samples: 7K of event 'anon group { ref-cycles, cycles }'
>     # Event count (approx.): 6876107743
>     #
>     #         Overhead  Command      Shared Object                      Symbol
>     # ................  .......  .................  ..........................
>         99.84%  99.76%  noploop  noploop            [.] main
>          0.07%   0.00%  noploop  ld-2.15.so         [.] strcmp
>          0.03%   0.00%  noploop  [kernel.kallsyms]  [k] timerqueue_del
>          0.03%   0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
>          0.02%   0.00%  noploop  [kernel.kallsyms]  [k] account_user_time
>          0.01%   0.00%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
>          0.00%   0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
>          0.00%   0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
>          0.00%   0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
>          0.00%   0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
>          0.00%   0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
> 
>   As you can see the Overhead column now contains both of ref-cycles and
>   cycles and header line shows group information also - 'anon group {
>   ref-cycles, cycles }'.  The output is sorted by period of group leader
>   first.
> 
>   If perf.data file doesn't contain group information, this --group
>   option does nothing.  So if you want enable event group view by
>   default you can set it in ~/.perfconfig file:
> 
>     $ cat ~/.perfconfig
>     [report]
>     group = true
> 
>   It can be overridden with command line if you want:
> 
>     $ perf report --no-group
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf top: Stop using exit()
>       perf top: Delete maps on exit
> 
> Namhyung Kim (18):
>       perf tools: Keep group information
>       perf tests: Add group test conditions
>       perf header: Add HEADER_GROUP_DESC feature
>       perf report: Make another loop for linking group hists
>       perf hists: Resort hist entries using group members for output
>       perf ui/hist: Consolidate hpp helpers
>       perf hists browser: Convert hpp helpers to a function
>       perf gtk/browser: Convert hpp helpers to a function
>       perf ui/hist: Add support for event group view
>       perf hists browser: Move coloring logic to hpp functions
>       perf hists browser: Add suppport for event group view
>       perf gtk/browser: Add support for event group view
>       perf gtk/browser: Trim column header string when event group enabled
>       perf report: Bypass non-leader events when event group is enabled
>       perf report: Show group description when event group is enabled
>       perf report: Add --group option
>       perf report: Add report.group config option
>       perf evlist: Add --group option
> 
> Sukadev Bhattiprolu (5):
>       perf/Power7: Use macros to identify perf events
>       perf: Make EVENT_ATTR global
>       perf/POWER7: Make generic event translations available in sysfs
>       perf/POWER7: Make some POWER7 events available in sysfs
>       perf: Document the ABI of perf sysfs entries
> 
>  .../testing/sysfs-bus-event_source-devices-events  |  62 +++++
>  arch/powerpc/include/asm/perf_event_server.h       |  26 ++
>  arch/powerpc/perf/core-book3s.c                    |  12 +
>  arch/powerpc/perf/power7-pmu.c                     |  80 +++++-
>  arch/x86/kernel/cpu/perf_event.c                   |  13 +-
>  include/linux/perf_event.h                         |  11 +
>  tools/perf/Documentation/perf-evlist.txt           |   4 +
>  tools/perf/Documentation/perf-report.txt           |   3 +
>  tools/perf/builtin-evlist.c                        |   7 +
>  tools/perf/builtin-record.c                        |   3 +
>  tools/perf/builtin-report.c                        |  47 +++-
>  tools/perf/builtin-top.c                           |  62 +++--
>  tools/perf/tests/parse-events.c                    |  28 ++
>  tools/perf/ui/browsers/hists.c                     | 217 ++++++++++++---
>  tools/perf/ui/gtk/hists.c                          | 130 +++++++--
>  tools/perf/ui/hist.c                               | 306 ++++++++++-----------
>  tools/perf/ui/stdio/hist.c                         |   2 +
>  tools/perf/util/evlist.c                           |   7 +-
>  tools/perf/util/evlist.h                           |   1 +
>  tools/perf/util/evsel.c                            |  49 +++-
>  tools/perf/util/evsel.h                            |  16 ++
>  tools/perf/util/header.c                           | 164 +++++++++++
>  tools/perf/util/header.h                           |   2 +
>  tools/perf/util/hist.c                             |  59 +++-
>  tools/perf/util/parse-events.c                     |   1 +
>  tools/perf/util/parse-events.h                     |   1 +
>  tools/perf/util/parse-events.y                     |  10 +
>  tools/perf/util/symbol.h                           |   3 +-
>  28 files changed, 1059 insertions(+), 267 deletions(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2013-11-25 14:17 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-25 14:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Pekka Enberg, Peter Zijlstra,
	Ramkumar Ramachandra, Stanislav Fomichev, Stephane Eranian,
	Steven Rostedt, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

	This is based on top of a recent tip/perf/urgent.

- Arnaldo

The following changes since commit e98a6e59dff885eb387163b1a7abe019a44ba90b:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2013-11-20 14:29:46 +0100)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 33d7da61e10ad7d43c60d4a5f4adb712361e5131:

  perf script: Print callchains and symbols if they exist (2013-11-22 15:47:41 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

. Make per-cpu mmaps the default in 'perf record', from Adrian Hunter.

. Default -t/--thread 'perf record' option to no inheritance,
  from Adrian Hunter.

. Make 'perf top -g' refer to callchains, for consistency with other tools,
  from David Ahern.

. Skip ignored symbols while printing callchain, from David Ahern.

. Print callchains and symbols if they exist in 'perf script',
  from David Ahern.

. Remove thread summary coloring in 'perf trace', from Pekka Enberg.

. zsh completion support, from Ramkumar Ramachandra.

. 'perf timechart' improvements, including backtrace support,
  from Stanislav Fomichev.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (4):
      perf record: Make per-cpu mmaps the default.
      perf tools: Allow '--inherit' as the negation of '--no-inherit'
      perf tools: Add option macro OPT_BOOLEAN_SET
      perf record: Default -t option to no inheritance

David Ahern (6):
      perf top: Make -g refer to callchains
      perf evsel: Skip ignored symbols while printing callchain
      perf symbols: Move idle syms check from top to generic function
      perf thread: Move comm_list check into function
      perf tools: Export setup_list
      perf script: Print callchains and symbols if they exist

Namhyung Kim (1):
      perf script: Move evname print code to process_event()

Pekka Enberg (1):
      perf trace: Remove thread summary coloring

Ramkumar Ramachandra (5):
      perf completion: Introduce a layer of indirection
      perf completion: Factor out compgen stuff
      perf completion: Factor out call to __ltrim_colon_completions
      perf completion: Introduce zsh support
      perf completion: Rename file to reflect zsh support

Stanislav Fomichev (7):
      perf timechart: Always try to print at least 15 tasks
      perf timechart: Add option to limit number of tasks
      perf timechart: Use proc_num to implement --power-only
      perf timechart: Add support for displaying only tasks related data
      perf timechart: Group figures and add title with details
      perf timechart: Add support for -P and -T in timechart recording
      perf timechart: Add backtrace support

Steven Rostedt (1):
      tools lib traceevent: Use helper trace-seq in print functions like kernel does

 tools/lib/traceevent/event-parse.c                 |   7 +-
 tools/perf/Documentation/perf-record.txt           |  12 +-
 tools/perf/Documentation/perf-timechart.txt        |  26 +-
 tools/perf/Documentation/perf-top.txt              |   5 +-
 tools/perf/Makefile.perf                           |   4 +-
 tools/perf/builtin-record.c                        |  13 +-
 tools/perf/builtin-script.c                        |  35 ++-
 tools/perf/builtin-timechart.c                     | 306 +++++++++++++++++----
 tools/perf/builtin-top.c                           |  29 +-
 tools/perf/builtin-trace.c                         |  13 +-
 tools/perf/{bash_completion => perf-completion.sh} | 100 ++++++-
 tools/perf/perf.h                                  |   1 +
 tools/perf/tests/attr/test-record-no-inherit       |   2 +-
 tools/perf/util/event.c                            |   3 +-
 tools/perf/util/evlist.c                           |   6 +-
 tools/perf/util/evsel.c                            |   5 +-
 tools/perf/util/parse-options.c                    |  21 ++
 tools/perf/util/parse-options.h                    |   8 +
 tools/perf/util/session.c                          |  10 +-
 tools/perf/util/svghelper.c                        |  77 +++++-
 tools/perf/util/svghelper.h                        |  11 +-
 tools/perf/util/symbol.c                           |  32 ++-
 tools/perf/util/symbol.h                           |   4 +
 tools/perf/util/target.c                           |  11 +-
 tools/perf/util/target.h                           |   4 +-
 tools/perf/util/thread.h                           |  12 +
 26 files changed, 603 insertions(+), 154 deletions(-)
 rename tools/perf/{bash_completion => perf-completion.sh} (65%)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2015-03-24 16:19 Arnaldo Carvalho de Melo
  2015-03-24 16:26 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-24 16:19 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andrew Morton, Borislav Petkov, Corey Ashford, David Ahern,
	Don Zickus, Frederic Weisbecker, He Kuang, Javi Merino, Jiri Olsa,
	Joonsoo Kim, Josef Bacik, Masami Hiramatsu, Minchan Kim,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Shawn Bohrer,
	Stephane Eranian, Steven Rostedt, Vinson Lee, Wang Nan,
	Yann Droneaud, Yunlong Song, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling.

- Arnaldo

The following changes since commit 963a70b8a2d65538f7d58b2b84a2ae10a3ecb6ea:

  Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-03-22 10:56:19 +0100)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to e03eaa400cf8b8bded86cc5c41018a1c69152f16:

  perf tools: Add pid/tid filtering to report and script commands (2015-03-24 13:02:46 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Improve support of compressed kernel modules (Jiri Olsa)

- Add --kallsyms option to 'perf diff' (David Ahern)

- Add pid/tid filtering to 'report' and 'script' commands (David Ahern)

- Add support for __print_array() in libtraceevent (Javi Merino)

- Save DSO loading errno to better report errors (Arnaldo Carvalho de Melo)

- Fix 'probe' to get ummapped symbol address on kernel (Masami Hiramatsu)

- Print big numbers using thousands' group in 'kmem' (Namhyung Kim)

- Remove (null) value of "Sort order" for perf mem report (Yunlong Song)

Infrastructure:

- Handle NULL comm name in libtracevent (Josef Bacik)

- Libtraceevent synchronization with trace-cmd repo (Steven Rostedt)

- Work around lack of sched_getcpu in glibc < 2.6. (Vinson Lee)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf target: Simplify handling of strerror_r return
      perf symbols: Save DSO loading errno to better report errors

David Ahern (2):
      perf diff: Add kallsyms option
      perf tools: Add pid/tid filtering to report and script commands

Javi Merino (2):
      tools lib traceevent: Factor out allocating and processing args
      tools lib traceevent: Add support for __print_array()

Jiri Olsa (7):
      perf tools: Use kmod_path__parse in map_groups__set_modules_path_dir
      perf tools: Use kmod_path__parse in decompress_kmodule
      perf tools: Use kmod_path__parse in is_kernel_module
      perf tools: Remove compressed argument from is_kernel_module
      perf tools: Remove is_kmodule_extension function
      perf tools: Try to lookup kernel module map before creating one
      perf annotate: Allow annotation for decompressed kernel modules

Josef Bacik (1):
      tools lib traceevent: Handle NULL comm name

Masami Hiramatsu (1):
      perf probe: Fix to get ummapped symbol address on kernel

Namhyung Kim (1):
      perf kmem: Print big numbers using thousands' group

Steven Rostedt (1):
      tools lib traceevent: Make plugin options either string or boolean

Steven Rostedt (Red Hat) (6):
      tools lib traceevent: Copy trace_clock and free it
      tools lib traceevent: Handle %z in bprint format
      tools lib traceevent: Add pevent_data_pid_from_comm()
      tools lib traceevent kbuffer: Remove extra update to data pointer in PADDING
      tools lib traceevent: Add way to find sub buffer boundary
      tools lib traceevent: Free filter tokens in process_filter()

Vinson Lee (1):
      perf tools: Work around lack of sched_getcpu in glibc < 2.6.

Yunlong Song (1):
      perf tools: Remove (null) value of "Sort order" for perf mem report

 tools/lib/traceevent/event-parse.c                 | 267 ++++++++++++++++++---
 tools/lib/traceevent/event-parse.h                 |  21 +-
 tools/lib/traceevent/event-plugin.c                |  60 ++++-
 tools/lib/traceevent/kbuffer-parse.c               |  12 +-
 tools/lib/traceevent/kbuffer.h                     |   1 +
 tools/lib/traceevent/parse-filter.c                |   2 +
 tools/perf/Documentation/perf-diff.txt             |   3 +
 tools/perf/Documentation/perf-report.txt           |   5 +
 tools/perf/Documentation/perf-script.txt           |   6 +
 tools/perf/builtin-diff.c                          |   2 +
 tools/perf/builtin-kmem.c                          |  11 +-
 tools/perf/builtin-report.c                        |   6 +-
 tools/perf/builtin-script.c                        |   4 +
 tools/perf/builtin-top.c                           |   6 +-
 tools/perf/util/annotate.c                         |  32 ++-
 tools/perf/util/cloexec.c                          |   6 +
 tools/perf/util/cloexec.h                          |   6 +
 tools/perf/util/dso.c                              |  61 +++--
 tools/perf/util/dso.h                              |  31 ++-
 tools/perf/util/header.c                           |   2 +-
 tools/perf/util/machine.c                          |  72 ++++--
 tools/perf/util/probe-event.c                      |   5 +-
 .../perf/util/scripting-engines/trace-event-perl.c |   5 +
 .../util/scripting-engines/trace-event-python.c    |   5 +
 tools/perf/util/sort.h                             |   1 +
 tools/perf/util/symbol-elf.c                       |  57 +++--
 tools/perf/util/symbol-minimal.c                   |   7 +-
 tools/perf/util/symbol.c                           |  31 ++-
 tools/perf/util/symbol.h                           |   7 +
 tools/perf/util/target.c                           |   7 +-
 tools/perf/util/thread.h                           |  11 +
 31 files changed, 621 insertions(+), 131 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2015-03-24 16:19 Arnaldo Carvalho de Melo
@ 2015-03-24 16:26 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2015-03-24 16:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andrew Morton, Borislav Petkov,
	Corey Ashford, David Ahern, Don Zickus, Frederic Weisbecker,
	He Kuang, Javi Merino, Jiri Olsa, Joonsoo Kim, Josef Bacik,
	Masami Hiramatsu, Minchan Kim, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Shawn Bohrer, Stephane Eranian, Steven Rostedt,
	Vinson Lee, Wang Nan, Yann Droneaud, Yunlong Song,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling.
> 
> - Arnaldo
> 
> The following changes since commit 963a70b8a2d65538f7d58b2b84a2ae10a3ecb6ea:
> 
>   Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-03-22 10:56:19 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to e03eaa400cf8b8bded86cc5c41018a1c69152f16:
> 
>   perf tools: Add pid/tid filtering to report and script commands (2015-03-24 13:02:46 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Improve support of compressed kernel modules (Jiri Olsa)
> 
> - Add --kallsyms option to 'perf diff' (David Ahern)
> 
> - Add pid/tid filtering to 'report' and 'script' commands (David Ahern)
> 
> - Add support for __print_array() in libtraceevent (Javi Merino)
> 
> - Save DSO loading errno to better report errors (Arnaldo Carvalho de Melo)
> 
> - Fix 'probe' to get ummapped symbol address on kernel (Masami Hiramatsu)
> 
> - Print big numbers using thousands' group in 'kmem' (Namhyung Kim)
> 
> - Remove (null) value of "Sort order" for perf mem report (Yunlong Song)
> 
> Infrastructure:
> 
> - Handle NULL comm name in libtracevent (Josef Bacik)
> 
> - Libtraceevent synchronization with trace-cmd repo (Steven Rostedt)
> 
> - Work around lack of sched_getcpu in glibc < 2.6. (Vinson Lee)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf target: Simplify handling of strerror_r return
>       perf symbols: Save DSO loading errno to better report errors
> 
> David Ahern (2):
>       perf diff: Add kallsyms option
>       perf tools: Add pid/tid filtering to report and script commands
> 
> Javi Merino (2):
>       tools lib traceevent: Factor out allocating and processing args
>       tools lib traceevent: Add support for __print_array()
> 
> Jiri Olsa (7):
>       perf tools: Use kmod_path__parse in map_groups__set_modules_path_dir
>       perf tools: Use kmod_path__parse in decompress_kmodule
>       perf tools: Use kmod_path__parse in is_kernel_module
>       perf tools: Remove compressed argument from is_kernel_module
>       perf tools: Remove is_kmodule_extension function
>       perf tools: Try to lookup kernel module map before creating one
>       perf annotate: Allow annotation for decompressed kernel modules
> 
> Josef Bacik (1):
>       tools lib traceevent: Handle NULL comm name
> 
> Masami Hiramatsu (1):
>       perf probe: Fix to get ummapped symbol address on kernel
> 
> Namhyung Kim (1):
>       perf kmem: Print big numbers using thousands' group
> 
> Steven Rostedt (1):
>       tools lib traceevent: Make plugin options either string or boolean
> 
> Steven Rostedt (Red Hat) (6):
>       tools lib traceevent: Copy trace_clock and free it
>       tools lib traceevent: Handle %z in bprint format
>       tools lib traceevent: Add pevent_data_pid_from_comm()
>       tools lib traceevent kbuffer: Remove extra update to data pointer in PADDING
>       tools lib traceevent: Add way to find sub buffer boundary
>       tools lib traceevent: Free filter tokens in process_filter()
> 
> Vinson Lee (1):
>       perf tools: Work around lack of sched_getcpu in glibc < 2.6.
> 
> Yunlong Song (1):
>       perf tools: Remove (null) value of "Sort order" for perf mem report
> 
>  tools/lib/traceevent/event-parse.c                 | 267 ++++++++++++++++++---
>  tools/lib/traceevent/event-parse.h                 |  21 +-
>  tools/lib/traceevent/event-plugin.c                |  60 ++++-
>  tools/lib/traceevent/kbuffer-parse.c               |  12 +-
>  tools/lib/traceevent/kbuffer.h                     |   1 +
>  tools/lib/traceevent/parse-filter.c                |   2 +
>  tools/perf/Documentation/perf-diff.txt             |   3 +
>  tools/perf/Documentation/perf-report.txt           |   5 +
>  tools/perf/Documentation/perf-script.txt           |   6 +
>  tools/perf/builtin-diff.c                          |   2 +
>  tools/perf/builtin-kmem.c                          |  11 +-
>  tools/perf/builtin-report.c                        |   6 +-
>  tools/perf/builtin-script.c                        |   4 +
>  tools/perf/builtin-top.c                           |   6 +-
>  tools/perf/util/annotate.c                         |  32 ++-
>  tools/perf/util/cloexec.c                          |   6 +
>  tools/perf/util/cloexec.h                          |   6 +
>  tools/perf/util/dso.c                              |  61 +++--
>  tools/perf/util/dso.h                              |  31 ++-
>  tools/perf/util/header.c                           |   2 +-
>  tools/perf/util/machine.c                          |  72 ++++--
>  tools/perf/util/probe-event.c                      |   5 +-
>  .../perf/util/scripting-engines/trace-event-perl.c |   5 +
>  .../util/scripting-engines/trace-event-python.c    |   5 +
>  tools/perf/util/sort.h                             |   1 +
>  tools/perf/util/symbol-elf.c                       |  57 +++--
>  tools/perf/util/symbol-minimal.c                   |   7 +-
>  tools/perf/util/symbol.c                           |  31 ++-
>  tools/perf/util/symbol.h                           |   7 +
>  tools/perf/util/target.c                           |   7 +-
>  tools/perf/util/thread.h                           |  11 +
>  31 files changed, 621 insertions(+), 131 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2015-05-05 21:31 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-05 21:31 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Joonsoo Kim,
	linux-mm, Masami Hiramatsu, Minchan Kim, Namhyung Kim,
	Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying, on top of previous requests,

- Arnaldo

The following changes since commit 0c160d495b5616e071bb4f873812e8f473128149:

  perf kmem: Add kmem.default config option (2015-05-04 13:34:48 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-3

for you to fetch changes up to 3698dab1c849c7e1cd440df4fca24baa1973d53b:

  perf tools: Move TUI-specific fields out of map_symbol (2015-05-05 18:13:24 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Improve --filter support for 'perf probe', allowing using its arguments
  on other commands, as --add, --del, etc (Masami Hiramatsu)

- Show warning when running 'perf kmem stat' on a unsuitable perf.data file,
  i.e. one with events that are not the ones required for the stat variant
  used (Namhyung Kim).

Infrastructure:

- Auxtrace support patches, paving the way to support Intel PT and BTS (Adrian Hunter)

- hists browser (top, report) refactorings (Namhyung Kim)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (9):
      perf report: Fix placement of itrace option in documentation
      perf tools: Add AUX area tracing index
      perf tools: Hit all build ids when AUX area tracing
      perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing
      perf auxtrace: Add option to synthesize events for transactions
      perf tools: Add support for PERF_RECORD_AUX
      perf tools: Add support for PERF_RECORD_ITRACE_START
      perf tools: Add AUX area tracing Snapshot Mode
      perf record: Add AUX area tracing Snapshot Mode support

Masami Hiramatsu (4):
      perf probe: Allow to use filter on --del command
      perf probe: Accept filter argument for --funcs
      perf probe: Remove redundant cleanup of params.filter
      perf probe: Cleanup and consolidate command parsers

Namhyung Kim (12):
      perf kmem: Show warning when trying to run stat without record
      perf tools: Move TUI-specific fields into unnamed union
      perf tools: Move init_have_children field to the unnamed union
      perf hists browser: Fix possible memory leak
      perf hists browser: Save hist_browser_timer pointer in hist_browser
      perf hists browser: Save pstack in the hist_browser
      perf hists browser: Save perf_session_env in the hist_browser
      perf hists browser: Split popup menu actions
      perf hists browser: Split popup menu actions - part 2
      perf tools: Introduce pstack_peek()
      perf hists browser: Simplify zooming code using pstack_peek()
      perf tools: Move TUI-specific fields out of map_symbol

 tools/perf/Documentation/perf-inject.txt |   9 +-
 tools/perf/Documentation/perf-probe.txt  |   3 +-
 tools/perf/Documentation/perf-record.txt |   7 +
 tools/perf/Documentation/perf-report.txt |  15 +-
 tools/perf/Documentation/perf-script.txt |   9 +-
 tools/perf/Makefile.perf                 |   2 +
 tools/perf/builtin-buildid-list.c        |   9 +
 tools/perf/builtin-inject.c              |  78 +++-
 tools/perf/builtin-kmem.c                |  17 +-
 tools/perf/builtin-probe.c               | 133 +++----
 tools/perf/builtin-record.c              | 172 ++++++++-
 tools/perf/config/Makefile               |   5 +
 tools/perf/perf.h                        |   3 +
 tools/perf/tests/make                    |   4 +-
 tools/perf/ui/browsers/hists.c           | 633 +++++++++++++++++++------------
 tools/perf/util/Build                    |   2 +-
 tools/perf/util/auxtrace.c               | 305 ++++++++++++++-
 tools/perf/util/auxtrace.h               | 217 +++++++++++
 tools/perf/util/callchain.h              |   4 +
 tools/perf/util/event.c                  |  39 ++
 tools/perf/util/event.h                  |  24 ++
 tools/perf/util/header.c                 |  31 +-
 tools/perf/util/hist.c                   |   2 +-
 tools/perf/util/machine.c                |  21 +
 tools/perf/util/machine.h                |   4 +
 tools/perf/util/parse-options.h          |   4 +
 tools/perf/util/probe-event.c            | 102 ++---
 tools/perf/util/probe-event.h            |   2 +-
 tools/perf/util/pstack.c                 |   7 +
 tools/perf/util/pstack.h                 |   1 +
 tools/perf/util/session.c                |  32 ++
 tools/perf/util/session.h                |   1 +
 tools/perf/util/sort.h                   |  22 +-
 tools/perf/util/symbol.h                 |   2 -
 tools/perf/util/tool.h                   |   2 +
 35 files changed, 1455 insertions(+), 468 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2015-05-05 21:31 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-05 21:31 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Joonsoo Kim,
	linux-mm, Masami Hiramatsu, Minchan Kim, Namhyung Kim,
	Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying, on top of previous requests,

- Arnaldo

The following changes since commit 0c160d495b5616e071bb4f873812e8f473128149:

  perf kmem: Add kmem.default config option (2015-05-04 13:34:48 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-3

for you to fetch changes up to 3698dab1c849c7e1cd440df4fca24baa1973d53b:

  perf tools: Move TUI-specific fields out of map_symbol (2015-05-05 18:13:24 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Improve --filter support for 'perf probe', allowing using its arguments
  on other commands, as --add, --del, etc (Masami Hiramatsu)

- Show warning when running 'perf kmem stat' on a unsuitable perf.data file,
  i.e. one with events that are not the ones required for the stat variant
  used (Namhyung Kim).

Infrastructure:

- Auxtrace support patches, paving the way to support Intel PT and BTS (Adrian Hunter)

- hists browser (top, report) refactorings (Namhyung Kim)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (9):
      perf report: Fix placement of itrace option in documentation
      perf tools: Add AUX area tracing index
      perf tools: Hit all build ids when AUX area tracing
      perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing
      perf auxtrace: Add option to synthesize events for transactions
      perf tools: Add support for PERF_RECORD_AUX
      perf tools: Add support for PERF_RECORD_ITRACE_START
      perf tools: Add AUX area tracing Snapshot Mode
      perf record: Add AUX area tracing Snapshot Mode support

Masami Hiramatsu (4):
      perf probe: Allow to use filter on --del command
      perf probe: Accept filter argument for --funcs
      perf probe: Remove redundant cleanup of params.filter
      perf probe: Cleanup and consolidate command parsers

Namhyung Kim (12):
      perf kmem: Show warning when trying to run stat without record
      perf tools: Move TUI-specific fields into unnamed union
      perf tools: Move init_have_children field to the unnamed union
      perf hists browser: Fix possible memory leak
      perf hists browser: Save hist_browser_timer pointer in hist_browser
      perf hists browser: Save pstack in the hist_browser
      perf hists browser: Save perf_session_env in the hist_browser
      perf hists browser: Split popup menu actions
      perf hists browser: Split popup menu actions - part 2
      perf tools: Introduce pstack_peek()
      perf hists browser: Simplify zooming code using pstack_peek()
      perf tools: Move TUI-specific fields out of map_symbol

 tools/perf/Documentation/perf-inject.txt |   9 +-
 tools/perf/Documentation/perf-probe.txt  |   3 +-
 tools/perf/Documentation/perf-record.txt |   7 +
 tools/perf/Documentation/perf-report.txt |  15 +-
 tools/perf/Documentation/perf-script.txt |   9 +-
 tools/perf/Makefile.perf                 |   2 +
 tools/perf/builtin-buildid-list.c        |   9 +
 tools/perf/builtin-inject.c              |  78 +++-
 tools/perf/builtin-kmem.c                |  17 +-
 tools/perf/builtin-probe.c               | 133 +++----
 tools/perf/builtin-record.c              | 172 ++++++++-
 tools/perf/config/Makefile               |   5 +
 tools/perf/perf.h                        |   3 +
 tools/perf/tests/make                    |   4 +-
 tools/perf/ui/browsers/hists.c           | 633 +++++++++++++++++++------------
 tools/perf/util/Build                    |   2 +-
 tools/perf/util/auxtrace.c               | 305 ++++++++++++++-
 tools/perf/util/auxtrace.h               | 217 +++++++++++
 tools/perf/util/callchain.h              |   4 +
 tools/perf/util/event.c                  |  39 ++
 tools/perf/util/event.h                  |  24 ++
 tools/perf/util/header.c                 |  31 +-
 tools/perf/util/hist.c                   |   2 +-
 tools/perf/util/machine.c                |  21 +
 tools/perf/util/machine.h                |   4 +
 tools/perf/util/parse-options.h          |   4 +
 tools/perf/util/probe-event.c            | 102 ++---
 tools/perf/util/probe-event.h            |   2 +-
 tools/perf/util/pstack.c                 |   7 +
 tools/perf/util/pstack.h                 |   1 +
 tools/perf/util/session.c                |  32 ++
 tools/perf/util/session.h                |   1 +
 tools/perf/util/sort.h                   |  22 +-
 tools/perf/util/symbol.h                 |   2 -
 tools/perf/util/tool.h                   |   2 +
 35 files changed, 1455 insertions(+), 468 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2015-05-05 21:31 ` Arnaldo Carvalho de Melo
@ 2015-05-06  2:47   ` Ingo Molnar
  -1 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2015-05-06  2:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Joonsoo Kim, linux-mm, Masami Hiramatsu, Minchan Kim,
	Namhyung Kim, Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider applying, on top of previous requests,
> 
> - Arnaldo
> 
> The following changes since commit 0c160d495b5616e071bb4f873812e8f473128149:
> 
>   perf kmem: Add kmem.default config option (2015-05-04 13:34:48 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-3
> 
> for you to fetch changes up to 3698dab1c849c7e1cd440df4fca24baa1973d53b:
> 
>   perf tools: Move TUI-specific fields out of map_symbol (2015-05-05 18:13:24 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Improve --filter support for 'perf probe', allowing using its arguments
>   on other commands, as --add, --del, etc (Masami Hiramatsu)
> 
> - Show warning when running 'perf kmem stat' on a unsuitable perf.data file,
>   i.e. one with events that are not the ones required for the stat variant
>   used (Namhyung Kim).
> 
> Infrastructure:
> 
> - Auxtrace support patches, paving the way to support Intel PT and BTS (Adrian Hunter)
> 
> - hists browser (top, report) refactorings (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (9):
>       perf report: Fix placement of itrace option in documentation
>       perf tools: Add AUX area tracing index
>       perf tools: Hit all build ids when AUX area tracing
>       perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing
>       perf auxtrace: Add option to synthesize events for transactions
>       perf tools: Add support for PERF_RECORD_AUX
>       perf tools: Add support for PERF_RECORD_ITRACE_START
>       perf tools: Add AUX area tracing Snapshot Mode
>       perf record: Add AUX area tracing Snapshot Mode support
> 
> Masami Hiramatsu (4):
>       perf probe: Allow to use filter on --del command
>       perf probe: Accept filter argument for --funcs
>       perf probe: Remove redundant cleanup of params.filter
>       perf probe: Cleanup and consolidate command parsers
> 
> Namhyung Kim (12):
>       perf kmem: Show warning when trying to run stat without record
>       perf tools: Move TUI-specific fields into unnamed union
>       perf tools: Move init_have_children field to the unnamed union
>       perf hists browser: Fix possible memory leak
>       perf hists browser: Save hist_browser_timer pointer in hist_browser
>       perf hists browser: Save pstack in the hist_browser
>       perf hists browser: Save perf_session_env in the hist_browser
>       perf hists browser: Split popup menu actions
>       perf hists browser: Split popup menu actions - part 2
>       perf tools: Introduce pstack_peek()
>       perf hists browser: Simplify zooming code using pstack_peek()
>       perf tools: Move TUI-specific fields out of map_symbol
> 
>  tools/perf/Documentation/perf-inject.txt |   9 +-
>  tools/perf/Documentation/perf-probe.txt  |   3 +-
>  tools/perf/Documentation/perf-record.txt |   7 +
>  tools/perf/Documentation/perf-report.txt |  15 +-
>  tools/perf/Documentation/perf-script.txt |   9 +-
>  tools/perf/Makefile.perf                 |   2 +
>  tools/perf/builtin-buildid-list.c        |   9 +
>  tools/perf/builtin-inject.c              |  78 +++-
>  tools/perf/builtin-kmem.c                |  17 +-
>  tools/perf/builtin-probe.c               | 133 +++----
>  tools/perf/builtin-record.c              | 172 ++++++++-
>  tools/perf/config/Makefile               |   5 +
>  tools/perf/perf.h                        |   3 +
>  tools/perf/tests/make                    |   4 +-
>  tools/perf/ui/browsers/hists.c           | 633 +++++++++++++++++++------------
>  tools/perf/util/Build                    |   2 +-
>  tools/perf/util/auxtrace.c               | 305 ++++++++++++++-
>  tools/perf/util/auxtrace.h               | 217 +++++++++++
>  tools/perf/util/callchain.h              |   4 +
>  tools/perf/util/event.c                  |  39 ++
>  tools/perf/util/event.h                  |  24 ++
>  tools/perf/util/header.c                 |  31 +-
>  tools/perf/util/hist.c                   |   2 +-
>  tools/perf/util/machine.c                |  21 +
>  tools/perf/util/machine.h                |   4 +
>  tools/perf/util/parse-options.h          |   4 +
>  tools/perf/util/probe-event.c            | 102 ++---
>  tools/perf/util/probe-event.h            |   2 +-
>  tools/perf/util/pstack.c                 |   7 +
>  tools/perf/util/pstack.h                 |   1 +
>  tools/perf/util/session.c                |  32 ++
>  tools/perf/util/session.h                |   1 +
>  tools/perf/util/sort.h                   |  22 +-
>  tools/perf/util/symbol.h                 |   2 -
>  tools/perf/util/tool.h                   |   2 +
>  35 files changed, 1455 insertions(+), 468 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
@ 2015-05-06  2:47   ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2015-05-06  2:47 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Joonsoo Kim, linux-mm, Masami Hiramatsu, Minchan Kim,
	Namhyung Kim, Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider applying, on top of previous requests,
> 
> - Arnaldo
> 
> The following changes since commit 0c160d495b5616e071bb4f873812e8f473128149:
> 
>   perf kmem: Add kmem.default config option (2015-05-04 13:34:48 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-3
> 
> for you to fetch changes up to 3698dab1c849c7e1cd440df4fca24baa1973d53b:
> 
>   perf tools: Move TUI-specific fields out of map_symbol (2015-05-05 18:13:24 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Improve --filter support for 'perf probe', allowing using its arguments
>   on other commands, as --add, --del, etc (Masami Hiramatsu)
> 
> - Show warning when running 'perf kmem stat' on a unsuitable perf.data file,
>   i.e. one with events that are not the ones required for the stat variant
>   used (Namhyung Kim).
> 
> Infrastructure:
> 
> - Auxtrace support patches, paving the way to support Intel PT and BTS (Adrian Hunter)
> 
> - hists browser (top, report) refactorings (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (9):
>       perf report: Fix placement of itrace option in documentation
>       perf tools: Add AUX area tracing index
>       perf tools: Hit all build ids when AUX area tracing
>       perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing
>       perf auxtrace: Add option to synthesize events for transactions
>       perf tools: Add support for PERF_RECORD_AUX
>       perf tools: Add support for PERF_RECORD_ITRACE_START
>       perf tools: Add AUX area tracing Snapshot Mode
>       perf record: Add AUX area tracing Snapshot Mode support
> 
> Masami Hiramatsu (4):
>       perf probe: Allow to use filter on --del command
>       perf probe: Accept filter argument for --funcs
>       perf probe: Remove redundant cleanup of params.filter
>       perf probe: Cleanup and consolidate command parsers
> 
> Namhyung Kim (12):
>       perf kmem: Show warning when trying to run stat without record
>       perf tools: Move TUI-specific fields into unnamed union
>       perf tools: Move init_have_children field to the unnamed union
>       perf hists browser: Fix possible memory leak
>       perf hists browser: Save hist_browser_timer pointer in hist_browser
>       perf hists browser: Save pstack in the hist_browser
>       perf hists browser: Save perf_session_env in the hist_browser
>       perf hists browser: Split popup menu actions
>       perf hists browser: Split popup menu actions - part 2
>       perf tools: Introduce pstack_peek()
>       perf hists browser: Simplify zooming code using pstack_peek()
>       perf tools: Move TUI-specific fields out of map_symbol
> 
>  tools/perf/Documentation/perf-inject.txt |   9 +-
>  tools/perf/Documentation/perf-probe.txt  |   3 +-
>  tools/perf/Documentation/perf-record.txt |   7 +
>  tools/perf/Documentation/perf-report.txt |  15 +-
>  tools/perf/Documentation/perf-script.txt |   9 +-
>  tools/perf/Makefile.perf                 |   2 +
>  tools/perf/builtin-buildid-list.c        |   9 +
>  tools/perf/builtin-inject.c              |  78 +++-
>  tools/perf/builtin-kmem.c                |  17 +-
>  tools/perf/builtin-probe.c               | 133 +++----
>  tools/perf/builtin-record.c              | 172 ++++++++-
>  tools/perf/config/Makefile               |   5 +
>  tools/perf/perf.h                        |   3 +
>  tools/perf/tests/make                    |   4 +-
>  tools/perf/ui/browsers/hists.c           | 633 +++++++++++++++++++------------
>  tools/perf/util/Build                    |   2 +-
>  tools/perf/util/auxtrace.c               | 305 ++++++++++++++-
>  tools/perf/util/auxtrace.h               | 217 +++++++++++
>  tools/perf/util/callchain.h              |   4 +
>  tools/perf/util/event.c                  |  39 ++
>  tools/perf/util/event.h                  |  24 ++
>  tools/perf/util/header.c                 |  31 +-
>  tools/perf/util/hist.c                   |   2 +-
>  tools/perf/util/machine.c                |  21 +
>  tools/perf/util/machine.h                |   4 +
>  tools/perf/util/parse-options.h          |   4 +
>  tools/perf/util/probe-event.c            | 102 ++---
>  tools/perf/util/probe-event.h            |   2 +-
>  tools/perf/util/pstack.c                 |   7 +
>  tools/perf/util/pstack.h                 |   1 +
>  tools/perf/util/session.c                |  32 ++
>  tools/perf/util/session.h                |   1 +
>  tools/perf/util/sort.h                   |  22 +-
>  tools/perf/util/symbol.h                 |   2 -
>  tools/perf/util/tool.h                   |   2 +
>  35 files changed, 1455 insertions(+), 468 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2015-05-27 15:38 Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 01/25] perf tools: Separate the tests and tools in installation Arnaldo Carvalho de Melo
                   ` (25 more replies)
  0 siblings, 26 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Josef Bacik, kernel-team, Luigi Semenzato,
	Martin Liska, Masami Hiramatsu, Namhyung Kim, Nam T . Nguyen,
	Paul Mackerras, Peter Zijlstra, Richard Weinberger, Simon Que,
	Stephane Eranian, Arnaldo Carvalho de Melo

Hi Ingo,

	Now with the intel PT patches removed except for one, for a problem I
found when trying it on a machine without that feature and that Adrian improved
things to make it clear it wasn't available.

	Ah two patches from Masami, for perf probe, were added.

	Please consider applying,

Regards,

- Arnaldo

The following changes since commit a82d24edfeaf1ed244cf8b969916840c6feb5165:

  perf/x86/intel/pt: Remove redundant variable declaration (2015-05-27 09:17:48 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to dddc7ee32fa13efc66afa71ebd83bce545c8392a:

  perf probe: Fix an error when deleting probes successfully (2015-05-27 12:21:46 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

New features:

- Add option in 'perf sched' to merge like comms to lat output (Josef Bacik)

- Improve 'perf probe' error messages when not finding a
  suitable vmlinux (Masami Hiramatsu)

Infrastructure:

- Use atomic.h for various pre-existing reference counts (Arnaldo Carvalho de Melo)

- Leg work for refcounting 'struct map' (Arnaldo Carvalho de Melo)

- Assign default value for some pointers (Martin Liška)

- Improve setting of gcc debug option (Martin Liška)

- Separate the tests and tools in installation (Nam T. Nguyen)

- Reduce number of arguments of hist_entry_iter__add() (Namhyung Kim)

- DSO data cache fixes (Namhyung Kim)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (5):
      perf tools: Fix function declarations needed by parse-events.y
      perf tools: Fix parse_events_error dereferences
      perf build: Fix libunwind feature detection on 32-bit x86
      perf session: Fix perf_session__peek_event()
      perf tools: Disallow PMU events intel_pt and intel_bts until there is support

Arnaldo Carvalho de Melo (10):
      perf hists: Rename add_hist_entry to hists__findnew_entry
      perf comm: Use atomic.h for refcounting
      perf machine: Do not call map_groups__delete(), drop refcnt instead
      perf tools: Rename maps__next
      perf tools: Remove redundant initialization of thread linkage members
      perf tools: Nuke unused map_groups__flush()
      perf tools: Import rb_erase_init from block/ in the kernel sources
      perf machine: Mark removed threads as such
      perf tools: Leave DSO destruction to the map destruction
      perf tools: Use maps__first()/map__next()

Josef Bacik (1):
      perf sched: Add option to merge like comms to lat output

Martin Liska (1):
      perf tools: Improve setting of gcc debug option

Martin Liška (1):
      perf tools: Assign default value for some pointers

Masami Hiramatsu (2):
      perf probe: Show the error reason comes from invalid DSO
      perf probe: Fix an error when deleting probes successfully

Nam T. Nguyen (1):
      perf tools: Separate the tests and tools in installation

Namhyung Kim (4):
      perf hists: Reducing arguments of hist_entry_iter__add()
      perf tools: Fix dso__data_read_offset() file opening
      perf tools: Get rid of dso__data_fd() from dso__data_size()
      perf tools: Add dso__data_get/put_fd()

 tools/perf/Makefile.perf               |  6 ++-
 tools/perf/arch/common.c               |  2 +-
 tools/perf/builtin-report.c            |  9 ++--
 tools/perf/builtin-sched.c             | 77 +++++++++++++++++++++++++++--
 tools/perf/builtin-top.c               |  7 +--
 tools/perf/config/Makefile             |  4 +-
 tools/perf/config/utilities.mak        | 19 ++++++++
 tools/perf/tests/dso-data.c            | 11 +++++
 tools/perf/tests/hists_cumulate.c      |  6 ++-
 tools/perf/tests/hists_filter.c        |  4 +-
 tools/perf/tests/hists_output.c        |  6 ++-
 tools/perf/tests/vmlinux-kallsyms.c    | 34 ++++++-------
 tools/perf/util/comm.c                 | 13 +++--
 tools/perf/util/dso.c                  | 88 +++++++++++++++++++---------------
 tools/perf/util/dso.h                  | 13 +++--
 tools/perf/util/event.c                |  7 ++-
 tools/perf/util/hist.c                 | 24 ++++------
 tools/perf/util/hist.h                 |  1 -
 tools/perf/util/include/linux/rbtree.h | 14 ++++++
 tools/perf/util/machine.c              |  6 +--
 tools/perf/util/map.c                  | 31 ++----------
 tools/perf/util/map.h                  |  6 +--
 tools/perf/util/parse-events.c         | 18 +++----
 tools/perf/util/parse-events.h         |  6 +++
 tools/perf/util/parse-events.y         |  6 ++-
 tools/perf/util/pmu.c                  |  4 ++
 tools/perf/util/probe-event.c          | 65 +++++++++++++------------
 tools/perf/util/probe-event.h          |  3 --
 tools/perf/util/session.c              |  6 +--
 tools/perf/util/symbol.c               | 25 +++++-----
 tools/perf/util/thread.c               |  2 -
 tools/perf/util/trace-event-parse.c    |  2 +-
 tools/perf/util/unwind-libunwind.c     | 11 +++--
 33 files changed, 332 insertions(+), 204 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 01/25] perf tools: Separate the tests and tools in installation
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 02/25] perf tools: Fix function declarations needed by parse-events.y Arnaldo Carvalho de Melo
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Nam T. Nguyen, Paul Mackerras, Peter Zijlstra,
	Simon Que, Arnaldo Carvalho de Melo

From: "Nam T. Nguyen" <namnguyen@chromium.org>

This refactors out install-bin to install-tests and install-tools so
that downstream could opt to only install the tools, and not the tests.

Signed-off-by: Nam T. Nguyen <namnguyen@chromium.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Simon Que <sque@chromium.org>
Link: http://lkml.kernel.org/r/1431974247-22275-1-git-send-email-namnguyen@chromium.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 03409cc02117..5816a3bb7e9f 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -464,7 +464,7 @@ check: $(OUTPUT)common-cmds.h
 
 install-gtk:
 
-install-bin: all install-gtk
+install-tools: all install-gtk
 	$(call QUIET_INSTALL, binaries) \
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \
 		$(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \
@@ -502,12 +502,16 @@ endif
 	$(call QUIET_INSTALL, perf_completion-script) \
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \
 		$(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf'
+
+install-tests: all install-gtk
 	$(call QUIET_INSTALL, tests) \
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
 		$(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
 		$(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
 
+install-bin: install-tools install-tests
+
 install: install-bin try-install-man install-traceevent-plugins
 
 install-python_ext:
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 02/25] perf tools: Fix function declarations needed by parse-events.y
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 01/25] perf tools: Separate the tests and tools in installation Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 03/25] perf tools: Fix parse_events_error dereferences Arnaldo Carvalho de Melo
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

Patch "perf tools: Add location to pmu event terms" moved declarations
for parse_events_term__num() and parse_events_term__str() so that they
were no longer visible in parse-events.y. That can result in segfaults
as the arguments no longer need match the function prototype.

Move the declarations back, changing YYLTYPE pointers to
pointers-to-void because YYLTYPE is not generated until parse-events.y
is processed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Link: http://lkml.kernel.org/r/1432040746-1755-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c | 16 ++++++++--------
 tools/perf/util/parse-events.h |  6 ++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 80a50fdb6d8a..78032d887c1a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -25,12 +25,6 @@
 extern int parse_events_debug;
 #endif
 int parse_events_parse(void *data, void *scanner);
-int parse_events_term__num(struct parse_events_term **term,
-			   int type_term, char *config, u64 num,
-			   YYLTYPE *loc_term, YYLTYPE *loc_val);
-int parse_events_term__str(struct parse_events_term **term,
-			   int type_term, char *config, char *str,
-			   YYLTYPE *loc_term, YYLTYPE *loc_val);
 
 static struct perf_pmu_event_symbol *perf_pmu_events_list;
 /*
@@ -1601,8 +1595,11 @@ static int new_term(struct parse_events_term **_term, int type_val,
 
 int parse_events_term__num(struct parse_events_term **term,
 			   int type_term, char *config, u64 num,
-			   YYLTYPE *loc_term, YYLTYPE *loc_val)
+			   void *loc_term_, void *loc_val_)
 {
+	YYLTYPE *loc_term = loc_term_;
+	YYLTYPE *loc_val = loc_val_;
+
 	return new_term(term, PARSE_EVENTS__TERM_TYPE_NUM, type_term,
 			config, NULL, num,
 			loc_term ? loc_term->first_column : 0,
@@ -1611,8 +1608,11 @@ int parse_events_term__num(struct parse_events_term **term,
 
 int parse_events_term__str(struct parse_events_term **term,
 			   int type_term, char *config, char *str,
-			   YYLTYPE *loc_term, YYLTYPE *loc_val)
+			   void *loc_term_, void *loc_val_)
 {
+	YYLTYPE *loc_term = loc_term_;
+	YYLTYPE *loc_val = loc_val_;
+
 	return new_term(term, PARSE_EVENTS__TERM_TYPE_STR, type_term,
 			config, str, 0,
 			loc_term ? loc_term->first_column : 0,
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index e236f1b6ac6f..131f29b2f132 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -98,6 +98,12 @@ struct parse_events_terms {
 };
 
 int parse_events__is_hardcoded_term(struct parse_events_term *term);
+int parse_events_term__num(struct parse_events_term **term,
+			   int type_term, char *config, u64 num,
+			   void *loc_term, void *loc_val);
+int parse_events_term__str(struct parse_events_term **term,
+			   int type_term, char *config, char *str,
+			   void *loc_term, void *loc_val);
 int parse_events_term__sym_hw(struct parse_events_term **term,
 			      char *config, unsigned idx);
 int parse_events_term__clone(struct parse_events_term **new,
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 03/25] perf tools: Fix parse_events_error dereferences
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 01/25] perf tools: Separate the tests and tools in installation Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 02/25] perf tools: Fix function declarations needed by parse-events.y Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 04/25] perf build: Fix libunwind feature detection on 32-bit x86 Arnaldo Carvalho de Melo
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

Parse errors can be reported in struct parse_events_error but the
pointer passed is optional and can be NULL.  Ensure it is not NULL
before dereferencing it.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Link: http://lkml.kernel.org/r/1432040746-1755-4-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.c | 2 ++
 tools/perf/util/parse-events.y | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 78032d887c1a..2a4d1ec02846 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1659,6 +1659,8 @@ void parse_events_evlist_error(struct parse_events_evlist *data,
 {
 	struct parse_events_error *err = data->error;
 
+	if (!err)
+		return;
 	err->idx = idx;
 	err->str = strdup(str);
 	WARN_ONCE(!err->str, "WARNING: failed to allocate error string");
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 3d11e00243e3..591905a02b92 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -389,8 +389,10 @@ PE_NAME ':' PE_NAME
 	if (parse_events_add_tracepoint(list, &data->idx, $1, $3)) {
 		struct parse_events_error *error = data->error;
 
-		error->idx = @1.first_column;
-		error->str = strdup("unknown tracepoint");
+		if (error) {
+			error->idx = @1.first_column;
+			error->str = strdup("unknown tracepoint");
+		}
 		return -1;
 	}
 	$$ = list;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 04/25] perf build: Fix libunwind feature detection on 32-bit x86
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 03/25] perf tools: Fix parse_events_error dereferences Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 05/25] perf session: Fix perf_session__peek_event() Arnaldo Carvalho de Melo
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

The libunwind feature would never detect because of the following error:

  $ cat tools/build/feature/test-libunwind.make.output
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_stream_buffer_decode'
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_index_uncompressed_size'
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_index_end'
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_index_buffer_decode'
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_stream_footer_decode'
  /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libunwind-x86.so: undefined reference to `lzma_index_size'
  collect2: error: ld returned 1 exit status

Fix by adding -llzma and re-ordering to match the dependencies.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Link: http://lkml.kernel.org/r/1432040746-1755-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 1b957a1272d0..e3b3724e73ff 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -32,7 +32,7 @@ ifeq ($(ARCH),x86)
     LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
     $(call detected,CONFIG_X86_64)
   else
-    LIBUNWIND_LIBS = -lunwind -lunwind-x86
+    LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
   endif
   NO_PERF_REGS := 0
 endif
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 05/25] perf session: Fix perf_session__peek_event()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 04/25] perf build: Fix libunwind feature detection on 32-bit x86 Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 06/25] perf hists: Reducing arguments of hist_entry_iter__add() Arnaldo Carvalho de Melo
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

perf_session__peek_event() generally leverages there being a single mmap
of the perf.data file, however on 32-bit platforms when there is more
that 32MiB of data, then there are multiple mmaps, so
perf_session__peek_event() reads from the file.

In that case a couple of bugs were exposed (note how the seg. fault
appears with >32M of data):

   $ perf record --per-thread -e intel_bts// ../rtit-tests/loopy 1000000
   [ perf record: Woken up 13 times to write data ]
   [ perf record: Captured and wrote 24.568 MB perf.data ]
   $ perf script > /dev/null
   $ perf record --per-thread -e intel_bts// ../rtit-tests/loopy 10000000
   [ perf record: Woken up 136 times to write data ]
   [ perf record: Captured and wrote 270.794 MB perf.data ]
   $ perf script > /dev/null
   Segmentation fault (core dumped)

The wrong address was being passed to the readn() function and the
buffer size was not being checked.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Link: http://lkml.kernel.org/r/1432040746-1755-5-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/session.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index e722107f932a..39fe09d5a87e 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1182,7 +1182,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
 		return -1;
 
 	if (lseek(fd, file_offset, SEEK_SET) == (off_t)-1 ||
-	    readn(fd, &buf, hdr_sz) != (ssize_t)hdr_sz)
+	    readn(fd, buf, hdr_sz) != (ssize_t)hdr_sz)
 		return -1;
 
 	event = (union perf_event *)buf;
@@ -1190,12 +1190,12 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
 	if (session->header.needs_swap)
 		perf_event_header__bswap(&event->header);
 
-	if (event->header.size < hdr_sz)
+	if (event->header.size < hdr_sz || event->header.size > buf_sz)
 		return -1;
 
 	rest = event->header.size - hdr_sz;
 
-	if (readn(fd, &buf, rest) != (ssize_t)rest)
+	if (readn(fd, buf, rest) != (ssize_t)rest)
 		return -1;
 
 	if (session->header.needs_swap)
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 06/25] perf hists: Reducing arguments of hist_entry_iter__add()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 05/25] perf session: Fix perf_session__peek_event() Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 07/25] perf hists: Rename add_hist_entry to hists__findnew_entry Arnaldo Carvalho de Melo
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The evsel and sample arguments are to set iter for later use.  As it
also receives an iter as another argument, just set them before calling
the function.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432022650-18205-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c       | 9 +++++----
 tools/perf/builtin-top.c          | 7 ++++---
 tools/perf/tests/hists_cumulate.c | 6 ++++--
 tools/perf/tests/hists_filter.c   | 4 +++-
 tools/perf/tests/hists_output.c   | 6 ++++--
 tools/perf/util/hist.c            | 8 ++------
 tools/perf/util/hist.h            | 1 -
 7 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 92fca2157e5e..56025d90622f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -139,8 +139,10 @@ static int process_sample_event(struct perf_tool *tool,
 	struct report *rep = container_of(tool, struct report, tool);
 	struct addr_location al;
 	struct hist_entry_iter iter = {
-		.hide_unresolved = rep->hide_unresolved,
-		.add_entry_cb = hist_iter__report_callback,
+		.evsel 			= evsel,
+		.sample 		= sample,
+		.hide_unresolved 	= rep->hide_unresolved,
+		.add_entry_cb 		= hist_iter__report_callback,
 	};
 	int ret = 0;
 
@@ -168,8 +170,7 @@ static int process_sample_event(struct perf_tool *tool,
 	if (al.map != NULL)
 		al.map->dso->hit = 1;
 
-	ret = hist_entry_iter__add(&iter, &al, evsel, sample, rep->max_stack,
-				   rep);
+	ret = hist_entry_iter__add(&iter, &al, rep->max_stack, rep);
 	if (ret < 0)
 		pr_debug("problem adding hist entry, skipping event\n");
 out_put:
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index a19351728f0f..6b987424d015 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -775,7 +775,9 @@ static void perf_event__process_sample(struct perf_tool *tool,
 	if (al.sym == NULL || !al.sym->ignore) {
 		struct hists *hists = evsel__hists(evsel);
 		struct hist_entry_iter iter = {
-			.add_entry_cb = hist_iter__top_callback,
+			.evsel		= evsel,
+			.sample 	= sample,
+			.add_entry_cb 	= hist_iter__top_callback,
 		};
 
 		if (symbol_conf.cumulate_callchain)
@@ -785,8 +787,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
 
 		pthread_mutex_lock(&hists->lock);
 
-		err = hist_entry_iter__add(&iter, &al, evsel, sample,
-					   top->max_stack, top);
+		err = hist_entry_iter__add(&iter, &al, top->max_stack, top);
 		if (err < 0)
 			pr_err("Problem incrementing symbol period, skipping event\n");
 
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c
index 620f626e5b35..7d82c8be5e36 100644
--- a/tools/perf/tests/hists_cumulate.c
+++ b/tools/perf/tests/hists_cumulate.c
@@ -87,6 +87,8 @@ static int add_hist_entries(struct hists *hists, struct machine *machine)
 			},
 		};
 		struct hist_entry_iter iter = {
+			.evsel = evsel,
+			.sample	= &sample,
 			.hide_unresolved = false,
 		};
 
@@ -104,8 +106,8 @@ static int add_hist_entries(struct hists *hists, struct machine *machine)
 						  &sample) < 0)
 			goto out;
 
-		if (hist_entry_iter__add(&iter, &al, evsel, &sample,
-					 PERF_MAX_STACK_DEPTH, NULL) < 0) {
+		if (hist_entry_iter__add(&iter, &al, PERF_MAX_STACK_DEPTH,
+					 NULL) < 0) {
 			addr_location__put(&al);
 			goto out;
 		}
diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c
index 82e1ee52e024..ce48775e6ada 100644
--- a/tools/perf/tests/hists_filter.c
+++ b/tools/perf/tests/hists_filter.c
@@ -63,6 +63,8 @@ static int add_hist_entries(struct perf_evlist *evlist,
 				},
 			};
 			struct hist_entry_iter iter = {
+				.evsel = evsel,
+				.sample = &sample,
 				.ops = &hist_iter_normal,
 				.hide_unresolved = false,
 			};
@@ -81,7 +83,7 @@ static int add_hist_entries(struct perf_evlist *evlist,
 							  &sample) < 0)
 				goto out;
 
-			if (hist_entry_iter__add(&iter, &al, evsel, &sample,
+			if (hist_entry_iter__add(&iter, &al,
 						 PERF_MAX_STACK_DEPTH, NULL) < 0) {
 				addr_location__put(&al);
 				goto out;
diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c
index fd7ec4f9aeb4..adbebc852cc8 100644
--- a/tools/perf/tests/hists_output.c
+++ b/tools/perf/tests/hists_output.c
@@ -57,6 +57,8 @@ static int add_hist_entries(struct hists *hists, struct machine *machine)
 			},
 		};
 		struct hist_entry_iter iter = {
+			.evsel = evsel,
+			.sample = &sample,
 			.ops = &hist_iter_normal,
 			.hide_unresolved = false,
 		};
@@ -70,8 +72,8 @@ static int add_hist_entries(struct hists *hists, struct machine *machine)
 						  &sample) < 0)
 			goto out;
 
-		if (hist_entry_iter__add(&iter, &al, evsel, &sample,
-					 PERF_MAX_STACK_DEPTH, NULL) < 0) {
+		if (hist_entry_iter__add(&iter, &al, PERF_MAX_STACK_DEPTH,
+					 NULL) < 0) {
 			addr_location__put(&al);
 			goto out;
 		}
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 338770679863..2504b5b1a308 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -851,19 +851,15 @@ const struct hist_iter_ops hist_iter_cumulative = {
 };
 
 int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
-			 struct perf_evsel *evsel, struct perf_sample *sample,
 			 int max_stack_depth, void *arg)
 {
 	int err, err2;
 
-	err = sample__resolve_callchain(sample, &iter->parent, evsel, al,
-					max_stack_depth);
+	err = sample__resolve_callchain(iter->sample, &iter->parent,
+					iter->evsel, al, max_stack_depth);
 	if (err)
 		return err;
 
-	iter->evsel = evsel;
-	iter->sample = sample;
-
 	err = iter->ops->prepare_entry(iter, al);
 	if (err)
 		goto out;
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 9f31b89a527a..5ed8d9c22981 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -111,7 +111,6 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
 				      u64 weight, u64 transaction,
 				      bool sample_self);
 int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
-			 struct perf_evsel *evsel, struct perf_sample *sample,
 			 int max_stack_depth, void *arg);
 
 int64_t hist_entry__cmp(struct hist_entry *left, struct hist_entry *right);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 07/25] perf hists: Rename add_hist_entry to hists__findnew_entry
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 06/25] perf hists: Reducing arguments of hist_entry_iter__add() Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 08/25] perf comm: Use atomic.h for refcounting Arnaldo Carvalho de Melo
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

To match the convention used elsewhere.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-66oo6yn8upssfeuprwy0il1q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 2504b5b1a308..f53d017c7c22 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -362,10 +362,10 @@ static u8 symbol__parent_filter(const struct symbol *parent)
 	return 0;
 }
 
-static struct hist_entry *add_hist_entry(struct hists *hists,
-					 struct hist_entry *entry,
-					 struct addr_location *al,
-					 bool sample_self)
+static struct hist_entry *hists__findnew_entry(struct hists *hists,
+					       struct hist_entry *entry,
+					       struct addr_location *al,
+					       bool sample_self)
 {
 	struct rb_node **p;
 	struct rb_node *parent = NULL;
@@ -468,7 +468,7 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
 		.transaction = transaction,
 	};
 
-	return add_hist_entry(hists, &entry, al, sample_self);
+	return hists__findnew_entry(hists, &entry, al, sample_self);
 }
 
 static int
@@ -548,9 +548,9 @@ iter_finish_mem_entry(struct hist_entry_iter *iter,
 
 out:
 	/*
-	 * We don't need to free iter->priv (mem_info) here since
-	 * the mem info was either already freed in add_hist_entry() or
-	 * passed to a new hist entry by hist_entry__new().
+	 * We don't need to free iter->priv (mem_info) here since the mem info
+	 * was either already freed in hists__findnew_entry() or passed to a
+	 * new hist entry by hist_entry__new().
 	 */
 	iter->priv = NULL;
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 08/25] perf comm: Use atomic.h for refcounting
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 07/25] perf hists: Rename add_hist_entry to hists__findnew_entry Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 09/25] perf machine: Do not call map_groups__delete(), drop refcnt instead Arnaldo Carvalho de Melo
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Now that we have atomic.h, we should convert all of the existing
refcounts to use it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-quzeuy3jwsyod6e06o39cl6y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/comm.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index b2bb59df65e1..21b7ff382c3f 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -2,24 +2,27 @@
 #include "util.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <linux/atomic.h>
 
 struct comm_str {
 	char *str;
 	struct rb_node rb_node;
-	int ref;
+	atomic_t refcnt;
 };
 
 /* Should perhaps be moved to struct machine */
 static struct rb_root comm_str_root;
 
-static void comm_str__get(struct comm_str *cs)
+static struct comm_str *comm_str__get(struct comm_str *cs)
 {
-	cs->ref++;
+	if (cs)
+		atomic_inc(&cs->refcnt);
+	return cs;
 }
 
 static void comm_str__put(struct comm_str *cs)
 {
-	if (!--cs->ref) {
+	if (cs && atomic_dec_and_test(&cs->refcnt)) {
 		rb_erase(&cs->rb_node, &comm_str_root);
 		zfree(&cs->str);
 		free(cs);
@@ -40,6 +43,8 @@ static struct comm_str *comm_str__alloc(const char *str)
 		return NULL;
 	}
 
+	atomic_set(&cs->refcnt, 0);
+
 	return cs;
 }
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 09/25] perf machine: Do not call map_groups__delete(), drop refcnt instead
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 08/25] perf comm: Use atomic.h for refcounting Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 10/25] perf tools: Fix dso__data_read_offset() file opening Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

It could be used somewhere, so just call map__groups_put() to make sure
we don't delete it prematurely

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-dxmh8mr12i65p8h909vi88cp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index daa55910ff28..7ec3188d3cb3 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -333,7 +333,7 @@ static void machine__update_thread_pid(struct machine *machine,
 		if (!map_groups__empty(th->mg))
 			pr_err("Discarding thread maps for %d:%d\n",
 			       th->pid_, th->tid);
-		map_groups__delete(th->mg);
+		map_groups__put(th->mg);
 	}
 
 	th->mg = map_groups__get(leader->mg);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 10/25] perf tools: Fix dso__data_read_offset() file opening
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 09/25] perf machine: Do not call map_groups__delete(), drop refcnt instead Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 11/25] perf tools: Get rid of dso__data_fd() from dso__data_size() Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

When dso__data_read_offset/addr() is called without prior dso__data_fd()
(or other functions which call it internally), it failed to open dso in
data_file_size() since its binary type was not identified.

However calling dso__data_fd() in dso__data_read_offset() will hurt
performance as it grabs a global lock everytime.  So factor out the loop
on the binary type in dso__data_fd(), and call it from both.

Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432137821-10853-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/dso.c | 59 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 27 deletions(-)

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 1b96c8d18435..516e0c25ea16 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -440,15 +440,7 @@ void dso__data_close(struct dso *dso)
 	pthread_mutex_unlock(&dso__data_open_lock);
 }
 
-/**
- * dso__data_fd - Get dso's data file descriptor
- * @dso: dso object
- * @machine: machine object
- *
- * External interface to find dso's file, open it and
- * returns file descriptor.
- */
-int dso__data_fd(struct dso *dso, struct machine *machine)
+static void try_to_open_dso(struct dso *dso, struct machine *machine)
 {
 	enum dso_binary_type binary_type_data[] = {
 		DSO_BINARY_TYPE__BUILD_ID_CACHE,
@@ -457,13 +449,8 @@ int dso__data_fd(struct dso *dso, struct machine *machine)
 	};
 	int i = 0;
 
-	if (dso->data.status == DSO_DATA_STATUS_ERROR)
-		return -1;
-
-	pthread_mutex_lock(&dso__data_open_lock);
-
 	if (dso->data.fd >= 0)
-		goto out;
+		return;
 
 	if (dso->binary_type != DSO_BINARY_TYPE__NOT_FOUND) {
 		dso->data.fd = open_dso(dso, machine);
@@ -483,8 +470,25 @@ out:
 		dso->data.status = DSO_DATA_STATUS_OK;
 	else
 		dso->data.status = DSO_DATA_STATUS_ERROR;
+}
+
+/**
+ * dso__data_fd - Get dso's data file descriptor
+ * @dso: dso object
+ * @machine: machine object
+ *
+ * External interface to find dso's file, open it and
+ * returns file descriptor.
+ */
+int dso__data_fd(struct dso *dso, struct machine *machine)
+{
+	if (dso->data.status == DSO_DATA_STATUS_ERROR)
+		return -1;
 
+	pthread_mutex_lock(&dso__data_open_lock);
+	try_to_open_dso(dso, machine);
 	pthread_mutex_unlock(&dso__data_open_lock);
+
 	return dso->data.fd;
 }
 
@@ -609,13 +613,12 @@ dso_cache__read(struct dso *dso, struct machine *machine,
 		 * dso->data.fd might be closed if other thread opened another
 		 * file (dso) due to open file limit (RLIMIT_NOFILE).
 		 */
+		try_to_open_dso(dso, machine);
+
 		if (dso->data.fd < 0) {
-			dso->data.fd = open_dso(dso, machine);
-			if (dso->data.fd < 0) {
-				ret = -errno;
-				dso->data.status = DSO_DATA_STATUS_ERROR;
-				break;
-			}
+			ret = -errno;
+			dso->data.status = DSO_DATA_STATUS_ERROR;
+			break;
 		}
 
 		cache_offset = offset & DSO__DATA_CACHE_MASK;
@@ -702,19 +705,21 @@ static int data_file_size(struct dso *dso, struct machine *machine)
 	if (dso->data.file_size)
 		return 0;
 
+	if (dso->data.status == DSO_DATA_STATUS_ERROR)
+		return -1;
+
 	pthread_mutex_lock(&dso__data_open_lock);
 
 	/*
 	 * dso->data.fd might be closed if other thread opened another
 	 * file (dso) due to open file limit (RLIMIT_NOFILE).
 	 */
+	try_to_open_dso(dso, machine);
+
 	if (dso->data.fd < 0) {
-		dso->data.fd = open_dso(dso, machine);
-		if (dso->data.fd < 0) {
-			ret = -errno;
-			dso->data.status = DSO_DATA_STATUS_ERROR;
-			goto out;
-		}
+		ret = -errno;
+		dso->data.status = DSO_DATA_STATUS_ERROR;
+		goto out;
 	}
 
 	if (fstat(dso->data.fd, &st) < 0) {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 11/25] perf tools: Get rid of dso__data_fd() from dso__data_size()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 10/25] perf tools: Fix dso__data_read_offset() file opening Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 12/25] perf tools: Add dso__data_get/put_fd() Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

It seems that the dso__data_fd() was needed to find a binary type
since open in data_file_size() alone used to fail.

But as it can open the dso fine now, the dso__data_fd() can go away.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432137821-10853-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/dso.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 516e0c25ea16..e95e850dd832 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -745,12 +745,6 @@ out:
  */
 off_t dso__data_size(struct dso *dso, struct machine *machine)
 {
-	int fd;
-
-	fd = dso__data_fd(dso, machine);
-	if (fd < 0)
-		return fd;
-
 	if (data_file_size(dso, machine))
 		return -1;
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 12/25] perf tools: Add dso__data_get/put_fd()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 11/25] perf tools: Get rid of dso__data_fd() from dso__data_size() Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 13/25] perf tools: Rename maps__next Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

Using dso__data_fd() in multi-thread environment is not safe since
returned fd can be closed and/or reused anytime.

So convert it to the dso__data_get/put_fd() pair to protect the access
with lock.

The original dso__data_fd() is deprecated and kept only for testing.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432137821-10853-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/dso-data.c        | 11 +++++++++++
 tools/perf/util/dso.c              | 31 ++++++++++++++++++++++---------
 tools/perf/util/dso.h              | 13 +++++++++----
 tools/perf/util/unwind-libunwind.c | 11 ++++++++---
 4 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index 513e5febbe5a..3e41c61bd861 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -99,6 +99,17 @@ struct test_data_offset offsets[] = {
 	},
 };
 
+/* move it from util/dso.c for compatibility */
+static int dso__data_fd(struct dso *dso, struct machine *machine)
+{
+	int fd = dso__data_get_fd(dso, machine);
+
+	if (fd >= 0)
+		dso__data_put_fd(dso);
+
+	return fd;
+}
+
 int test__dso_data(void)
 {
 	struct machine machine;
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index e95e850dd832..7e11a700303f 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -473,25 +473,35 @@ out:
 }
 
 /**
- * dso__data_fd - Get dso's data file descriptor
+ * dso__data_get_fd - Get dso's data file descriptor
  * @dso: dso object
  * @machine: machine object
  *
  * External interface to find dso's file, open it and
- * returns file descriptor.
+ * returns file descriptor.  It should be paired with
+ * dso__data_put_fd() if it returns non-negative value.
  */
-int dso__data_fd(struct dso *dso, struct machine *machine)
+int dso__data_get_fd(struct dso *dso, struct machine *machine)
 {
 	if (dso->data.status == DSO_DATA_STATUS_ERROR)
 		return -1;
 
-	pthread_mutex_lock(&dso__data_open_lock);
+	if (pthread_mutex_lock(&dso__data_open_lock) < 0)
+		return -1;
+
 	try_to_open_dso(dso, machine);
-	pthread_mutex_unlock(&dso__data_open_lock);
+
+	if (dso->data.fd < 0)
+		pthread_mutex_unlock(&dso__data_open_lock);
 
 	return dso->data.fd;
 }
 
+void dso__data_put_fd(struct dso *dso __maybe_unused)
+{
+	pthread_mutex_unlock(&dso__data_open_lock);
+}
+
 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by)
 {
 	u32 flag = 1 << by;
@@ -1199,12 +1209,15 @@ size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp)
 enum dso_type dso__type(struct dso *dso, struct machine *machine)
 {
 	int fd;
+	enum dso_type type = DSO__TYPE_UNKNOWN;
 
-	fd = dso__data_fd(dso, machine);
-	if (fd < 0)
-		return DSO__TYPE_UNKNOWN;
+	fd = dso__data_get_fd(dso, machine);
+	if (fd >= 0) {
+		type = dso__type_fd(fd);
+		dso__data_put_fd(dso);
+	}
 
-	return dso__type_fd(fd);
+	return type;
 }
 
 int dso__strerror_load(struct dso *dso, char *buf, size_t buflen)
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index b26ec3ab1336..bcec06ad73a2 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -240,7 +240,8 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
 
 /*
  * The dso__data_* external interface provides following functions:
- *   dso__data_fd
+ *   dso__data_get_fd
+ *   dso__data_put_fd
  *   dso__data_close
  *   dso__data_size
  *   dso__data_read_offset
@@ -257,8 +258,11 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
  * The current usage of the dso__data_* interface is as follows:
  *
  * Get DSO's fd:
- *   int fd = dso__data_fd(dso, machine);
- *   USE 'fd' SOMEHOW
+ *   int fd = dso__data_get_fd(dso, machine);
+ *   if (fd >= 0) {
+ *       USE 'fd' SOMEHOW
+ *       dso__data_put_fd(dso);
+ *   }
  *
  * Read DSO's data:
  *   n = dso__data_read_offset(dso_0, &machine, 0, buf, BUFSIZE);
@@ -277,7 +281,8 @@ int __kmod_path__parse(struct kmod_path *m, const char *path,
  *
  * TODO
 */
-int dso__data_fd(struct dso *dso, struct machine *machine);
+int dso__data_get_fd(struct dso *dso, struct machine *machine);
+void dso__data_put_fd(struct dso *dso __maybe_unused);
 void dso__data_close(struct dso *dso);
 
 off_t dso__data_size(struct dso *dso, struct machine *machine);
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 7b09a443a280..f079b63f0b7f 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -269,13 +269,14 @@ static int read_unwind_spec_eh_frame(struct dso *dso, struct machine *machine,
 	u64 offset = dso->data.eh_frame_hdr_offset;
 
 	if (offset == 0) {
-		fd = dso__data_fd(dso, machine);
+		fd = dso__data_get_fd(dso, machine);
 		if (fd < 0)
 			return -EINVAL;
 
 		/* Check the .eh_frame section for unwinding info */
 		offset = elf_section_offset(fd, ".eh_frame_hdr");
 		dso->data.eh_frame_hdr_offset = offset;
+		dso__data_put_fd(dso);
 	}
 
 	if (offset)
@@ -294,13 +295,14 @@ static int read_unwind_spec_debug_frame(struct dso *dso,
 	u64 ofs = dso->data.debug_frame_offset;
 
 	if (ofs == 0) {
-		fd = dso__data_fd(dso, machine);
+		fd = dso__data_get_fd(dso, machine);
 		if (fd < 0)
 			return -EINVAL;
 
 		/* Check the .debug_frame section for unwinding info */
 		ofs = elf_section_offset(fd, ".debug_frame");
 		dso->data.debug_frame_offset = ofs;
+		dso__data_put_fd(dso);
 	}
 
 	*offset = ofs;
@@ -353,10 +355,13 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
 #ifndef NO_LIBUNWIND_DEBUG_FRAME
 	/* Check the .debug_frame section for unwinding info */
 	if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
-		int fd = dso__data_fd(map->dso, ui->machine);
+		int fd = dso__data_get_fd(map->dso, ui->machine);
 		int is_exec = elf_is_exec(fd, map->dso->name);
 		unw_word_t base = is_exec ? 0 : map->start;
 
+		if (fd >= 0)
+			dso__data_put_fd(dso);
+
 		memset(&di, 0, sizeof(di));
 		if (dwarf_find_debug_frame(0, &di, ip, base, map->dso->name,
 					   map->start, map->end))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 13/25] perf tools: Rename maps__next
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 12/25] perf tools: Add dso__data_get/put_fd() Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:38 ` [PATCH 14/25] perf tools: Remove redundant initialization of thread linkage members Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

It really is a 'struct map' method, and since we're introducing a new
'struct maps' class, fix it to avoid confusion.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-xo9ifhk53cfl30wqcuhxpnvl@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/map.c | 2 +-
 tools/perf/util/map.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 2d20c5ff8653..09a62731e035 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -775,7 +775,7 @@ struct map *maps__first(struct rb_root *maps)
 	return NULL;
 }
 
-struct map *maps__next(struct map *map)
+struct map *map__next(struct map *map)
 {
 	struct rb_node *next = rb_next(&map->rb_node);
 
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 7f39217d29bf..aba9569165ea 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -166,7 +166,7 @@ void maps__insert(struct rb_root *maps, struct map *map);
 void maps__remove(struct rb_root *maps, struct map *map);
 struct map *maps__find(struct rb_root *maps, u64 addr);
 struct map *maps__first(struct rb_root *maps);
-struct map *maps__next(struct map *map);
+struct map *map__next(struct map *map);
 void map_groups__init(struct map_groups *mg, struct machine *machine);
 void map_groups__exit(struct map_groups *mg);
 int map_groups__clone(struct map_groups *mg,
@@ -201,7 +201,7 @@ static inline struct map *map_groups__first(struct map_groups *mg,
 
 static inline struct map *map_groups__next(struct map *map)
 {
-	return maps__next(map);
+	return map__next(map);
 }
 
 struct symbol *map_groups__find_symbol(struct map_groups *mg,
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 14/25] perf tools: Remove redundant initialization of thread linkage members
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 13/25] perf tools: Rename maps__next Arnaldo Carvalho de Melo
@ 2015-05-27 15:38 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 15/25] perf tools: Nuke unused map_groups__flush() Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

A thread moves from a rb tree to a list, but can't be on both, because
those linkage members are in a union. This is leftover from when I was
debugging thread refcounting and had nuked that union.

It is harmless duplication, as RB_CLEAR_NODE() does again what
INIT_LIST_HEAD does.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-hmma9lmip6qlhzhgkhp9tzd1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/thread.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 16c28a37a9e4..28c4b746baa1 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -54,7 +54,6 @@ struct thread *thread__new(pid_t pid, pid_t tid)
 
 		list_add(&comm->list, &thread->comm_list);
 		atomic_set(&thread->refcnt, 0);
-		INIT_LIST_HEAD(&thread->node);
 		RB_CLEAR_NODE(&thread->rb_node);
 	}
 
@@ -70,7 +69,6 @@ void thread__delete(struct thread *thread)
 	struct comm *comm, *tmp;
 
 	BUG_ON(!RB_EMPTY_NODE(&thread->rb_node));
-	BUG_ON(!list_empty(&thread->node));
 
 	thread_stack__free(thread);
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 15/25] perf tools: Nuke unused map_groups__flush()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2015-05-27 15:38 ` [PATCH 14/25] perf tools: Remove redundant initialization of thread linkage members Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 16/25] perf tools: Import rb_erase_init from block/ in the kernel sources Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Luigi Semenzato, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Since:

	9fdbf671ba7e "perf tools: do not flush maps on COMM for perf report"

We have no users of this function, nuke it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Luigi Semenzato <semenzato@chromium.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-hsac1t42ehtva8gut8qe6hih@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/map.c | 22 ----------------------
 tools/perf/util/map.h |  2 --
 2 files changed, 24 deletions(-)

diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 09a62731e035..c1bfd0a12a94 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -498,28 +498,6 @@ void map_groups__put(struct map_groups *mg)
 		map_groups__delete(mg);
 }
 
-void map_groups__flush(struct map_groups *mg)
-{
-	int type;
-
-	for (type = 0; type < MAP__NR_TYPES; type++) {
-		struct rb_root *root = &mg->maps[type];
-		struct rb_node *next = rb_first(root);
-
-		while (next) {
-			struct map *pos = rb_entry(next, struct map, rb_node);
-			next = rb_next(&pos->rb_node);
-			rb_erase(&pos->rb_node, root);
-			/*
-			 * We may have references to this map, for
-			 * instance in some hist_entry instances, so
-			 * just move them to a separate list.
-			 */
-			list_add_tail(&pos->node, &mg->removed_maps[pos->type]);
-		}
-	}
-}
-
 struct symbol *map_groups__find_symbol(struct map_groups *mg,
 				       enum map_type type, u64 addr,
 				       struct map **mapp,
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index aba9569165ea..f2b27566d986 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -233,6 +233,4 @@ int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map,
 struct map *map_groups__find_by_name(struct map_groups *mg,
 				     enum map_type type, const char *name);
 
-void map_groups__flush(struct map_groups *mg);
-
 #endif /* __PERF_MAP_H */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 16/25] perf tools: Import rb_erase_init from block/ in the kernel sources
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 15/25] perf tools: Nuke unused map_groups__flush() Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 17/25] perf machine: Mark removed threads as such Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

I was assuming rb_erase() was setting things up like list_del_init, but
the fact that thread__delete() was being sucessfull is because the last
thing before deleting is to remove the thread from the
machine->dead_threads list, using list_del_init(), that has the same
effect as using rb_erase_init()...

Introduce this function so that we can use it when removing objects from
rb_trees.

Then we will be able to BUG_ON(still on a list) in destructors.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-55b16mbtndjyd7zzg8nmnamx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/include/linux/rbtree.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tools/perf/util/include/linux/rbtree.h b/tools/perf/util/include/linux/rbtree.h
index 2a030c5af3aa..f06d89f0b867 100644
--- a/tools/perf/util/include/linux/rbtree.h
+++ b/tools/perf/util/include/linux/rbtree.h
@@ -1,2 +1,16 @@
+#ifndef __TOOLS_LINUX_PERF_RBTREE_H
+#define __TOOLS_LINUX_PERF_RBTREE_H
 #include <stdbool.h>
 #include "../../../../include/linux/rbtree.h"
+
+/*
+ * Handy for checking that we are not deleting an entry that is
+ * already in a list, found in block/{blk-throttle,cfq-iosched}.c,
+ * probably should be moved to lib/rbtree.c...
+ */
+static inline void rb_erase_init(struct rb_node *n, struct rb_root *root)
+{
+	rb_erase(n, root);
+	RB_CLEAR_NODE(n);
+}
+#endif /* __TOOLS_LINUX_PERF_RBTREE_H */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 17/25] perf machine: Mark removed threads as such
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 16/25] perf tools: Import rb_erase_init from block/ in the kernel sources Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 18/25] perf tools: Leave DSO destruction to the map destruction Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

We use:

  BUG_ON(!RB_EMPTY_NODE(&thread->rb_node));

in the thread destructor as a debugging check to find out about
possibly still referenced thread instances being deleted, to do that
we need to make sure we use RB_CLEAR_NODE() right after rb_erase(),
i.e. that we use the newly introduced rb_erase_init(), that works
just like list_del_init().

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-4fcqo5ypy1cjjf15ilb0hn78@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 7ec3188d3cb3..6bf845758ae3 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -400,7 +400,7 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
 		 * leader and that would screwed the rb tree.
 		 */
 		if (thread__init_map_groups(th, machine)) {
-			rb_erase(&th->rb_node, &machine->threads);
+			rb_erase_init(&th->rb_node, &machine->threads);
 			RB_CLEAR_NODE(&th->rb_node);
 			thread__delete(th);
 			return NULL;
@@ -1314,7 +1314,7 @@ static void __machine__remove_thread(struct machine *machine, struct thread *th,
 	BUG_ON(atomic_read(&th->refcnt) == 0);
 	if (lock)
 		pthread_rwlock_wrlock(&machine->threads_lock);
-	rb_erase(&th->rb_node, &machine->threads);
+	rb_erase_init(&th->rb_node, &machine->threads);
 	RB_CLEAR_NODE(&th->rb_node);
 	/*
 	 * Move it first to the dead_threads list, then drop the reference,
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 18/25] perf tools: Leave DSO destruction to the map destruction
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 17/25] perf machine: Mark removed threads as such Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 19/25] perf tools: Use maps__first()/map__next() Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

As the way DSOs are created are normally via dsos__findnew, so that we
don't have to load the same dso multiple times for multiple maps (think
about /lib64/libc.so.6), so they may be shared and dso__delete() should
be left to be done as part of the map destruction process.

This will all be properly solved by reference counting struct dso, which
will be done soon.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-gbrohe1nvkjxw3u5a1bgj3yh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 1faa1e67398b..db6021834e8f 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -195,7 +195,6 @@ static void put_target_map(struct map *map, bool user)
 {
 	if (map && user) {
 		/* Only the user map needs to be released */
-		dso__delete(map->dso);
 		map__delete(map);
 	}
 }
@@ -1791,7 +1790,6 @@ static int find_perf_probe_point_from_map(struct probe_trace_point *tp,
 
 out:
 	if (map && !is_kprobe) {
-		dso__delete(map->dso);
 		map__delete(map);
 	}
 
@@ -2884,7 +2882,6 @@ int show_available_funcs(const char *target, struct strfilter *_filter,
 	dso__fprintf_symbols_by_name(map->dso, map->type, stdout);
 end:
 	if (user) {
-		dso__delete(map->dso);
 		map__delete(map);
 	}
 	exit_symbol_maps();
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 19/25] perf tools: Use maps__first()/map__next()
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (17 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 18/25] perf tools: Leave DSO destruction to the map destruction Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 20/25] perf tools: Assign default value for some pointers Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Stephane Eranian

From: Arnaldo Carvalho de Melo <acme@redhat.com>

In a few more remaining places, for consistency.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-c2n7slwtto29wndfttdrhfrx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/vmlinux-kallsyms.c | 34 +++++++++++++++++-----------------
 tools/perf/util/event.c             |  7 +++----
 tools/perf/util/map.c               |  7 ++++---
 tools/perf/util/probe-event.c       |  6 +++---
 tools/perf/util/symbol.c            | 23 ++++++++++-------------
 5 files changed, 37 insertions(+), 40 deletions(-)

diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 3d9088003a5b..94ac6924df65 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -23,9 +23,10 @@ int test__vmlinux_matches_kallsyms(void)
 	int err = -1;
 	struct rb_node *nd;
 	struct symbol *sym;
-	struct map *kallsyms_map, *vmlinux_map;
+	struct map *kallsyms_map, *vmlinux_map, *map;
 	struct machine kallsyms, vmlinux;
 	enum map_type type = MAP__FUNCTION;
+	struct rb_root *maps = &vmlinux.kmaps.maps[type];
 	u64 mem_start, mem_end;
 
 	/*
@@ -184,8 +185,8 @@ detour:
 
 	pr_info("Maps only in vmlinux:\n");
 
-	for (nd = rb_first(&vmlinux.kmaps.maps[type]); nd; nd = rb_next(nd)) {
-		struct map *pos = rb_entry(nd, struct map, rb_node), *pair;
+	for (map = maps__first(maps); map; map = map__next(map)) {
+		struct map *
 		/*
 		 * If it is the kernel, kallsyms is always "[kernel.kallsyms]", while
 		 * the kernel will have the path for the vmlinux file being used,
@@ -193,22 +194,22 @@ detour:
 		 * both cases.
 		 */
 		pair = map_groups__find_by_name(&kallsyms.kmaps, type,
-						(pos->dso->kernel ?
-							pos->dso->short_name :
-							pos->dso->name));
+						(map->dso->kernel ?
+							map->dso->short_name :
+							map->dso->name));
 		if (pair)
 			pair->priv = 1;
 		else
-			map__fprintf(pos, stderr);
+			map__fprintf(map, stderr);
 	}
 
 	pr_info("Maps in vmlinux with a different name in kallsyms:\n");
 
-	for (nd = rb_first(&vmlinux.kmaps.maps[type]); nd; nd = rb_next(nd)) {
-		struct map *pos = rb_entry(nd, struct map, rb_node), *pair;
+	for (map = maps__first(maps); map; map = map__next(map)) {
+		struct map *pair;
 
-		mem_start = vmlinux_map->unmap_ip(vmlinux_map, pos->start);
-		mem_end = vmlinux_map->unmap_ip(vmlinux_map, pos->end);
+		mem_start = vmlinux_map->unmap_ip(vmlinux_map, map->start);
+		mem_end = vmlinux_map->unmap_ip(vmlinux_map, map->end);
 
 		pair = map_groups__find(&kallsyms.kmaps, type, mem_start);
 		if (pair == NULL || pair->priv)
@@ -217,7 +218,7 @@ detour:
 		if (pair->start == mem_start) {
 			pair->priv = 1;
 			pr_info(" %" PRIx64 "-%" PRIx64 " %" PRIx64 " %s in kallsyms as",
-				pos->start, pos->end, pos->pgoff, pos->dso->name);
+				map->start, map->end, map->pgoff, map->dso->name);
 			if (mem_end != pair->end)
 				pr_info(":\n*%" PRIx64 "-%" PRIx64 " %" PRIx64,
 					pair->start, pair->end, pair->pgoff);
@@ -228,12 +229,11 @@ detour:
 
 	pr_info("Maps only in kallsyms:\n");
 
-	for (nd = rb_first(&kallsyms.kmaps.maps[type]);
-	     nd; nd = rb_next(nd)) {
-		struct map *pos = rb_entry(nd, struct map, rb_node);
+	maps = &kallsyms.kmaps.maps[type];
 
-		if (!pos->priv)
-			map__fprintf(pos, stderr);
+	for (map = maps__first(maps); map; map = map__next(map)) {
+		if (!map->priv)
+			map__fprintf(map, stderr);
 	}
 out:
 	machine__exit(&kallsyms);
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index a513a51f7330..9d3bba175423 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -329,8 +329,9 @@ int perf_event__synthesize_modules(struct perf_tool *tool,
 				   struct machine *machine)
 {
 	int rc = 0;
-	struct rb_node *nd;
+	struct map *pos;
 	struct map_groups *kmaps = &machine->kmaps;
+	struct rb_root *maps = &kmaps->maps[MAP__FUNCTION];
 	union perf_event *event = zalloc((sizeof(event->mmap) +
 					  machine->id_hdr_size));
 	if (event == NULL) {
@@ -350,10 +351,8 @@ int perf_event__synthesize_modules(struct perf_tool *tool,
 	else
 		event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL;
 
-	for (nd = rb_first(&kmaps->maps[MAP__FUNCTION]);
-	     nd; nd = rb_next(nd)) {
+	for (pos = maps__first(maps); pos; pos = map__next(pos)) {
 		size_t size;
-		struct map *pos = rb_entry(nd, struct map, rb_node);
 
 		if (pos->dso->kernel)
 			continue;
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index c1bfd0a12a94..898ab92a98dd 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -688,9 +688,10 @@ move_map:
 int map_groups__clone(struct map_groups *mg,
 		      struct map_groups *parent, enum map_type type)
 {
-	struct rb_node *nd;
-	for (nd = rb_first(&parent->maps[type]); nd; nd = rb_next(nd)) {
-		struct map *map = rb_entry(nd, struct map, rb_node);
+	struct map *map;
+	struct rb_root *maps = &parent->maps[type];
+
+	for (map = maps__first(maps); map; map = map__next(map)) {
 		struct map *new = map__clone(map);
 		if (new == NULL)
 			return -ENOMEM;
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index db6021834e8f..092256516262 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -162,8 +162,9 @@ static u64 kernel_get_symbol_address_by_name(const char *name, bool reloc)
 
 static struct map *kernel_get_module_map(const char *module)
 {
-	struct rb_node *nd;
 	struct map_groups *grp = &host_machine->kmaps;
+	struct rb_root *maps = &grp->maps[MAP__FUNCTION];
+	struct map *pos;
 
 	/* A file path -- this is an offline module */
 	if (module && strchr(module, '/'))
@@ -172,8 +173,7 @@ static struct map *kernel_get_module_map(const char *module)
 	if (!module)
 		module = "kernel";
 
-	for (nd = rb_first(&grp->maps[MAP__FUNCTION]); nd; nd = rb_next(nd)) {
-		struct map *pos = rb_entry(nd, struct map, rb_node);
+	for (pos = maps__first(maps); pos; pos = map__next(pos)) {
 		if (strncmp(pos->dso->short_name + 1, module,
 			    pos->dso->short_name_len - 2) == 0) {
 			return pos;
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 82a31fd0fcf5..00b6b17e74a7 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -202,18 +202,16 @@ void symbols__fixup_end(struct rb_root *symbols)
 
 void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
 {
-	struct map *prev, *curr;
-	struct rb_node *nd, *prevnd = rb_first(&mg->maps[type]);
+	struct rb_root *maps = &mg->maps[type];
+	struct map *next, *curr;
 
-	if (prevnd == NULL)
+	curr = maps__first(maps);
+	if (curr == NULL)
 		return;
 
-	curr = rb_entry(prevnd, struct map, rb_node);
-
-	for (nd = rb_next(prevnd); nd; nd = rb_next(nd)) {
-		prev = curr;
-		curr = rb_entry(nd, struct map, rb_node);
-		prev->end = curr->start;
+	for (next = map__next(curr); next; next = map__next(curr)) {
+		curr->end = next->start;
+		curr = next;
 	}
 
 	/*
@@ -1522,11 +1520,10 @@ out:
 struct map *map_groups__find_by_name(struct map_groups *mg,
 				     enum map_type type, const char *name)
 {
-	struct rb_node *nd;
-
-	for (nd = rb_first(&mg->maps[type]); nd; nd = rb_next(nd)) {
-		struct map *map = rb_entry(nd, struct map, rb_node);
+	struct rb_root *maps = &mg->maps[type];
+	struct map *map;
 
+	for (map = maps__first(maps); map; map = map__next(map)) {
 		if (map->dso && strcmp(map->dso->short_name, name) == 0)
 			return map;
 	}
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 20/25] perf tools: Assign default value for some pointers
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (18 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 19/25] perf tools: Use maps__first()/map__next() Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 21/25] perf tools: Improve setting of gcc debug option Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Martin Liška, Arnaldo Carvalho de Melo

From: Martin Liška <mliska@suse.cz>

Assign default value for pointers that are identified by the compiler as
non-initialized.

Signed-off-by: Martin Liska <mliska@suse.cz>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/5564393C.1090104@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/common.c            | 2 +-
 tools/perf/util/symbol.c            | 2 +-
 tools/perf/util/trace-event-parse.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 49776f190abf..b7bb42c44694 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -61,7 +61,7 @@ const char *const mips_triplets[] = {
 static bool lookup_path(char *name)
 {
 	bool found = false;
-	char *path, *tmp;
+	char *path, *tmp = NULL;
 	char buf[PATH_MAX];
 	char *env = getenv("PATH");
 
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 00b6b17e74a7..b9e3eb581884 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -398,7 +398,7 @@ static struct symbol *symbols__find_by_name(struct rb_root *symbols,
 					    const char *name)
 {
 	struct rb_node *n;
-	struct symbol_name_rb_node *s;
+	struct symbol_name_rb_node *s = NULL;
 
 	if (symbols == NULL)
 		return NULL;
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 25d6c737be3e..d4957418657e 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -173,7 +173,7 @@ void parse_ftrace_printk(struct pevent *pevent,
 	char *line;
 	char *next = NULL;
 	char *addr_str;
-	char *fmt;
+	char *fmt = NULL;
 
 	line = strtok_r(file, "\n", &next);
 	while (line) {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 21/25] perf tools: Improve setting of gcc debug option
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (19 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 20/25] perf tools: Assign default value for some pointers Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 22/25] perf sched: Add option to merge like comms to lat output Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Martin Liska, Arnaldo Carvalho de Melo

From: Martin Liska <mliska@suse.cz>

Correct debugging experience is given by passing -Og to compiler.

Do it in a way that supports older compilers

Signed-off-by: Martin Liska <mliska@suse.cz>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/5564393C.1090104@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile      |  2 ++
 tools/perf/config/utilities.mak | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e3b3724e73ff..317001c94660 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -130,6 +130,8 @@ endif
 
 ifeq ($(DEBUG),0)
   CFLAGS += -O6
+else
+  CFLAGS += $(call cc-option,-Og,-O0)
 endif
 
 ifdef PARSER_DEBUG
diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index c16ce833079c..0ebef09c0842 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -177,3 +177,22 @@ $(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2)))
 endef
 _ge_attempt = $(if $(get-executable),$(get-executable),$(call _gea_err,$(2)))
 _gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))
+
+# try-run
+# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
+# Exit code chooses option. "$$TMP" is can be used as temporary file and
+# is automatically cleaned up.
+try-run = $(shell set -e;		\
+	TMP="$(TMPOUT).$$$$.tmp";	\
+	TMPO="$(TMPOUT).$$$$.o";	\
+	if ($(1)) >/dev/null 2>&1;	\
+	then echo "$(2)";		\
+	else echo "$(3)";		\
+	fi;				\
+	rm -f "$$TMP" "$$TMPO")
+
+# cc-option
+# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+
+cc-option = $(call try-run,\
+	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 22/25] perf sched: Add option to merge like comms to lat output
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (20 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 21/25] perf tools: Improve setting of gcc debug option Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 23/25] perf tools: Disallow PMU events intel_pt and intel_bts until there is support Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Josef Bacik, Peter Zijlstra, kernel-team,
	Arnaldo Carvalho de Melo

From: Josef Bacik <jbacik@fb.com>

Sometimes when debugging large multi-threaded applications it is helpful
to collate all of the latency numbers into one bulk record to get an
idea of what is going on.

This patch does this by merging any entries that belong to the same comm
into one entry and then spits out those totals.

I've also slightly changed the output so you can see how many threads
were merged in the processing.  Here is the new default output format

 -----------------------------------------------------------------------------------------------------------
  Task                 | Runtime ms  | Switches | Average delay ms | Maximum delay ms | Maximum delay at    |
 -----------------------------------------------------------------------------------------------------------
  chrome:(23)          |  740.878 ms |     2612 | avg:    0.022 ms | max:    0.845 ms | max at: 7935.254223 s
  pulseaudio:1523      |   94.440 ms |      597 | avg:    0.027 ms | max:    0.110 ms | max at: 7934.668372 s
  threaded-ml:6042     |   72.554 ms |      386 | avg:    0.035 ms | max:    1.186 ms | max at: 7935.330911 s
  Chrome_IOThread:3832 |   52.388 ms |      456 | avg:    0.021 ms | max:    1.365 ms | max at: 7935.330602 s
  Chrome_ChildIOT:(7)  |   50.694 ms |      743 | avg:    0.021 ms | max:    1.448 ms | max at: 7935.256659 s
  Compositor:5510      |   30.012 ms |      192 | avg:    0.019 ms | max:    0.131 ms | max at: 7936.636815 s
  plugin_audio_th:6043 |   24.828 ms |      314 | avg:    0.018 ms | max:    0.143 ms | max at: 7936.205994 s
  CompositorTileW:(2)  |   14.099 ms |       45 | avg:    0.022 ms | max:    0.153 ms | max at: 7937.521800 s

the (#) after the task is the number of tasks merged, and then if there were
no tasks merged it just shows the pid.  Here is the same trace file with the -p
option to print the per-pid latency numbers

 -----------------------------------------------------------------------------------------------------------
  Task                 | Runtime ms  | Switches | Average delay ms | Maximum delay ms | Maximum delay at    |
 -----------------------------------------------------------------------------------------------------------
  chrome:5500          |  386.872 ms |      387 | avg:    0.023 ms | max:    0.241 ms | max at: 7936.001694 s
  pulseaudio:1523      |   94.440 ms |      597 | avg:    0.027 ms | max:    0.110 ms | max at: 7934.668372 s
  threaded-ml:6042     |   72.554 ms |      386 | avg:    0.035 ms | max:    1.186 ms | max at: 7935.330911 s
  chrome:10226         |   69.710 ms |      251 | avg:    0.023 ms | max:    0.764 ms | max at: 7935.992305 s
  chrome:4267          |   64.551 ms |      418 | avg:    0.021 ms | max:    0.294 ms | max at: 7937.862427 s
  chrome:4827          |   62.268 ms |       54 | avg:    0.029 ms | max:    0.666 ms | max at: 7935.992813 s
  Chrome_IOThread:3832 |   52.388 ms |      456 | avg:    0.021 ms | max:    1.365 ms | max at: 7935.330602 s
  chrome:3776          |   46.150 ms |      349 | avg:    0.023 ms | max:    0.845 ms | max at: 7935.254223 s

Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: kernel-team@fb.com
Link: http://lkml.kernel.org/r/1432300720-30478-1-git-send-email-jbacik@fb.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 77 +++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 72 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 79273ecf92eb..33962612a5e9 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -95,6 +95,7 @@ struct work_atoms {
 	u64			total_lat;
 	u64			nb_atoms;
 	u64			total_runtime;
+	int			num_merged;
 };
 
 typedef int (*sort_fn_t)(struct work_atoms *, struct work_atoms *);
@@ -168,9 +169,10 @@ struct perf_sched {
 	u64		 all_runtime;
 	u64		 all_count;
 	u64		 cpu_last_switched[MAX_CPUS];
-	struct rb_root	 atom_root, sorted_atom_root;
+	struct rb_root	 atom_root, sorted_atom_root, merged_atom_root;
 	struct list_head sort_list, cmp_pid;
 	bool force;
+	bool skip_merge;
 };
 
 static u64 get_nsecs(void)
@@ -1182,7 +1184,10 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_
 	sched->all_runtime += work_list->total_runtime;
 	sched->all_count   += work_list->nb_atoms;
 
-	ret = printf("  %s:%d ", thread__comm_str(work_list->thread), work_list->thread->tid);
+	if (work_list->num_merged > 1)
+		ret = printf("  %s:(%d) ", thread__comm_str(work_list->thread), work_list->num_merged);
+	else
+		ret = printf("  %s:%d ", thread__comm_str(work_list->thread), work_list->thread->tid);
 
 	for (i = 0; i < 24 - ret; i++)
 		printf(" ");
@@ -1302,17 +1307,22 @@ static int sort_dimension__add(const char *tok, struct list_head *list)
 static void perf_sched__sort_lat(struct perf_sched *sched)
 {
 	struct rb_node *node;
-
+	struct rb_root *root = &sched->atom_root;
+again:
 	for (;;) {
 		struct work_atoms *data;
-		node = rb_first(&sched->atom_root);
+		node = rb_first(root);
 		if (!node)
 			break;
 
-		rb_erase(node, &sched->atom_root);
+		rb_erase(node, root);
 		data = rb_entry(node, struct work_atoms, node);
 		__thread_latency_insert(&sched->sorted_atom_root, data, &sched->sort_list);
 	}
+	if (root == &sched->atom_root) {
+		root = &sched->merged_atom_root;
+		goto again;
+	}
 }
 
 static int process_sched_wakeup_event(struct perf_tool *tool,
@@ -1572,6 +1582,59 @@ static void print_bad_events(struct perf_sched *sched)
 	}
 }
 
+static void __merge_work_atoms(struct rb_root *root, struct work_atoms *data)
+{
+	struct rb_node **new = &(root->rb_node), *parent = NULL;
+	struct work_atoms *this;
+	const char *comm = thread__comm_str(data->thread), *this_comm;
+
+	while (*new) {
+		int cmp;
+
+		this = container_of(*new, struct work_atoms, node);
+		parent = *new;
+
+		this_comm = thread__comm_str(this->thread);
+		cmp = strcmp(comm, this_comm);
+		if (cmp > 0) {
+			new = &((*new)->rb_left);
+		} else if (cmp < 0) {
+			new = &((*new)->rb_right);
+		} else {
+			this->num_merged++;
+			this->total_runtime += data->total_runtime;
+			this->nb_atoms += data->nb_atoms;
+			this->total_lat += data->total_lat;
+			list_splice(&data->work_list, &this->work_list);
+			if (this->max_lat < data->max_lat) {
+				this->max_lat = data->max_lat;
+				this->max_lat_at = data->max_lat_at;
+			}
+			zfree(&data);
+			return;
+		}
+	}
+
+	data->num_merged++;
+	rb_link_node(&data->node, parent, new);
+	rb_insert_color(&data->node, root);
+}
+
+static void perf_sched__merge_lat(struct perf_sched *sched)
+{
+	struct work_atoms *data;
+	struct rb_node *node;
+
+	if (sched->skip_merge)
+		return;
+
+	while ((node = rb_first(&sched->atom_root))) {
+		rb_erase(node, &sched->atom_root);
+		data = rb_entry(node, struct work_atoms, node);
+		__merge_work_atoms(&sched->merged_atom_root, data);
+	}
+}
+
 static int perf_sched__lat(struct perf_sched *sched)
 {
 	struct rb_node *next;
@@ -1581,6 +1644,7 @@ static int perf_sched__lat(struct perf_sched *sched)
 	if (perf_sched__read_events(sched))
 		return -1;
 
+	perf_sched__merge_lat(sched);
 	perf_sched__sort_lat(sched);
 
 	printf("\n -----------------------------------------------------------------------------------------------------------------\n");
@@ -1732,6 +1796,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		.profile_cpu	      = -1,
 		.next_shortname1      = 'A',
 		.next_shortname2      = '0',
+		.skip_merge           = 0,
 	};
 	const struct option latency_options[] = {
 	OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
@@ -1742,6 +1807,8 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "CPU to profile on"),
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
 		    "dump raw trace in ASCII"),
+	OPT_BOOLEAN('p', "pids", &sched.skip_merge,
+		    "latency stats per pid instead of per comm"),
 	OPT_END()
 	};
 	const struct option replay_options[] = {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 23/25] perf tools: Disallow PMU events intel_pt and intel_bts until there is support
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (21 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 22/25] perf sched: Add option to merge like comms to lat output Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 24/25] perf probe: Show the error reason comes from invalid DSO Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Jiri Olsa, Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

Disallow PMU events intel_pt and intel_bts until the tools support them.

By default any PMU is selectable as an event but until the tools have
intel_pt and intel_bts support using them would result in no data being
recorded without any indication as to why.

Before the change:

    $ perf record -e intel_bts// sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.008 MB perf.data ]
    $ perf report --stdio
    Error:
    The perf.data file has no samples!

After the change:

    $ perf record -e intel_bts// sleep 1
    invalid or unsupported event: 'intel_bts//'
    Run 'perf list' for a list of valid events

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1432295653-13989-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/pmu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 244c66f89891..5d3ab7c8ceaf 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -442,6 +442,10 @@ static struct perf_pmu *pmu_lookup(const char *name)
 	LIST_HEAD(aliases);
 	__u32 type;
 
+	/* No support for intel_bts or intel_pt so disallow them */
+	if (!strcmp(name, "intel_bts") || !strcmp(name, "intel_pt"))
+		return NULL;
+
 	/*
 	 * The pmu data we store & need consists of the pmu
 	 * type value and format definitions. Load both right
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 24/25] perf probe: Show the error reason comes from invalid DSO
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (22 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 23/25] perf tools: Disallow PMU events intel_pt and intel_bts until there is support Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 15:39 ` [PATCH 25/25] perf probe: Fix an error when deleting probes successfully Arnaldo Carvalho de Melo
  2015-05-27 16:43 ` [GIT PULL 00/25] perf/core improvements and fixes Ingo Molnar
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, David Ahern, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Richard Weinberger,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Show the reason of error when dso__load* fails. This shows when user
gives wrong kernel image or wrong path.

Without this, perf probe shows an obscure message:

  ----
  $ perf probe -k ~/kbin/linux-3.x86_64/vmlinux -L vfs_read
  Failed to find path of kernel module.
    Error: Failed to show lines.
  ----

With this, perf shows appropriate error message:

  ----
  $ perf probe -k ~/kbin/linux-3.x86_64/vmlinux -L vfs_read
  Failed to find the path for kernel: Mismatching build id
    Error: Failed to show lines.
  ----

And:

  ----
  $ perf probe -k /non-exist/kernel/vmlinux -L vfs_read
  Failed to find the path for kernel: No such file or directory
    Error: Failed to show lines.
  ----

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/20150527083718.23880.84100.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 47 ++++++++++++++++++++++---------------------
 tools/perf/util/probe-event.h |  3 ---
 2 files changed, 24 insertions(+), 26 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 092256516262..f5be411bc69c 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -200,11 +200,12 @@ static void put_target_map(struct map *map, bool user)
 }
 
 
-static struct dso *kernel_get_module_dso(const char *module)
+static int kernel_get_module_dso(const char *module, struct dso **pdso)
 {
 	struct dso *dso;
 	struct map *map;
 	const char *vmlinux_name;
+	int ret = 0;
 
 	if (module) {
 		list_for_each_entry(dso, &host_machine->kernel_dsos.head,
@@ -214,30 +215,21 @@ static struct dso *kernel_get_module_dso(const char *module)
 				goto found;
 		}
 		pr_debug("Failed to find module %s.\n", module);
-		return NULL;
+		return -ENOENT;
 	}
 
 	map = host_machine->vmlinux_maps[MAP__FUNCTION];
 	dso = map->dso;
 
 	vmlinux_name = symbol_conf.vmlinux_name;
-	if (vmlinux_name) {
-		if (dso__load_vmlinux(dso, map, vmlinux_name, false, NULL) <= 0)
-			return NULL;
-	} else {
-		if (dso__load_vmlinux_path(dso, map, NULL) <= 0) {
-			pr_debug("Failed to load kernel map.\n");
-			return NULL;
-		}
-	}
+	dso->load_errno = 0;
+	if (vmlinux_name)
+		ret = dso__load_vmlinux(dso, map, vmlinux_name, false, NULL);
+	else
+		ret = dso__load_vmlinux_path(dso, map, NULL);
 found:
-	return dso;
-}
-
-const char *kernel_get_module_path(const char *module)
-{
-	struct dso *dso = kernel_get_module_dso(module);
-	return (dso) ? dso->long_name : NULL;
+	*pdso = dso;
+	return ret;
 }
 
 static int convert_exec_to_group(const char *exec, char **result)
@@ -389,16 +381,25 @@ static int get_alternative_line_range(struct debuginfo *dinfo,
 static struct debuginfo *open_debuginfo(const char *module, bool silent)
 {
 	const char *path = module;
-	struct debuginfo *ret;
+	char reason[STRERR_BUFSIZE];
+	struct debuginfo *ret = NULL;
+	struct dso *dso = NULL;
+	int err;
 
 	if (!module || !strchr(module, '/')) {
-		path = kernel_get_module_path(module);
-		if (!path) {
+		err = kernel_get_module_dso(module, &dso);
+		if (err < 0) {
+			if (!dso || dso->load_errno == 0) {
+				if (!strerror_r(-err, reason, STRERR_BUFSIZE))
+					strcpy(reason, "(unknown)");
+			} else
+				dso__strerror_load(dso, reason, STRERR_BUFSIZE);
 			if (!silent)
-				pr_err("Failed to find path of %s module.\n",
-				       module ?: "kernel");
+				pr_err("Failed to find the path for %s: %s\n",
+					module ?: "kernel", reason);
 			return NULL;
 		}
+		path = dso->long_name;
 	}
 	ret = debuginfo__new(path);
 	if (!ret && !silent) {
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 537eb329c2cf..31db6ee7db54 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -131,9 +131,6 @@ extern void line_range__clear(struct line_range *lr);
 /* Initialize line range */
 extern int line_range__init(struct line_range *lr);
 
-/* Internal use: Return kernel/module path */
-extern const char *kernel_get_module_path(const char *module);
-
 extern int add_perf_probe_events(struct perf_probe_event *pevs, int npevs);
 extern int del_perf_probe_events(struct strfilter *filter);
 extern int show_perf_probe_events(struct strfilter *filter);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 25/25] perf probe: Fix an error when deleting probes successfully
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (23 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 24/25] perf probe: Show the error reason comes from invalid DSO Arnaldo Carvalho de Melo
@ 2015-05-27 15:39 ` Arnaldo Carvalho de Melo
  2015-05-27 16:43 ` [GIT PULL 00/25] perf/core improvements and fixes Ingo Molnar
  25 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-27 15:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, David Ahern, Jiri Olsa,
	Namhyung Kim, Peter Zijlstra, Richard Weinberger,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Fix a bug in del_perf_probe_events() which returns an error (-ENOENT)
even if the probes are successfully deleted.

This happens only if the probes are on user-apps and not on kernel,
simply because it doesn't clear the previous error.

So, without this fix, we get an error even though events are being
successfully removed.

  ------
  # ./perf probe -x ./perf del_perf_probe_events
  Added new event:
    probe_perf:del_perf_probe_events (on del_perf_probe_events in ...

  You can now use it in all perf tools, such as:

          perf record -e probe_perf:del_perf_probe_events -aR sleep 1

  # ./perf probe -d \*:\*
  Removed event: probe_perf:del_perf_probe_events
    Error: Failed to delete events.
  ------

This fixes the above error.
  ------
  # ./perf probe -d \*:\*
  Removed event: probe_perf:del_perf_probe_events
  ------

Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/20150527083725.23880.45209.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index f5be411bc69c..97da98481d89 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2811,13 +2811,14 @@ int del_perf_probe_events(struct strfilter *filter)
 		goto error;
 
 	ret2 = del_trace_probe_events(ufd, filter, unamelist);
-	if (ret2 < 0 && ret2 != -ENOENT)
+	if (ret2 < 0 && ret2 != -ENOENT) {
 		ret = ret2;
-	else if (ret == -ENOENT && ret2 == -ENOENT) {
+		goto error;
+	}
+	if (ret == -ENOENT && ret2 == -ENOENT)
 		pr_debug("\"%s\" does not hit any event.\n", str);
 		/* Note that this is silently ignored */
-		ret = 0;
-	}
+	ret = 0;
 
 error:
 	if (kfd >= 0) {
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (24 preceding siblings ...)
  2015-05-27 15:39 ` [PATCH 25/25] perf probe: Fix an error when deleting probes successfully Arnaldo Carvalho de Melo
@ 2015-05-27 16:43 ` Ingo Molnar
  25 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2015-05-27 16:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Josef Bacik,
	kernel-team, Luigi Semenzato, Martin Liska, Masami Hiramatsu,
	Namhyung Kim, Nam T . Nguyen, Paul Mackerras, Peter Zijlstra,
	Richard Weinberger, Simon Que, Stephane Eranian,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Now with the intel PT patches removed except for one, for a problem I
> found when trying it on a machine without that feature and that Adrian improved
> things to make it clear it wasn't available.
> 
> 	Ah two patches from Masami, for perf probe, were added.
> 
> 	Please consider applying,
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit a82d24edfeaf1ed244cf8b969916840c6feb5165:
> 
>   perf/x86/intel/pt: Remove redundant variable declaration (2015-05-27 09:17:48 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to dddc7ee32fa13efc66afa71ebd83bce545c8392a:
> 
>   perf probe: Fix an error when deleting probes successfully (2015-05-27 12:21:46 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Add option in 'perf sched' to merge like comms to lat output (Josef Bacik)
> 
> - Improve 'perf probe' error messages when not finding a
>   suitable vmlinux (Masami Hiramatsu)
> 
> Infrastructure:
> 
> - Use atomic.h for various pre-existing reference counts (Arnaldo Carvalho de Melo)
> 
> - Leg work for refcounting 'struct map' (Arnaldo Carvalho de Melo)
> 
> - Assign default value for some pointers (Martin Liška)
> 
> - Improve setting of gcc debug option (Martin Liška)
> 
> - Separate the tests and tools in installation (Nam T. Nguyen)
> 
> - Reduce number of arguments of hist_entry_iter__add() (Namhyung Kim)
> 
> - DSO data cache fixes (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (5):
>       perf tools: Fix function declarations needed by parse-events.y
>       perf tools: Fix parse_events_error dereferences
>       perf build: Fix libunwind feature detection on 32-bit x86
>       perf session: Fix perf_session__peek_event()
>       perf tools: Disallow PMU events intel_pt and intel_bts until there is support
> 
> Arnaldo Carvalho de Melo (10):
>       perf hists: Rename add_hist_entry to hists__findnew_entry
>       perf comm: Use atomic.h for refcounting
>       perf machine: Do not call map_groups__delete(), drop refcnt instead
>       perf tools: Rename maps__next
>       perf tools: Remove redundant initialization of thread linkage members
>       perf tools: Nuke unused map_groups__flush()
>       perf tools: Import rb_erase_init from block/ in the kernel sources
>       perf machine: Mark removed threads as such
>       perf tools: Leave DSO destruction to the map destruction
>       perf tools: Use maps__first()/map__next()
> 
> Josef Bacik (1):
>       perf sched: Add option to merge like comms to lat output
> 
> Martin Liska (1):
>       perf tools: Improve setting of gcc debug option
> 
> Martin Liška (1):
>       perf tools: Assign default value for some pointers
> 
> Masami Hiramatsu (2):
>       perf probe: Show the error reason comes from invalid DSO
>       perf probe: Fix an error when deleting probes successfully
> 
> Nam T. Nguyen (1):
>       perf tools: Separate the tests and tools in installation
> 
> Namhyung Kim (4):
>       perf hists: Reducing arguments of hist_entry_iter__add()
>       perf tools: Fix dso__data_read_offset() file opening
>       perf tools: Get rid of dso__data_fd() from dso__data_size()
>       perf tools: Add dso__data_get/put_fd()
> 
>  tools/perf/Makefile.perf               |  6 ++-
>  tools/perf/arch/common.c               |  2 +-
>  tools/perf/builtin-report.c            |  9 ++--
>  tools/perf/builtin-sched.c             | 77 +++++++++++++++++++++++++++--
>  tools/perf/builtin-top.c               |  7 +--
>  tools/perf/config/Makefile             |  4 +-
>  tools/perf/config/utilities.mak        | 19 ++++++++
>  tools/perf/tests/dso-data.c            | 11 +++++
>  tools/perf/tests/hists_cumulate.c      |  6 ++-
>  tools/perf/tests/hists_filter.c        |  4 +-
>  tools/perf/tests/hists_output.c        |  6 ++-
>  tools/perf/tests/vmlinux-kallsyms.c    | 34 ++++++-------
>  tools/perf/util/comm.c                 | 13 +++--
>  tools/perf/util/dso.c                  | 88 +++++++++++++++++++---------------
>  tools/perf/util/dso.h                  | 13 +++--
>  tools/perf/util/event.c                |  7 ++-
>  tools/perf/util/hist.c                 | 24 ++++------
>  tools/perf/util/hist.h                 |  1 -
>  tools/perf/util/include/linux/rbtree.h | 14 ++++++
>  tools/perf/util/machine.c              |  6 +--
>  tools/perf/util/map.c                  | 31 ++----------
>  tools/perf/util/map.h                  |  6 +--
>  tools/perf/util/parse-events.c         | 18 +++----
>  tools/perf/util/parse-events.h         |  6 +++
>  tools/perf/util/parse-events.y         |  6 ++-
>  tools/perf/util/pmu.c                  |  4 ++
>  tools/perf/util/probe-event.c          | 65 +++++++++++++------------
>  tools/perf/util/probe-event.h          |  3 --
>  tools/perf/util/session.c              |  6 +--
>  tools/perf/util/symbol.c               | 25 +++++-----
>  tools/perf/util/thread.c               |  2 -
>  tools/perf/util/trace-event-parse.c    |  2 +-
>  tools/perf/util/unwind-libunwind.c     | 11 +++--
>  33 files changed, 332 insertions(+), 204 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [GIT PULL 00/25] perf/core improvements and fixes
@ 2017-06-21 18:02 Arnaldo Carvalho de Melo
  2017-06-21 18:13 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-06-21 18:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Andi Kleen,
	David Ahern, Jiri Olsa, Kan Liang, linuxppc-dev, Milian Wolff,
	Namhyung Kim, Naveen N . Rao, Paolo Bonzini, Peter Zijlstra,
	Ravi Bangoria, Robert Elliott, Stephane Eranian, Thomas Gleixner,
	Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit 007b811b4041989ec2dc91b9614aa2c41332723e:

  Merge tag 'perf-core-for-mingo-4.13-20170719' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-06-20 10:49:08 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.13-20170621

for you to fetch changes up to 701516ae3dec801084bc913d21e03fce15c61a0b:

  perf script: Fix message because field list option is -F not -f (2017-06-21 11:35:53 -0300)

----------------------------------------------------------------
perf/core improvements ad fixes:

New features:

- Add support to measure SMI cost in 'perf stat' (Kan Liang)

- Add support for unwinding callchains in powerpc with libdw (Paolo Bonzini)

Fixes:

- Fix message: cpu list option is -C not -c (Adrian Hunter)

- Fix 'perf script' message: field list option is -F not -f (Adrian Hunter)

- Intel PT fixes: (Adrian Hunter)

  o Fix missing stack clear
  o Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
  o Fix last_ip usage
  o Ensure never to set 'last_ip' when packet 'count' is zero
  o Clear FUP flag on error
  o Fix transactions_sample_type

Infrastructure:

- Intel PT cleanups/refactorings (Adrian Hunter)

  o Use FUP always when scanning for an IP
  o Add missing __fallthrough
  o Remove redundant initial_skip checks
  o Allow decoding with branch tracing disabled
  o Add default config for pass-through branch enable
  o Add documentation for new config terms
  o Add decoder support for ptwrite and power event packets
  o Add reserved byte to CBR packet payload
  o Add decoder support for CBR events

- Move  find_process() to the only place that uses it, skimming some
  more fat from util.[ch] (Arnaldo Carvalho de Melo)

- Do parameter validation earlier on fetch_kernel_version() (Arnaldo Carvalho de Melo)

- Remove unused _ALL_SOURCE define (Arnaldo Carvalho de Melo)

- Add sysfs__write_int function (Kan Liang)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (19):
      perf intel-pt: Move decoder error setting into one condition
      perf intel-pt: Improve sample timestamp
      perf intel-pt: Fix missing stack clear
      perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
      perf intel-pt: Fix last_ip usage
      perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero
      perf intel-pt: Use FUP always when scanning for an IP
      perf intel-pt: Clear FUP flag on error
      perf intel-pt: Add missing __fallthrough
      perf intel-pt: Allow decoding with branch tracing disabled
      perf intel-pt: Add default config for pass-through branch enable
      perf intel-pt: Add documentation for new config terms
      perf intel-pt: Add decoder support for ptwrite and power event packets
      perf intel-pt: Add reserved byte to CBR packet payload
      perf intel-pt: Add decoder support for CBR events
      perf intel-pt: Remove redundant initial_skip checks
      perf intel-pt: Fix transactions_sample_type
      perf tools: Fix message because cpu list option is -C not -c
      perf script: Fix message because field list option is -F not -f

Arnaldo Carvalho de Melo (3):
      perf evsel: Adopt find_process()
      perf tools: Do parameter validation earlier on fetch_kernel_version()
      perf tools: Remove unused _ALL_SOURCE define

Kan Liang (2):
      tools lib api fs: Add sysfs__write_int function
      perf stat: Add support to measure SMI cost

Paolo Bonzini (1):
      perf unwind: Support for powerpc

 tools/lib/api/fs/fs.c                              |  30 +++
 tools/lib/api/fs/fs.h                              |   4 +
 tools/perf/Documentation/intel-pt.txt              |  36 +++
 tools/perf/Documentation/perf-stat.txt             |  14 +
 tools/perf/Makefile.config                         |   2 +-
 tools/perf/arch/powerpc/util/Build                 |   2 +
 tools/perf/arch/powerpc/util/unwind-libdw.c        |  73 ++++++
 tools/perf/arch/x86/util/intel-pt.c                |   5 +
 tools/perf/builtin-script.c                        |   2 +-
 tools/perf/builtin-stat.c                          |  49 ++++
 tools/perf/util/evsel.c                            |  39 +++
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 290 +++++++++++++++++++--
 .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |  13 +
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 110 +++++++-
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   7 +
 tools/perf/util/intel-pt.c                         |  23 +-
 tools/perf/util/session.c                          |   2 +-
 tools/perf/util/stat-shadow.c                      |  33 +++
 tools/perf/util/stat.c                             |   2 +
 tools/perf/util/stat.h                             |   2 +
 tools/perf/util/util.c                             |  52 +---
 tools/perf/util/util.h                             |   3 -
 22 files changed, 710 insertions(+), 83 deletions(-)
 create mode 100644 tools/perf/arch/powerpc/util/unwind-libdw.c

Test results:

The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.

Several are cross builds, the ones with -x-ARCH, and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:3.6: Ok
   4 alpine:edge: Ok
   5 android-ndk:r12b-arm: Ok
   6 archlinux:latest: Ok
   7 centos:5: Ok
   8 centos:6: Ok
   9 centos:7: Ok
  10 debian:7: Ok
  11 debian:8: Ok
  12 debian:9: Ok
  13 debian:experimental: Ok
  14 debian:experimental-x-arm64: Ok
  15 debian:experimental-x-mips: Ok
  16 debian:experimental-x-mips64: Ok
  17 debian:experimental-x-mipsel: Ok
  18 fedora:20: Ok
  19 fedora:21: Ok
  20 fedora:22: Ok
  21 fedora:23: Ok
  22 fedora:24: Ok
  23 fedora:24-x-ARC-uClibc: Ok
  24 fedora:25: Ok
  25 fedora:rawhide: Ok
  26 mageia:5: Ok
  27 opensuse:13.2: Ok
  28 opensuse:42.1: Ok
  29 opensuse:tumbleweed: Ok
  30 ubuntu:12.04.5: Ok
  31 ubuntu:14.04.4: Ok
  32 ubuntu:14.04.4-x-linaro-arm64: Ok
  33 ubuntu:15.10: Ok
  34 ubuntu:16.04: Ok
  35 ubuntu:16.04-x-arm: Ok
  36 ubuntu:16.04-x-arm64: Ok
  37 ubuntu:16.04-x-powerpc: Ok
  38 ubuntu:16.04-x-powerpc64: Ok
  39 ubuntu:16.04-x-powerpc64el: Ok
  40 ubuntu:16.04-x-s390: Ok
  41 ubuntu:16.10: Ok
  42 ubuntu:17.04: Ok
  # 

  # uname -a
  Linux jouet 4.12.0-rc4+ #1 SMP Fri Jun 9 12:59:23 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: Simple expression parser                   : Ok
   7: PERF_RECORD_* events & perf_sample fields  : Ok
   8: Parse perf pmu format                      : Ok
   9: DSO data read                              : Ok
  10: DSO data cache                             : Ok
  11: DSO data reopen                            : Ok
  12: Roundtrip evsel->name                      : Ok
  13: Parse sched tracepoints fields             : Ok
  14: syscalls:sys_enter_openat event fields     : Ok
  15: Setup struct perf_event_attr               : Ok
  16: Match and link multiple hists              : Ok
  17: 'import perf' in python                    : Ok
  18: Breakpoint overflow signal handler         : Ok
  19: Breakpoint overflow sampling               : Ok
  20: Number of exit events of a simple workload : Ok
  21: Software clock events period values        : Ok
  22: Object code reading                        : Ok
  23: Sample parsing                             : Ok
  24: Use a dummy software event to keep tracking: Ok
  25: Parse with no sample_id_all bit set        : Ok
  26: Filter hist entries                        : Ok
  27: Lookup mmap thread                         : Ok
  28: Share thread mg                            : Ok
  29: Sort output of hist entries                : Ok
  30: Cumulate child hist entries                : Ok
  31: Track with sched_switch                    : Ok
  32: Filter fds with revents mask in a fdarray  : Ok
  33: Add fd to a fdarray, making it autogrow    : Ok
  34: kmod_path__parse                           : Ok
  35: Thread map                                 : Ok
  36: LLVM search and compile                    :
  36.1: Basic BPF llvm compile                    : Ok
  36.2: kbuild searching                          : Ok
  36.3: Compile source for BPF prologue generation: Ok
  36.4: Compile source for BPF relocation         : Ok
  37: Session topology                           : Ok
  38: BPF filter                                 :
  38.1: Basic BPF filtering                      : Ok
  38.2: BPF pinning                              : Ok
  38.3: BPF prologue generation                  : Ok
  38.4: BPF relocation checker                   : Ok
  39: Synthesize thread map                      : Ok
  40: Remove thread map                          : Ok
  41: Synthesize cpu map                         : Ok
  42: Synthesize stat config                     : Ok
  43: Synthesize stat                            : Ok
  44: Synthesize stat round                      : Ok
  45: Synthesize attr update                     : Ok
  46: Event times                                : Ok
  47: Read backward ring buffer                  : Ok
  48: Print cpu map                              : Ok
  49: Probe SDT events                           : Ok
  50: is_printable_array                         : Ok
  51: Print bitmap                               : Ok
  52: perf hooks                                 : Ok
  53: builtin clang support                      : Skip (not compiled in)
  54: unit_number__scnprintf                     : Ok
  55: x86 rdpmc                                  : Ok
  56: Convert perf time to TSC                   : Ok
  57: DWARF unwind                               : Ok
  58: x86 instruction decoder - new instructions : Ok
  59: Intel cqm nmi context read                 : Skip
  #

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
               make_no_slang_O: make NO_SLANG=1
              make_clean_all_O: make clean all
                make_no_gtk2_O: make NO_GTK2=1
             make_no_libperl_O: make NO_LIBPERL=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
                    make_doc_O: make doc
           make_no_libbionic_O: make NO_LIBBIONIC=1
           make_no_backtrace_O: make NO_BACKTRACE=1
              make_no_libelf_O: make NO_LIBELF=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
            make_no_demangle_O: make NO_DEMANGLE=1
             make_util_map_o_O: make util/map.o
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
         make_with_clangllvm_O: make LIBCLANGLLVM=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                 make_perf_o_O: make perf.o
                   make_tags_O: make tags
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
            make_install_bin_O: make install-bin
                  make_debug_O: make DEBUG=1
              make_no_libbpf_O: make NO_LIBBPF=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
                   make_pure_O: make
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
         make_install_prefix_O: make install prefix=/tmp/krava
                make_install_O: make install
                   make_help_O: make help
                 make_static_O: make LDFLAGS=-static
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                make_no_newt_O: make NO_NEWT=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $ 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [GIT PULL 00/25] perf/core improvements and fixes
  2017-06-21 18:02 Arnaldo Carvalho de Melo
@ 2017-06-21 18:13 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2017-06-21 18:13 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, David Ahern, Jiri Olsa,
	Kan Liang, linuxppc-dev, Milian Wolff, Namhyung Kim,
	Naveen N . Rao, Paolo Bonzini, Peter Zijlstra, Ravi Bangoria,
	Robert Elliott, Stephane Eranian, Thomas Gleixner, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 007b811b4041989ec2dc91b9614aa2c41332723e:
> 
>   Merge tag 'perf-core-for-mingo-4.13-20170719' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-06-20 10:49:08 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.13-20170621
> 
> for you to fetch changes up to 701516ae3dec801084bc913d21e03fce15c61a0b:
> 
>   perf script: Fix message because field list option is -F not -f (2017-06-21 11:35:53 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements ad fixes:
> 
> New features:
> 
> - Add support to measure SMI cost in 'perf stat' (Kan Liang)
> 
> - Add support for unwinding callchains in powerpc with libdw (Paolo Bonzini)
> 
> Fixes:
> 
> - Fix message: cpu list option is -C not -c (Adrian Hunter)
> 
> - Fix 'perf script' message: field list option is -F not -f (Adrian Hunter)
> 
> - Intel PT fixes: (Adrian Hunter)
> 
>   o Fix missing stack clear
>   o Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
>   o Fix last_ip usage
>   o Ensure never to set 'last_ip' when packet 'count' is zero
>   o Clear FUP flag on error
>   o Fix transactions_sample_type
> 
> Infrastructure:
> 
> - Intel PT cleanups/refactorings (Adrian Hunter)
> 
>   o Use FUP always when scanning for an IP
>   o Add missing __fallthrough
>   o Remove redundant initial_skip checks
>   o Allow decoding with branch tracing disabled
>   o Add default config for pass-through branch enable
>   o Add documentation for new config terms
>   o Add decoder support for ptwrite and power event packets
>   o Add reserved byte to CBR packet payload
>   o Add decoder support for CBR events
> 
> - Move  find_process() to the only place that uses it, skimming some
>   more fat from util.[ch] (Arnaldo Carvalho de Melo)
> 
> - Do parameter validation earlier on fetch_kernel_version() (Arnaldo Carvalho de Melo)
> 
> - Remove unused _ALL_SOURCE define (Arnaldo Carvalho de Melo)
> 
> - Add sysfs__write_int function (Kan Liang)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (19):
>       perf intel-pt: Move decoder error setting into one condition
>       perf intel-pt: Improve sample timestamp
>       perf intel-pt: Fix missing stack clear
>       perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
>       perf intel-pt: Fix last_ip usage
>       perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero
>       perf intel-pt: Use FUP always when scanning for an IP
>       perf intel-pt: Clear FUP flag on error
>       perf intel-pt: Add missing __fallthrough
>       perf intel-pt: Allow decoding with branch tracing disabled
>       perf intel-pt: Add default config for pass-through branch enable
>       perf intel-pt: Add documentation for new config terms
>       perf intel-pt: Add decoder support for ptwrite and power event packets
>       perf intel-pt: Add reserved byte to CBR packet payload
>       perf intel-pt: Add decoder support for CBR events
>       perf intel-pt: Remove redundant initial_skip checks
>       perf intel-pt: Fix transactions_sample_type
>       perf tools: Fix message because cpu list option is -C not -c
>       perf script: Fix message because field list option is -F not -f
> 
> Arnaldo Carvalho de Melo (3):
>       perf evsel: Adopt find_process()
>       perf tools: Do parameter validation earlier on fetch_kernel_version()
>       perf tools: Remove unused _ALL_SOURCE define
> 
> Kan Liang (2):
>       tools lib api fs: Add sysfs__write_int function
>       perf stat: Add support to measure SMI cost
> 
> Paolo Bonzini (1):
>       perf unwind: Support for powerpc
> 
>  tools/lib/api/fs/fs.c                              |  30 +++
>  tools/lib/api/fs/fs.h                              |   4 +
>  tools/perf/Documentation/intel-pt.txt              |  36 +++
>  tools/perf/Documentation/perf-stat.txt             |  14 +
>  tools/perf/Makefile.config                         |   2 +-
>  tools/perf/arch/powerpc/util/Build                 |   2 +
>  tools/perf/arch/powerpc/util/unwind-libdw.c        |  73 ++++++
>  tools/perf/arch/x86/util/intel-pt.c                |   5 +
>  tools/perf/builtin-script.c                        |   2 +-
>  tools/perf/builtin-stat.c                          |  49 ++++
>  tools/perf/util/evsel.c                            |  39 +++
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 290 +++++++++++++++++++--
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |  13 +
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 110 +++++++-
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   7 +
>  tools/perf/util/intel-pt.c                         |  23 +-
>  tools/perf/util/session.c                          |   2 +-
>  tools/perf/util/stat-shadow.c                      |  33 +++
>  tools/perf/util/stat.c                             |   2 +
>  tools/perf/util/stat.h                             |   2 +
>  tools/perf/util/util.c                             |  52 +---
>  tools/perf/util/util.h                             |   3 -
>  22 files changed, 710 insertions(+), 83 deletions(-)
>  create mode 100644 tools/perf/arch/powerpc/util/unwind-libdw.c

Pulled, thanks a lot Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2017-06-21 18:13 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 15:38 [GIT PULL 00/25] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 01/25] perf tools: Separate the tests and tools in installation Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 02/25] perf tools: Fix function declarations needed by parse-events.y Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 03/25] perf tools: Fix parse_events_error dereferences Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 04/25] perf build: Fix libunwind feature detection on 32-bit x86 Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 05/25] perf session: Fix perf_session__peek_event() Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 06/25] perf hists: Reducing arguments of hist_entry_iter__add() Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 07/25] perf hists: Rename add_hist_entry to hists__findnew_entry Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 08/25] perf comm: Use atomic.h for refcounting Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 09/25] perf machine: Do not call map_groups__delete(), drop refcnt instead Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 10/25] perf tools: Fix dso__data_read_offset() file opening Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 11/25] perf tools: Get rid of dso__data_fd() from dso__data_size() Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 12/25] perf tools: Add dso__data_get/put_fd() Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 13/25] perf tools: Rename maps__next Arnaldo Carvalho de Melo
2015-05-27 15:38 ` [PATCH 14/25] perf tools: Remove redundant initialization of thread linkage members Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 15/25] perf tools: Nuke unused map_groups__flush() Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 16/25] perf tools: Import rb_erase_init from block/ in the kernel sources Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 17/25] perf machine: Mark removed threads as such Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 18/25] perf tools: Leave DSO destruction to the map destruction Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 19/25] perf tools: Use maps__first()/map__next() Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 20/25] perf tools: Assign default value for some pointers Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 21/25] perf tools: Improve setting of gcc debug option Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 22/25] perf sched: Add option to merge like comms to lat output Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 23/25] perf tools: Disallow PMU events intel_pt and intel_bts until there is support Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 24/25] perf probe: Show the error reason comes from invalid DSO Arnaldo Carvalho de Melo
2015-05-27 15:39 ` [PATCH 25/25] perf probe: Fix an error when deleting probes successfully Arnaldo Carvalho de Melo
2015-05-27 16:43 ` [GIT PULL 00/25] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2017-06-21 18:02 Arnaldo Carvalho de Melo
2017-06-21 18:13 ` Ingo Molnar
2015-05-05 21:31 Arnaldo Carvalho de Melo
2015-05-05 21:31 ` Arnaldo Carvalho de Melo
2015-05-06  2:47 ` Ingo Molnar
2015-05-06  2:47   ` Ingo Molnar
2015-03-24 16:19 Arnaldo Carvalho de Melo
2015-03-24 16:26 ` Ingo Molnar
2013-11-25 14:17 Arnaldo Carvalho de Melo
2013-01-31 17:25 Arnaldo Carvalho de Melo
2013-01-31 17:25 ` Arnaldo Carvalho de Melo
2013-02-01 10:18 ` Ingo Molnar
2013-02-01 10:18   ` Ingo Molnar
2012-10-08 22:32 Arnaldo Carvalho de Melo
2012-10-09 13:34 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.