linux/tools/perf/util
Linus Torvalds 6c8a53c9e6 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf changes from Ingo Molnar:
 "Core kernel changes:

   - One of the more interesting features in this cycle is the ability
     to attach eBPF programs (user-defined, sandboxed bytecode executed
     by the kernel) to kprobes.

     This allows user-defined instrumentation on a live kernel image
     that can never crash, hang or interfere with the kernel negatively.
     (Right now it's limited to root-only, but in the future we might
     allow unprivileged use as well.)

     (Alexei Starovoitov)

   - Another non-trivial feature is per event clockid support: this
     allows, amongst other things, the selection of different clock
     sources for event timestamps traced via perf.

     This feature is sought by people who'd like to merge perf generated
     events with external events that were measured with different
     clocks:

       - cluster wide profiling

       - for system wide tracing with user-space events,

       - JIT profiling events

     etc.  Matching perf tooling support is added as well, available via
     the -k, --clockid <clockid> parameter to perf record et al.

     (Peter Zijlstra)

  Hardware enablement kernel changes:

   - x86 Intel Processor Trace (PT) support: which is a hardware tracer
     on steroids, available on Broadwell CPUs.

     The hardware trace stream is directly output into the user-space
     ring-buffer, using the 'AUX' data format extension that was added
     to the perf core to support hardware constraints such as the
     necessity to have the tracing buffer physically contiguous.

     This patch-set was developed for two years and this is the result.
     A simple way to make use of this is to use BTS tracing, the PT
     driver emulates BTS output - available via the 'intel_bts' PMU.
     More explicit PT specific tooling support is in the works as well -
     will probably be ready by 4.2.

     (Alexander Shishkin, Peter Zijlstra)

   - x86 Intel Cache QoS Monitoring (CQM) support: this is a hardware
     feature of Intel Xeon CPUs that allows the measurement and
     allocation/partitioning of caches to individual workloads.

     These kernel changes expose the measurement side as a new PMU
     driver, which exposes various QoS related PMU events.  (The
     partitioning change is work in progress and is planned to be merged
     as a cgroup extension.)

     (Matt Fleming, Peter Zijlstra; CPU feature detection by Peter P
     Waskiewicz Jr)

   - x86 Intel Haswell LBR call stack support: this is a new Haswell
     feature that allows the hardware recording of call chains, plus
     tooling support.  To activate this feature you have to enable it
     via the new 'lbr' call-graph recording option:

        perf record --call-graph lbr
        perf report

     or:

        perf top --call-graph lbr

     This hardware feature is a lot faster than stack walk or dwarf
     based unwinding, but has some limitations:

       - It reuses the current LBR facility, so LBR call stack and
         branch record can not be enabled at the same time.

       - It is only available for user-space callchains.

     (Yan, Zheng)

   - x86 Intel Broadwell CPU support and various event constraints and
     event table fixes for earlier models.

     (Andi Kleen)

   - x86 Intel HT CPUs event scheduling workarounds.  This is a complex
     CPU bug affecting the SNB,IVB,HSW families that results in counter
     value corruption.  The mitigation code is automatically enabled and
     is transparent.

     (Maria Dimakopoulou, Stephane Eranian)

  The perf tooling side had a ton of changes in this cycle as well, so
  I'm only able to list the user visible changes here, in addition to
  the tooling changes outlined above:

  User visible changes affecting all tools:

      - Improve support of compressed kernel modules (Jiri Olsa)
      - Save DSO loading errno to better report errors (Arnaldo Carvalho de Melo)
      - Bash completion for subcommands (Yunlong Song)
      - Add 'I' event modifier for perf_event_attr.exclude_idle bit (Jiri Olsa)
      - Support missing -f to override perf.data file ownership. (Yunlong Song)
      - Show the first event with an invalid filter (David Ahern, Arnaldo Carvalho de Melo)

  User visible changes in individual tools:

    'perf data':

        New tool for converting perf.data to other formats, initially
        for the CTF (Common Trace Format) from LTTng (Jiri Olsa,
        Sebastian Siewior)

    'perf diff':

        Add --kallsyms option (David Ahern)

    'perf list':

        Allow listing events with 'tracepoint' prefix (Yunlong Song)

        Sort the output of the command (Yunlong Song)

    'perf kmem':

        Respect -i option (Jiri Olsa)

        Print big numbers using thousands' group (Namhyung Kim)

        Allow -v option (Namhyung Kim)

        Fix alignment of slab result table (Namhyung Kim)

    'perf probe':

        Support multiple probes on different binaries on the same command line (Masami Hiramatsu)

        Support unnamed union/structure members data collection. (Masami Hiramatsu)

        Check kprobes blacklist when adding new events. (Masami Hiramatsu)

    'perf record':

        Teach 'perf record' about perf_event_attr.clockid (Peter Zijlstra)

        Support recording running/enabled time (Andi Kleen)

    'perf sched':

        Improve the performance of 'perf sched replay' on high CPU core count machines (Yunlong Song)

    'perf report' and 'perf top':

        Allow annotating entries in callchains in the hists browser (Arnaldo Carvalho de Melo)

        Indicate which callchain entries are annotated in the
        TUI hists browser (Arnaldo Carvalho de Melo)

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

        Consider PERF_RECORD_ events with cpumode == 0 in 'perf top', removing one
        cause of long term memory usage buildup, i.e. not processing PERF_RECORD_EXIT
        events (Arnaldo Carvalho de Melo)

    'perf stat':

        Report unsupported events properly (Suzuki K. Poulose)

        Output running time and run/enabled ratio in CSV mode (Andi Kleen)

    'perf trace':

        Handle legacy syscalls tracepoints (David Ahern, Arnaldo Carvalho de Melo)

        Only insert blank duration bracket when tracing syscalls (Arnaldo Carvalho de Melo)

        Filter out the trace pid when no threads are specified (Arnaldo Carvalho de Melo)

        Dump stack on segfaults (Arnaldo Carvalho de Melo)

        No need to explicitely enable evsels for workload started from perf, let it
        be enabled via perf_event_attr.enable_on_exec, removing some events that take
        place in the 'perf trace' before a workload is really started by it.
        (Arnaldo Carvalho de Melo)

        Allow mixing with tracepoints and suppressing plain syscalls. (Arnaldo Carvalho de Melo)

  There's also been a ton of infrastructure work done, such as the
  split-out of perf's build system into tools/build/ and other changes -
  see the shortlog and changelog for details"

* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (358 commits)
  perf/x86/intel/pt: Clean up the control flow in pt_pmu_hw_init()
  perf evlist: Fix type for references to data_head/tail
  perf probe: Check the orphaned -x option
  perf probe: Support multiple probes on different binaries
  perf buildid-list: Fix segfault when show DSOs with hits
  perf tools: Fix cross-endian analysis
  perf tools: Fix error path to do closedir() when synthesizing threads
  perf tools: Fix synthesizing fork_event.ppid for non-main thread
  perf tools: Add 'I' event modifier for exclude_idle bit
  perf report: Don't call map__kmap if map is NULL.
  perf tests: Fix attr tests
  perf probe: Fix ARM 32 building error
  perf tools: Merge all perf_event_attr print functions
  perf record: Add clockid parameter
  perf sched replay: Use replay_repeat to calculate the runavg of cpu usage instead of the default value 10
  perf sched replay: Support using -f to override perf.data file ownership
  perf sched replay: Fix the EMFILE error caused by the limitation of the maximum open files
  perf sched replay: Handle the dead halt of sem_wait when create_tasks() fails for any task
  perf sched replay: Fix the segmentation fault problem caused by pr_err in threads
  perf sched replay: Realloc the memory of pid_to_task stepwise to adapt to the different pid_max configurations
  ...
2015-04-14 14:37:47 -07:00
..
include perf/bench: Fix mem* routines usage after alternatives change 2015-03-03 18:01:10 +01:00
scripting-engines perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
abspath.c
alias.c
annotate.c Merge branch 'perf/urgent' into perf/core, to pick up fixes and to refresh the tree 2015-03-27 09:46:03 +01:00
annotate.h perf tools: Fix segfault for symbol annotation on TUI 2015-01-16 17:49:29 -03:00
bitmap.c
Build perf tools: Add lzma decompression support for kernel module 2015-03-21 14:53:40 -03:00
build-id.c perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
build-id.h perf buildid-cache: Add --purge FILE to remove all caches of FILE 2015-02-27 15:52:33 -03:00
cache.h perf tools: Make perf aware of tracefs 2015-02-11 12:37:08 -03:00
callchain.c perf tools: Enable LBR call stack support 2015-02-18 17:16:17 +01:00
callchain.h perf tools: Enable LBR call stack support 2015-02-18 17:16:17 +01:00
cgroup.c
cgroup.h
cloexec.c perf tools: Work around lack of sched_getcpu in glibc < 2.6. 2015-03-24 12:08:07 -03:00
cloexec.h perf tools: Work around lack of sched_getcpu in glibc < 2.6. 2015-03-24 12:08:07 -03:00
color.c perf tools: Remove some unused functions from color.c 2015-01-21 13:24:32 -03:00
color.h perf tools: Remove some unused functions from color.c 2015-01-21 13:24:32 -03:00
comm.c
comm.h perf tools: Add facility to export data in database-friendly way 2014-10-29 10:32:49 -02:00
config.c perf tools: Add --buildid-dir option to set cache directory 2014-12-09 09:14:35 -03:00
cpumap.c
cpumap.h
ctype.c
data-convert-bt.c perf data: Support using -f to override perf.data file ownership for 'convert' 2015-04-02 13:18:52 -03:00
data-convert-bt.h perf data: Support using -f to override perf.data file ownership for 'convert' 2015-04-02 13:18:52 -03:00
data.c
data.h
db-export.c perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
db-export.h perf db-export: No need to have ->thread twice in struct export_sample 2015-04-02 13:18:43 -03:00
debug.c perf data: Add perf data to CTF conversion support 2015-02-25 16:13:12 -03:00
debug.h perf data: Add perf data to CTF conversion support 2015-02-25 16:13:12 -03:00
dso.c perf symbols: Save DSO loading errno to better report errors 2015-03-24 12:08:43 -03:00
dso.h perf symbols: Save DSO loading errno to better report errors 2015-03-24 12:08:43 -03:00
dwarf-aux.c perf probe: Fix to track down unnamed union/structure members 2015-04-02 13:18:44 -03:00
dwarf-aux.h perf probe: Fix to handle optimized not-inlined functions 2015-02-06 11:46:36 +01:00
environment.c
event.c perf tools: Fix error path to do closedir() when synthesizing threads 2015-04-10 10:13:58 -03:00
event.h perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
evlist.c perf evlist: Fix type for references to data_head/tail 2015-04-10 11:29:20 -03:00
evlist.h perf evlist: Fix type for references to data_head/tail 2015-04-10 11:29:20 -03:00
evsel.c perf tools: Merge all perf_event_attr print functions 2015-04-08 10:06:28 -03:00
evsel.h perf tools: Merge all perf_event_attr print functions 2015-04-08 10:06:28 -03:00
exec_cmd.c
exec_cmd.h
find-vdso-map.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
generate-cmdlist.sh
header.c perf tools: Fix cross-endian analysis 2015-04-10 10:13:58 -03:00
header.h perf build-id: Move build-id related functions to util/build-id.c 2014-11-05 10:14:07 -03:00
help.c
help.h
hist.c perf hists: Remove hist_entry->used, not used anymore 2015-03-17 17:18:58 -03:00
hist.h perf hists browser: Allow annotating entries in callchains 2015-03-17 18:27:28 -03:00
intlist.c
intlist.h
kvm-stat.h perf kvm: Support using -f to override perf.data.guest file ownership 2015-04-02 13:18:47 -03:00
levenshtein.c
levenshtein.h
lzma.c perf tools: Add lzma decompression support for kernel module 2015-03-21 14:53:40 -03:00
machine.c perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
machine.h perf buildid-list: Fix segfault when show DSOs with hits 2015-04-10 10:13:59 -03:00
map.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
map.h perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
ordered-events.c perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
ordered-events.h perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
pager.c
parse-events.c perf tools: Add 'I' event modifier for exclude_idle bit 2015-04-08 11:00:16 -03:00
parse-events.h perf list: Clean up the printing functions of hardware/software events 2015-02-27 15:52:18 -03:00
parse-events.l perf tools: Add 'I' event modifier for exclude_idle bit 2015-04-08 11:00:16 -03:00
parse-events.y perf tools: allow user to specify hardware breakpoint bp_len 2014-12-03 15:14:29 +01:00
parse-options.c perf report: Don't allow empty argument for '-t'. 2015-03-19 13:53:28 -03:00
parse-options.h perf report: Don't allow empty argument for '-t'. 2015-03-19 13:53:28 -03:00
path.c
perf_regs.c
perf_regs.h
PERF-VERSION-GEN
pmu.c perf tools: Extend format_alias() to include event parameters 2015-01-21 13:24:33 -03:00
pmu.h perf tools: Add snapshot format file parsing 2014-11-24 18:03:51 -03:00
pmu.l
pmu.y
probe-event.c perf probe: Support multiple probes on different binaries 2015-04-10 10:19:53 -03:00
probe-event.h perf probe: Support multiple probes on different binaries 2015-04-10 10:19:53 -03:00
probe-finder.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-14 14:37:47 -07:00
probe-finder.h
pstack.c
pstack.h
python-ext-sources perf tools: Remove api fs object from python build 2015-02-12 11:22:01 -03:00
python.c perf tools: Remove EOL whitespaces 2015-01-21 13:24:31 -03:00
quote.c
quote.h
rblist.c
rblist.h
record.c perf tools: Use sysctl__read_int instead of ad-hoc copies 2014-12-11 17:53:04 -03:00
run-command.c
run-command.h
session.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
session.h perf ordered_samples: Remove references to perf_{evlist,tool} and machines 2015-03-31 17:52:32 -03:00
setup.py tools lib api: Rename libapikfs.a to libapi.a 2015-02-12 17:55:18 -03:00
sigchain.c
sigchain.h
sort.c perf diff: Support for different binaries 2015-02-27 10:08:38 -03:00
sort.h perf tools: Remove (null) value of "Sort order" for perf mem report 2015-03-24 12:06:55 -03:00
srcline.c perf: Fix building warning on ARM 32 2014-12-19 13:09:43 +01:00
stat.c
stat.h
strbuf.c
strbuf.h
strfilter.c
strfilter.h
string.c Revert "perf tools: Default to cpu// for events v5" 2014-10-15 16:04:33 -03:00
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol-elf.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
symbol-minimal.c perf symbols: Save DSO loading errno to better report errors 2015-03-24 12:08:43 -03:00
symbol.c perf kmaps: Check kmaps to make code more robust 2015-04-08 09:07:03 -03:00
symbol.h perf tools: Add pid/tid filtering to report and script commands 2015-03-24 13:02:46 -03:00
target.c perf target: Simplify handling of strerror_r return 2015-03-24 12:08:30 -03:00
target.h
thread_map.c perf thread_map: Create dummy constructor out of open coded equivalent 2014-10-14 17:32:52 -03:00
thread_map.h perf thread_map: Create dummy constructor out of open coded equivalent 2014-10-14 17:32:52 -03:00
thread-stack.c perf tools: Enhance the thread stack to output call/return data 2014-11-03 17:43:56 -03:00
thread-stack.h perf tools: Enhance the thread stack to output call/return data 2014-11-03 17:43:56 -03:00
thread.c perf tools: Remove superfluous thread->comm_set setting 2015-03-12 12:39:50 -03:00
thread.h perf tools: Add pid/tid filtering to report and script commands 2015-03-24 13:02:46 -03:00
tool.h perf tools: tool->finished_round() doesn't need perf_session 2015-03-12 12:39:49 -03:00
top.c
top.h
trace-event-info.c
trace-event-parse.c perf tools: Introduce event_format__fprintf method 2015-02-06 11:46:37 +01:00
trace-event-read.c
trace-event-scripting.c perf scripting: No need to pass thread twice to the scripting callbacks 2015-04-02 13:18:41 -03:00
trace-event.c
trace-event.h perf scripting: No need to pass thread twice to the scripting callbacks 2015-04-02 13:18:41 -03:00
tsc.c
tsc.h
unwind-libdw.c perf callchains: Use thread->mg->machine 2014-10-29 10:32:46 -02:00
unwind-libdw.h
unwind-libunwind.c perf callchain: Separate eh/debug frame offset cache. 2015-03-19 13:53:27 -03:00
unwind.h perf callchains: Use thread->mg->machine 2014-10-29 10:32:46 -02:00
usage.c
util.c perf tools: Introduce dump_stack signal helper 2015-02-24 15:34:23 -03:00
util.h perf tools: Add lzma decompression support for kernel module 2015-03-21 14:53:40 -03:00
values.c
values.h
vdso.c perf tools: Do not attempt to run perf-read-vdso32 if it wasn't built 2014-10-29 10:32:48 -02:00
vdso.h perf tools: Add support for 32-bit compatibility VDSOs 2014-10-29 10:32:48 -02:00
wrapper.c
xyarray.c
xyarray.h
zlib.c perf tools: Add gzip decompression support for kernel module 2014-11-05 10:11:26 -03:00