[GIT PULL] perf updates for v4.6

From: Ingo Molnar
Date: Mon Mar 14 2016 - 07:55:08 EST


Linus,

Please pull the latest perf-core-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-core-for-linus

# HEAD: ced30bc9129777d715057d06fc8dbdfd3b81e94d Merge tag 'perf-core-for-mingo-20160310' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Main kernel side changes:

- Big reorganization of the x86 perf support code. The old code grew organically
deep inside arch/x86/kernel/cpu/perf* and its naming became somewhat messy.
The new location is under arch/x86/events/, using the following cleaner
hierarchy of source code files:

perf/x86: Move perf_event.c .................. => x86/events/core.c
perf/x86: Move perf_event_amd.c .............. => x86/events/amd/core.c
perf/x86: Move perf_event_amd_ibs.c .......... => x86/events/amd/ibs.c
perf/x86: Move perf_event_amd_iommu.[ch] ..... => x86/events/amd/iommu.[ch]
perf/x86: Move perf_event_amd_uncore.c ....... => x86/events/amd/uncore.c
perf/x86: Move perf_event_intel_bts.c ........ => x86/events/intel/bts.c
perf/x86: Move perf_event_intel.c ............ => x86/events/intel/core.c
perf/x86: Move perf_event_intel_cqm.c ........ => x86/events/intel/cqm.c
perf/x86: Move perf_event_intel_cstate.c ..... => x86/events/intel/cstate.c
perf/x86: Move perf_event_intel_ds.c ......... => x86/events/intel/ds.c
perf/x86: Move perf_event_intel_lbr.c ........ => x86/events/intel/lbr.c
perf/x86: Move perf_event_intel_pt.[ch] ...... => x86/events/intel/pt.[ch]
perf/x86: Move perf_event_intel_rapl.c ....... => x86/events/intel/rapl.c
perf/x86: Move perf_event_intel_uncore.[ch] .. => x86/events/intel/uncore.[ch]
perf/x86: Move perf_event_intel_uncore_nhmex.c => x86/events/intel/uncore_nmhex.c
perf/x86: Move perf_event_intel_uncore_snb.c => x86/events/intel/uncore_snb.c
perf/x86: Move perf_event_intel_uncore_snbep.c => x86/events/intel/uncore_snbep.c
perf/x86: Move perf_event_knc.c .............. => x86/events/intel/knc.c
perf/x86: Move perf_event_p4.c ............... => x86/events/intel/p4.c
perf/x86: Move perf_event_p6.c ............... => x86/events/intel/p6.c
perf/x86: Move perf_event_msr.c .............. => x86/events/msr.c

(Borislav Petkov)

- Update various x86 PMU constraint and hw support details (Stephane Eranian)

- Optimize kprobes for BPF execution (Martin KaFai Lau)

- Rewrite, refactor and fix the Intel uncore PMU driver code (Thomas Gleixner)

- Rewrite, refactor and fix the Intel RAPL PMU code (Thomas Gleixner)

- Various fixes and smaller cleanups.

There are lots of perf tooling updates as well. A few highlights:

perf report/top:

- Hierarchy histogram mode for 'perf top' and 'perf report', showing multiple
levels, one per --sort entry: (Namhyung Kim)

On a mostly idle system:

# perf top --hierarchy -s comm,dso

Then expand some levels and use 'P' to take a snapshot:

# cat perf.hist.0
- 92.32% perf
58.20% perf
22.29% libc-2.22.so
5.97% [kernel]
4.18% libelf-0.165.so
1.69% [unknown]
- 4.71% qemu-system-x86
3.10% [kernel]
1.60% qemu-system-x86_64 (deleted)
+ 2.97% swapper
#

- Add 'L' hotkey to dynamicly set the percent threshold for histogram
entries and callchains, i.e. dynamicly do what the --percent-limit
command line option to 'top' and 'report' does. (Namhyung Kim)

perf mem:

- Allow specifying events via -e in 'perf mem record', also listing what events
can be specified via 'perf mem record -e list' (Jiri Olsa)

perf record:

- Add 'perf record' --all-user/--all-kernel options, so that one can tell
that all the events in the command line should be restricted to the user
or kernel levels (Jiri Olsa), i.e.:

perf record -e cycles:u,instructions:u

is equivalent to:

perf record --all-user -e cycles,instructions

- Make 'perf record' collect CPU cache info in the perf.data file header:

$ perf record usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.017 MB perf.data (7 samples) ]
$ perf report --header-only -I | tail -10 | head -8
# CPU cache info:
# L1 Data 32K [0-1]
# L1 Instruction 32K [0-1]
# L1 Data 32K [2-3]
# L1 Instruction 32K [2-3]
# L2 Unified 256K [0-1]
# L2 Unified 256K [2-3]
# L3 Unified 4096K [0-3]
$

Will be used in 'perf c2c' and eventually in 'perf diff' to allow, for instance
running the same workload in multiple machines and then when using 'diff' show
the hardware difference. (Jiri Olsa)

- Improved support for Java, using the JVMTI agent library to do jitdumps
that then will be inserted in synthesized PERF_RECORD_MMAP2 events via
'perf inject' pointed to synthesized ELF files stored in ~/.debug and
keyed with build-ids, to allow symbol resolution and even annotation with
source line info, see the changeset comments to see how to use it (Stephane Eranian)

perf script/trace:

- Decode data_src values (e.g. perf.data files generated by 'perf mem record')
in 'perf script': (Jiri Olsa)

# perf script
perf 693 [1] 4.088652: 1 cpu/mem-loads,ldlat=30/P: ffff88007d0b0f40 68100142 L1 hit|SNP None|TLB L1 or L2 hit|LCK No <SNIP>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Improve support to 'data_src', 'weight' and 'addr' fields in
'perf script' (Jiri Olsa)

- Handle empty print fmts in 'perf script -s' i.e. when running
python or perl scripts (Taeung Song)

perf stat:

- 'perf stat' now shows shadow metrics (insn per cycle, etc) in
interval mode too. E.g:

# perf stat -I 1000 -e instructions,cycles sleep 1
# time counts unit events
1.000215928 519,620 instructions # 0.69 insn per cycle
1.000215928 752,003 cycles
<SNIP>

- Port 'perf kvm stat' to PowerPC (Hemant Kumar)

- Implement CSV metrics output in 'perf stat' (Andi Kleen)

perf BPF support:

- Support converting data from bpf events in 'perf data' (Wang Nan)

- Print bpf-output events in 'perf script': (Wang Nan).

# perf record -e bpf-output/no-inherit,name=evt/ -e ./test_bpf_output_3.c/map:channel.event=evt/ usleep 1000
# perf script
usleep 4882 21384.532523: evt: ffffffff810e97d1 sys_nanosleep ([kernel.kallsyms])
BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a
0008: 42 50 46 20 65 76 65 6e BPF even
0010: 74 21 00 00 t!..
BPF string: "Raise a BPF event!"
#

- Add API to set values of map entries in a BPF object, be it
individual map slots or ranges (Wang Nan)

- Introduce support for the 'bpf-output' event (Wang Nan)

- Add glue to read perf events in a BPF program (Wang Nan)

- Improve support for bpf-output events in 'perf trace' (Wang Nan)

... and tons of other changes as well - see the shortlog and git log for details!

Thanks,

Ingo

------------------>
Adrian Hunter (5):
perf inject: Hit all DSOs for AUX data in JIT and other cases
perf session: Simplify tool stubs
perf jit: Let jit_process() return errors
perf jit: Move clockid validation
perf tools: Use 64-bit shifts with (TSC) time conversion

Alexander Shishkin (1):
perf/core: Fix perf_sched_count derailment

Andi Kleen (13):
perf stat: Abstract stat metrics printing
perf stat: Add support for metrics in interval mode
perf stat: Move noise/running printing into printout
perf stat: Handled scaled == -1 case for counters
perf tools: Dont stop PMU parsing on alias parse error
perf stat: Check existence of frontend/backed stalled cycles
perf stat: Implement CSV metrics output
perf stat: Support metrics in --per-core/socket mode
perf stat: Check for frontend stalled for metrics
perf/x86/intel: Fix PEBS data source interpretation on Nehalem/Westmere
perf stat: Document CSV format in manpage
perf stat: Implement --metric-only mode
perf stat: Add --metric-only support for -A

Arnaldo Carvalho de Melo (30):
perf machine: Introduce machine__find_kernel_symbol_by_name()
perf test: Fixup aliases checking in the 'vmlinux matches kallsyms' test
perf cpumap: Auto initialize cpu__max_{node,cpu}
perf tools: Speed up build-tests by reducing the number of builds tested
perf build: Align the names of the build tests:
perf top: Move UI initialization ahead of sort setup
perf build tests: Elide "-f Makefile" from make invokation
perf build tests: Move the feature related vars to the front of the make cmdline
perf build tests: Do parallell builds with 'build-test'
perf inject: Make sure mmap records are ordered when injecting build_ids
perf tools: Add comment explaining the repsep_snprintf function
perf hists: Do column alignment on the format iterator
perf tools: Introduce parse_events_terms__purge()
perf tools: Use perf_event_terms__purge() for non-malloced terms
perf tools: Rename parse_events__free_terms() to parse_events_terms__delete()
perf tests: Fix build on older systems where 'signal' is reserved
perf debug: Rename __eprintf(va_list args) to veprintf
perf evlist: Reference count the cpu and thread maps at set_maps()
perf evlist: Handle -EINVAL for sample_freq > max_sample_rate in strerror_open()
perf tests: Use perf_evlist__strerror_open() to provide hints about max_freq
perf test: Reduce the sample_freq for the 'object code reading' test
perf tools: Introduce opt_event_config nonterminal
perf tools: Fix build on older systems
perf tools: Remove duplicate typedef config_term_func_t definition
perf help: No need to use strbuf_remove()
perf tools: Remove strbuf_{remove,splice}()
perf tools: Use asprintf() for simple string formatting/allocation
perf tools: Fix parsing of pmu events with empty list of modifiers
perf test: Fix hists related entries
perf jitdump: DWARF is also needed

Ben Hutchings (1):
perf tools: Document the perf sysctls

Borislav Petkov (24):
perf/x86: Move perf_event.c ............... => x86/events/core.c
perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c
perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c
perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]
perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c
perf/x86: Move perf_event_intel_bts.c ........ => x86/events/intel/bts.c
perf/x86: Move perf_event_intel.c ............ => x86/events/intel/core.c
perf/x86: Move perf_event_intel_cqm.c ........ => x86/events/intel/cqm.c
perf/x86: Move perf_event_intel_cstate.c ..... => x86/events/intel/cstate.c
perf/x86: Move perf_event_intel_ds.c ......... => x86/events/intel/ds.c
perf/x86: Move perf_event_intel_lbr.c ........ => x86/events/intel/lbr.c
perf/x86: Move perf_event_intel_pt.[ch] ...... => x86/events/intel/pt.[ch]
perf/x86: Move perf_event_intel_rapl.c ....... => x86/events/intel/rapl.c
perf/x86: Move perf_event_intel_uncore.[ch] .. => x86/events/intel/uncore.[ch]
perf/x86: Move perf_event_intel_uncore_nhmex.c => x86/events/intel/uncore_nmhex.c
perf/x86: Move perf_event_intel_uncore_snb.c => x86/events/intel/uncore_snb.c
perf/x86: Move perf_event_intel_uncore_snbep.c => x86/events/intel/uncore_snbep.c
perf/x86: Move perf_event_knc.c .............. => x86/events/intel/knc.c
perf/x86: Move perf_event_p4.c ............... => x86/events/intel/p4.c
perf/x86: Move perf_event_p6.c ............... => x86/events/intel/p6.c
perf/x86: Move perf_event_msr.c .............. => x86/events/msr.c
perf/x86: Move perf_event.h to its new home
perf stat: Document --detailed option
perf/x86/intel/rapl: Simplify quirk handling even more

Chaos.Chen (1):
tools lib traceevent: Fix time stamp rounding issue

Chen Yucong (1):
x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...)

Chris Phlipot (1):
perf tools: Fix perf script python database export crash

Colin Ian King (4):
perf script: Fix double free on command_line
perf tests: Initialize sa.sa_flags
tools/power turbostat: fix various build warnings
perf tools: Explicitly declare inc_group_count as a void function

Daniel Bristot de Oliveira (1):
tools lib traceevent: Implement '%' operation

Hemant Kumar (4):
perf kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
perf kvm/{x86,s390}: Remove const from kvm_events_tp
perf kvm/powerpc: Port perf kvm stat to powerpc
perf kvm/powerpc: Add support for HCALL reasons

Huaitong Han (1):
x86/cpufeature: Use enum cpuid_leafs instead of magic numbers

Ingo Molnar (2):
perf/x86/uncore: Fix build on UP-IOAPIC configs
perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes

Jiri Olsa (59):
perf symbols: Do not read symbols/data from device files
perf stat: Making several helper functions static
perf build: Fix feature-dump checks, we need to test all features
perf hists: Factor output_resort from hists__output_resort
perf hists: Introduce perf_evsel__output_resort function
perf hists: Add _idx fields into struct perf_hpp_fmt
perf hists: Use struct perf_hpp_fmt::idx in perf_hpp__reset_width
perf hists: Add 'equal' method to perf_hpp_fmt struct
perf hists: Add 'hpp__equal' callback function
perf hists: Make hpp setup function generic
perf report: Move UI initialization ahead of sort setup
perf hists: Allocate output sort field
perf hists: Remove perf_hpp__column_(disable|enable)
perf hists: Properly release format fields
perf hists: Separate sort fields parsing into setup_sort_list function
perf hists: Separate output fields parsing into setup_output_list function
perf hists: Introduce struct perf_hpp_list
perf hists: Introduce perf_hpp_list__init function
perf hists: Add perf_hpp_list register helpers
perf hists: Pass perf_hpp_list all the way through setup_output_list
perf hists: Introduce perf_hpp_list__for_each_format macro
perf hists: Introduce perf_hpp_list__for_each_format_safe macro
perf hists: Introduce perf_hpp_list__for_each_sort_list macro
perf hists: Introduce perf_hpp_list__for_each_sort_list_safe macro
perf hists: Add struct perf_hpp_list argument to helper functions
perf tools: Add hpp_list into struct hists object
perf hists: Introduce hists__for_each_format macro
perf hists: Introduce hists__for_each_sort_list macro
perf tools: Fix parallel build including 'clean' target
tools lib api: Add debug output support
tools lib api fs: Adopt filename__read_str from perf
tools lib api fs: Add sysfs__read_str function
perf tools: Initialize libapi debug output
perf tools: Add perf data cache feature
perf record: Add --all-user/--all-kernel options
perf tools: Make cl_address global
perf tools: Introduce cl_offset function
perf tools: Add monitored events array
perf mem: Add -e record option
perf tools: Use ARRAY_SIZE in mem sort display functions
perf script: Add data_src and weight column definitions
perf script: Display addr/data_src/weight columns for raw events
perf mem record: Check for memory events support
perf mem: Introduce perf_mem_events__name function
perf tools: Introduce perf_mem__tlb_scnprintf function
perf tools: Introduce perf_mem__lvl_scnprintf function
perf tools: Introduce perf_mem__snp_scnprintf function
perf tools: Introduce perf_mem__lck_scnprintf function
perf tools: Change perf_mem__tlb_scnprintf to return nb of displayed bytes
perf tools: Change perf_mem__lvl_scnprintf to return nb of displayed bytes
perf tools: Change perf_mem__snp_scnprintf to return nb of displayed bytes
perf tools: Change perf_mem__lck_scnprintf to return nb of displayed bytes
perf script: Display data_src values
perf tools: Fix python extension build
perf tools: Fix locale handling in pmu parsing
perf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Core2
perf tools: Pass perf_hpp_list all the way through setup_sort_list
perf tools: Omit unnecessary cast in perf_pmu__parse_scale
perf jitdump: Build only on supported archs

Kan Liang (2):
perf/x86/intel/uncore: Remove SBOX support for BDX-DE
perf/x86/intel: Fix PEBS warning by only restoring active PMU in pmi

Kostenzer Felix (1):
x86/nmi: Mark 'ignore_nmis' as __read_mostly

Marcin Ålusarz (1):
perf tools: handle spaces in file names obtained from /proc/pid/maps

Markus Trippelsdorf (1):
perf pmu: Fix misleadingly indented assignment (whitespace)

Martin KaFai Lau (1):
kprobes: Optimize hot path by using percpu counter to collect 'nhit' statistics

Masahiro Yamada (1):
tools build: Use .s extension for preprocessed assembler code

Mathieu Poirier (1):
perf auxtrace: Add perf_evlist pointer to *info_priv_size()

Namhyung Kim (81):
perf hists: Remove parent filter check in DSO filter function
perf hists: Cleanup filtering functions
perf sort: Provide a way to find out if per-thread bucketing is in place
perf hists browser: Only 'Zoom into thread' only when sort order has 'pid'
perf hists browser: Only offer symbol scripting when a symbol is under the cursor
perf hists browser: Offer 'Zoom into DSO'/'Map details' only when sort order has 'dso'
perf hists browser: Be a bit more strict about presenting CPU socket zoom
perf hists browser: Offer non-symbol specific menu options for --sort without 'sym'
perf hists browser: Skip scripting when perf.data file not available
perf hists: Fix min callchain hits calculation
perf hists: Update hists' total period when adding entries
perf report: Apply --percent-limit to callchains also
perf report: Get rid of hist_entry__callchain_fprintf()
perf callchain: Pass parent_samples to __callchain__fprintf_graph()
perf report: Fix percent display in callchains on --stdio
perf hists browser: Fix dump to show correct callchain style
perf hists browser: Pass parent_total to callchain print functions
perf hists browser: Fix percent display in callchains
perf report: Don't show blank lines if entry has no callchain
perf report: Update documentation of --sort option
perf report: Update documention of --percent-limit option
perf hists browser: Add 'L' hotkey to change percent limit
perf hists browser: Fix percentage update on key press
perf callchain: Check return value of add_child()
perf callchain: Check return value of fill_node()
perf callchain: Add enum match_result for match_chain()
perf callchain: Check return value of split_add_child()
perf callchain: Check return value of append_chain_children()
perf hists: Return error from hists__collapse_resort()
perf report: Check error during report__collapse_hists()
perf tools: Fix segfault on dynamic entries
perf tools: Update srcline/file if needed
perf tools: Fix alignment on some sort keys
perf tools: Fix column width setting on 'trace' sort key
perf tools: Fix assertion failure on dynamic entry
perf tools: Add helper functions for some sort keys
perf hists: Basic support of hierarchical report view
perf hists: Resort hist entries with hierarchy
perf hists: Add helper functions for hierarchy mode
perf hists: Introduce hist_entry__filter()
perf hists: Support filtering in hierarchy mode
perf hists: Resort after filtering hierarchy
perf hists: Count number of sort keys
perf ui/stdio: Implement hierarchy output mode
perf ui/stdio: Align column header for hierarchy output
perf hists browser: Count number of hierarchy entries
perf hists browser: Support collapsing/expanding whole entries in hierarchy
perf hists browser: Implement hierarchy output
perf hists browser: Align column header in hierarchy mode
perf ui/gtk: Implement hierarchy output mode
perf report: Add --hierarchy option
perf hists: Support decaying in hierarchy mode
perf top: Add --hierarchy option
perf hists: Add more helper functions for the hierarchy mode
perf report: Show message for percent limit on stdio
perf hists browser: Cleanup hist_browser__update_percent_limit()
perf hists browser: Show message for percent limit
perf report: Show message for percent limit on gtk
perf hists: Fix comparing of dynamic entries
perf report: Fix indentation of dynamic entries in hierarchy
perf report: Left align dynamic entries in hierarchy
perf hists: Fix dynamic entry display in hierarchy
perf report: Update column width of dynamic entries
perf hists: Add level field to struct perf_hpp_fmt
perf hists: Introduce perf_hpp__setup_hists_formats()
perf hists: Use own hpp_list for hierarchy mode
perf hists: Support multiple sort keys in a hierarchy level
perf hists: Fix indent for multiple hierarchy sort key
perf report: Use hierarchy hpp list on stdio
perf hists browser: Use hierarchy hpp list
perf report: Use hierarchy hpp list on gtk
perf tools: Fix hist_entry__filter() for hierarchy
perf tools: Add more sort entry check functions
perf tools: Fix command line filters in hierarchy mode
perf tools: Remove hist_entry->fmt field
perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry()
perf tools: Remove nr_sort_keys field
perf tools: Recalc total periods using top-level entries in hierarchy
perf tools: Add sort__has_comm variable
perf hists browser: Allow thread filtering for comm sort key
perf hists browser: Check sort keys before hot key actions

Peter Zijlstra (1):
perf: Add a reviewer

Stephane Eranian (10):
perf symbols: add Java demangling support
perf build: Add libcrypto feature detection
perf inject: Add jitdump mmap injection support
perf tools: add JVMTI agent library
perf jit: add source line info support
perf jvmti: Add check for java alternatives cmd in Makefile
perf jvmti: improve error message in Makefile
perf/x86/intel: Add definition for PT PMI bit
perf/x86/pebs: Add workaround for broken OVFL status on HSW+
perf/x86/pebs: Add proper PEBS constraints for Broadwell

Steven Rostedt (2):
tools lib traceevent: Split pevent_print_event() into specific functionality functions
tools lib traceevent: Add '~' operation within arg_num_eval()

Steven Rostedt (Red Hat) (2):
tools lib traceevent: Set int_array fields to NULL if freeing from error
tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

Taeung Song (20):
perf annotate: Rename 'colors.code' to 'colors.jump_arrows'
perf config: Document variables for 'colors' section in man page
perf config: Document variables for 'tui' and 'gtk' sections in man page
perf config: Document 'buildid.dir' variable in man page
perf config: Document variables for 'annotate' section in man page
perf config: Document 'hist.percentage' variable in man page
perf config: Document 'ui.show-headers' variable in man page
perf config: Document variables for 'call-graph' section in man page
perf config: Document variables for 'report' section in man page
perf config: Document 'top.children' variable in man page
perf config: Document 'man.viewer' variable in man page
perf config: Document 'pager.<subcommand>' variables in man page
perf config: Document 'kmem.default' variable in man page
perf config: Document 'record.build-id' variable in man page
perf config: Add '--system' and '--user' options to select which config file is used
perf python scripting: Append examples to err msg about audit-libs-python
perf script: Exception handling when the print fmt is empty
perf script: Remove duplicated code and needless script_spec__findnew()
perf trace: Check and discard not only 'nr' but also '__syscall_nr'
tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:

Thomas Gleixner (26):
perf/core: Remove unused arguments from a bunch of functions
perf/x86/intel/uncore: Remove pointless mask check
perf/x86/intel/uncore: Simplify error rollback
perf/x86/intel/uncore: Fix error handling
perf/x86/intel/uncore: Add sanity checks for PCI dev package id
perf/x86/intel/uncore: Clean up hardware on exit
perf/x86/intel/uncore: Make code more readable
perf/x86/uncore: Make uncore_pcibus_to_physid() static
perf: Allow storage of PMU private data in event
perf/x86/intel/uncore: Store box in event->pmu_private
x86/topology: Create logical package id
perf/x86/uncore: Track packages, not per CPU data
perf/x86/intel/uncore: Clear all hardware state on exit
perf/x86/intel/uncore: Make PCI and MSR uncore independent
cpumask: Export cpumask_any_but()
perf/x86/intel/cqm: Get rid of the silly for_each_cpu() lookups
perf/x86/intel/rapl: Make Knights Landings support functional
perf/x86/intel/rapl: Add proper error handling
perf/x86/intel/rapl: Sanitize the quirk handling
perf/x86/intel/rapl: Calculate timing once
perf/x86/intel/rapl: Clean up the printk output
perf/x86/intel/rapl: Refactor the code some more
perf/x86/intel/rapl: Make PMU lock raw
perf/x86/intel/rapl: Utilize event->pmu_private
perf/x86/intel/rapl: Convert it to a per package facility
perf: Export perf_event_sysfs_show()

Wang Nan (43):
perf test: Add libbpf relocation checker
perf bpf: Check relocation target section
tools build: Allow subprojects select all feature checkers
perf build: Select all feature checkers for feature-dump
tools build: Check basic headers for test-compile feature checker
perf build: Remove all condition feature check {C,LD}FLAGS
perf build: Use feature dump file for build-test
perf buildid: Fix cpumode of buildid event
perf test: Check environment before start real BPF test
perf test: Improve bp_signal
perf tools: Move timestamp creation to util
perf record: Use OPT_BOOLEAN_SET for buildid cache related options
perf symbols: Fix symbols searching for module in buildid-cache
perf tools: Unlink entries from terms list
perf tools: Free the terms list_head in parse_events__free_terms()
perf data: Fix releasing event_class
perf bpf: Rename bpf_prog_priv__clear() to clear_prog_priv()
perf tools: Fix checking asprintf return value
perf tools: Create config_term_names array
perf stat: Bail out on unsupported event config modifiers
perf tools: Rename and move pmu_event_name to get_config_name
perf tools: Enable config raw and numeric events
perf tools: Enable config and setting names for legacy cache events
perf bpf: Add API to set values to map entries in a bpf object
perf tools: Enable BPF object configure syntax
perf record: Apply config to BPF objects before recording
perf tools: Enable passing event to BPF object
perf tools: Support setting different slots in a BPF map separately
perf tools: Enable indices setting syntax for BPF map
perf tools: Apply tracepoint event definition options to BPF script
perf tools: Introduce bpf-output event
perf tools: Make binary data printer code in trace_event public available
perf script: Print bpf-output events in 'perf script'
perf config: Bring perf_default_config to the very beginning at main()
perf tools: Only set filter for tracepoints events
perf trace: Call bpf__apply_obj_config in 'perf trace'
perf trace: Print content of bpf-output event
perf data: Support converting data from bpf_perf_event_output()
perf data: Explicitly set byte order for integer types
perf record: Use WARN_ONCE to replace 'if' condition
perf record: Extract synthesize code to record__synthesize()
perf record: Introduce record__finish_output() to finish a perf.data
perf record: Ensure return non-zero rc when mmap fail

Zubair Lutfullah Kakakhel (1):
perf build: Add EXTRA_LDFLAGS option to makefile


Documentation/sysctl/kernel.txt | 13 +
MAINTAINERS | 1 +
arch/x86/Kbuild | 3 +-
arch/x86/events/Makefile | 13 +
.../cpu/perf_event_amd.c => events/amd/core.c} | 2 +-
.../cpu/perf_event_amd_ibs.c => events/amd/ibs.c} | 12 +-
.../perf_event_amd_iommu.c => events/amd/iommu.c} | 4 +-
.../perf_event_amd_iommu.h => events/amd/iommu.h} | 0
.../amd/uncore.c} | 4 +-
.../x86/{kernel/cpu/perf_event.c => events/core.c} | 22 +-
.../perf_event_intel_bts.c => events/intel/bts.c} | 2 +-
.../cpu/perf_event_intel.c => events/intel/core.c} | 31 +-
.../perf_event_intel_cqm.c => events/intel/cqm.c} | 34 +-
.../intel/cstate.c} | 2 +-
.../perf_event_intel_ds.c => events/intel/ds.c} | 56 +-
.../cpu/perf_event_knc.c => events/intel/knc.c} | 6 +-
.../perf_event_intel_lbr.c => events/intel/lbr.c} | 2 +-
.../cpu/perf_event_p4.c => events/intel/p4.c} | 2 +-
.../cpu/perf_event_p6.c => events/intel/p6.c} | 2 +-
.../perf_event_intel_pt.c => events/intel/pt.c} | 4 +-
.../{kernel/cpu/intel_pt.h => events/intel/pt.h} | 0
.../intel/rapl.c} | 412 +++++-----
.../intel/uncore.c} | 677 ++++++++--------
.../intel/uncore.h} | 55 +-
.../intel/uncore_nhmex.c} | 8 +-
.../intel/uncore_snb.c} | 16 +-
.../intel/uncore_snbep.c} | 21 +-
.../{kernel/cpu/perf_event_msr.c => events/msr.c} | 0
arch/x86/{kernel/cpu => events}/perf_event.h | 5 +
arch/x86/include/asm/elf.h | 2 +-
arch/x86/include/asm/perf_event.h | 1 +
arch/x86/include/asm/processor.h | 2 +
arch/x86/include/asm/topology.h | 11 +
arch/x86/kernel/apic/apic.c | 14 +
arch/x86/kernel/cpu/Makefile | 24 +-
arch/x86/kernel/cpu/amd.c | 23 +-
arch/x86/kernel/cpu/bugs_64.c | 2 +-
arch/x86/kernel/cpu/centaur.c | 10 +-
arch/x86/kernel/cpu/common.c | 44 +-
arch/x86/kernel/cpu/cyrix.c | 10 +-
arch/x86/kernel/cpu/hypervisor.c | 2 +-
arch/x86/kernel/cpu/intel.c | 23 +-
arch/x86/kernel/cpu/intel_cacheinfo.c | 2 +-
arch/x86/kernel/cpu/mcheck/mce-inject.c | 15 +-
arch/x86/kernel/cpu/mcheck/p5.c | 18 +-
arch/x86/kernel/cpu/mcheck/therm_throt.c | 15 +-
arch/x86/kernel/cpu/mcheck/threshold.c | 4 +-
arch/x86/kernel/cpu/mcheck/winchip.c | 5 +-
arch/x86/kernel/cpu/microcode/amd.c | 2 +-
arch/x86/kernel/cpu/mshyperv.c | 8 +-
arch/x86/kernel/cpu/mtrr/centaur.c | 2 +-
arch/x86/kernel/cpu/mtrr/cleanup.c | 44 +-
arch/x86/kernel/cpu/mtrr/generic.c | 23 +-
arch/x86/kernel/cpu/mtrr/main.c | 20 +-
arch/x86/kernel/cpu/rdrand.c | 2 +-
arch/x86/kernel/cpu/topology.c | 4 +-
arch/x86/kernel/cpu/transmeta.c | 8 +-
arch/x86/kernel/cpu/vmware.c | 5 +-
arch/x86/kernel/mpparse.c | 2 +-
arch/x86/kernel/nmi.c | 3 +-
arch/x86/kernel/smpboot.c | 100 +++
arch/x86/lguest/boot.c | 2 +-
arch/x86/xen/enlighten.c | 2 +-
arch/x86/xen/pmu.c | 2 +-
include/linux/perf_event.h | 1 +
kernel/events/core.c | 29 +-
kernel/trace/trace_kprobe.c | 19 +-
kernel/trace/trace_syscalls.c | 16 +-
lib/cpumask.c | 1 +
tools/build/Makefile.build | 2 +-
tools/build/Makefile.feature | 31 +-
tools/build/feature/Makefile | 4 +
tools/build/feature/test-all.c | 5 +
tools/build/feature/test-compile.c | 2 +
tools/build/feature/test-libcrypto.c | 17 +
tools/lib/api/Build | 1 +
tools/lib/api/Makefile | 1 +
tools/lib/api/debug-internal.h | 20 +
tools/lib/api/debug.c | 28 +
tools/lib/api/debug.h | 10 +
tools/lib/api/fs/fs.c | 64 ++
tools/lib/api/fs/fs.h | 3 +
tools/lib/bpf/libbpf.c | 34 +-
tools/lib/traceevent/event-parse.c | 156 +++-
tools/lib/traceevent/event-parse.h | 13 +
tools/perf/Documentation/perf-config.txt | 357 ++++++++-
tools/perf/Documentation/perf-inject.txt | 7 +
tools/perf/Documentation/perf-record.txt | 6 +
tools/perf/Documentation/perf-report.txt | 40 +-
tools/perf/Documentation/perf-stat.txt | 35 +
tools/perf/Documentation/perf-top.txt | 3 +
tools/perf/Documentation/perfconfig.example | 2 +-
tools/perf/Documentation/tips.txt | 1 +
tools/perf/Makefile | 25 +-
tools/perf/Makefile.perf | 16 +-
tools/perf/arch/arm/Makefile | 1 +
tools/perf/arch/arm64/Makefile | 1 +
tools/perf/arch/powerpc/Makefile | 3 +
tools/perf/arch/powerpc/util/Build | 1 +
tools/perf/arch/powerpc/util/book3s_hcalls.h | 123 +++
tools/perf/arch/powerpc/util/book3s_hv_exits.h | 33 +
tools/perf/arch/powerpc/util/kvm-stat.c | 170 ++++
tools/perf/arch/s390/util/kvm-stat.c | 10 +-
tools/perf/arch/x86/Makefile | 1 +
tools/perf/arch/x86/tests/rdpmc.c | 3 +-
tools/perf/arch/x86/util/intel-bts.c | 4 +-
tools/perf/arch/x86/util/intel-pt.c | 6 +-
tools/perf/arch/x86/util/kvm-stat.c | 16 +-
tools/perf/bench/mem-memcpy-x86-64-asm.S | 5 +
tools/perf/builtin-annotate.c | 2 +-
tools/perf/builtin-buildid-cache.c | 14 +-
tools/perf/builtin-config.c | 27 +-
tools/perf/builtin-diff.c | 2 -
tools/perf/builtin-help.c | 5 +-
tools/perf/builtin-inject.c | 105 ++-
tools/perf/builtin-kmem.c | 4 +-
tools/perf/builtin-kvm.c | 38 +-
tools/perf/builtin-mem.c | 84 +-
tools/perf/builtin-record.c | 197 +++--
tools/perf/builtin-report.c | 58 +-
tools/perf/builtin-script.c | 155 +++-
tools/perf/builtin-stat.c | 567 ++++++++++---
tools/perf/builtin-top.c | 43 +-
tools/perf/builtin-trace.c | 54 +-
tools/perf/config/Makefile | 119 +--
tools/perf/jvmti/Makefile | 89 +++
tools/perf/jvmti/jvmti_agent.c | 465 +++++++++++
tools/perf/jvmti/jvmti_agent.h | 36 +
tools/perf/jvmti/libjvmti.c | 304 +++++++
tools/perf/perf.c | 18 +-
tools/perf/perf.h | 2 +
.../python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 5 +-
tools/perf/tests/.gitignore | 1 +
tools/perf/tests/Build | 9 +-
tools/perf/tests/bp_signal.c | 140 +++-
tools/perf/tests/bpf-script-test-relocation.c | 50 ++
tools/perf/tests/bpf.c | 65 +-
tools/perf/tests/code-reading.c | 10 +-
tools/perf/tests/hists_cumulate.c | 2 +-
tools/perf/tests/hists_filter.c | 2 +-
tools/perf/tests/hists_output.c | 10 +-
tools/perf/tests/llvm.c | 25 +-
tools/perf/tests/llvm.h | 5 +-
tools/perf/tests/make | 50 +-
tools/perf/tests/parse-events.c | 54 +-
tools/perf/tests/vmlinux-kallsyms.c | 24 +-
tools/perf/ui/browser.c | 4 +-
tools/perf/ui/browser.h | 2 +-
tools/perf/ui/browsers/annotate.c | 2 +-
tools/perf/ui/browsers/hists.c | 885 ++++++++++++++++++---
tools/perf/ui/gtk/hists.c | 199 ++++-
tools/perf/ui/hist.c | 262 ++++--
tools/perf/ui/stdio/hist.c | 302 ++++++-
tools/perf/util/Build | 10 +
tools/perf/util/auxtrace.c | 7 +-
tools/perf/util/auxtrace.h | 6 +-
tools/perf/util/bpf-loader.c | 724 ++++++++++++++++-
tools/perf/util/bpf-loader.h | 59 ++
tools/perf/util/build-id.c | 50 +-
tools/perf/util/build-id.h | 1 +
tools/perf/util/cache.h | 3 +
tools/perf/util/callchain.c | 102 ++-
tools/perf/util/color.c | 5 +-
tools/perf/util/config.c | 4 +-
tools/perf/util/cpumap.c | 30 +
tools/perf/util/cpumap.h | 32 +-
tools/perf/util/ctype.c | 9 +
tools/perf/util/data-convert-bt.c | 138 +++-
tools/perf/util/debug.c | 111 ++-
tools/perf/util/debug.h | 1 +
tools/perf/util/demangle-java.c | 199 +++++
tools/perf/util/demangle-java.h | 10 +
tools/perf/util/dso.c | 5 +
tools/perf/util/env.c | 13 +
tools/perf/util/env.h | 15 +
tools/perf/util/event.c | 2 +-
tools/perf/util/evlist.c | 43 +-
tools/perf/util/evlist.h | 3 +
tools/perf/util/evsel.c | 30 +-
tools/perf/util/evsel.h | 14 +-
tools/perf/util/genelf.c | 449 +++++++++++
tools/perf/util/genelf.h | 67 ++
tools/perf/util/genelf_debug.c | 610 ++++++++++++++
tools/perf/util/header.c | 270 +++++++
tools/perf/util/header.h | 1 +
tools/perf/util/help-unknown-cmd.c | 5 +-
tools/perf/util/hist.c | 841 +++++++++++++++++---
tools/perf/util/hist.h | 120 ++-
tools/perf/util/jit.h | 15 +
tools/perf/util/jitdump.c | 697 ++++++++++++++++
tools/perf/util/jitdump.h | 124 +++
tools/perf/util/kvm-stat.h | 8 +-
tools/perf/util/machine.h | 10 +
tools/perf/util/mem-events.c | 255 ++++++
tools/perf/util/mem-events.h | 35 +
tools/perf/util/parse-events.c | 314 +++++++-
tools/perf/util/parse-events.h | 28 +-
tools/perf/util/parse-events.l | 19 +-
tools/perf/util/parse-events.y | 184 +++--
tools/perf/util/pmu.c | 34 +-
.../perf/util/scripting-engines/trace-event-perl.c | 3 +
.../util/scripting-engines/trace-event-python.c | 7 +-
tools/perf/util/session.c | 40 +-
tools/perf/util/setup.py | 4 +
tools/perf/util/sort.c | 761 +++++++++++-------
tools/perf/util/sort.h | 29 +-
tools/perf/util/stat-shadow.c | 225 +++---
tools/perf/util/stat.c | 14 +-
tools/perf/util/stat.h | 24 +-
tools/perf/util/strbuf.c | 24 -
tools/perf/util/strbuf.h | 2 -
tools/perf/util/symbol-elf.c | 3 +
tools/perf/util/symbol.c | 10 +-
tools/perf/util/symbol.h | 3 +-
tools/perf/util/trace-event.c | 1 +
tools/perf/util/tsc.c | 2 +-
tools/perf/util/util.c | 112 +--
tools/perf/util/util.h | 25 +-
tools/power/x86/turbostat/turbostat.c | 8 +-
219 files changed, 12250 insertions(+), 2446 deletions(-)
create mode 100644 arch/x86/events/Makefile
rename arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} (100%)
rename arch/x86/{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c} (99%)
rename arch/x86/{kernel/cpu/perf_event.c => events/core.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_intel_bts.c => events/intel/bts.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_intel.c => events/intel/core.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_intel_cqm.c => events/intel/cqm.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_intel_cstate.c => events/intel/cstate.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_intel_ds.c => events/intel/ds.c} (93%)
rename arch/x86/{kernel/cpu/perf_event_knc.c => events/intel/knc.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_intel_lbr.c => events/intel/lbr.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_p4.c => events/intel/p4.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_p6.c => events/intel/p6.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_intel_pt.c => events/intel/pt.c} (99%)
rename arch/x86/{kernel/cpu/intel_pt.h => events/intel/pt.h} (100%)
rename arch/x86/{kernel/cpu/perf_event_intel_rapl.c => events/intel/rapl.c} (74%)
rename arch/x86/{kernel/cpu/perf_event_intel_uncore.c => events/intel/uncore.c} (75%)
rename arch/x86/{kernel/cpu/perf_event_intel_uncore.h => events/intel/uncore.h} (90%)
rename arch/x86/{kernel/cpu/perf_event_intel_uncore_nhmex.c => events/intel/uncore_nhmex.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_intel_uncore_snb.c => events/intel/uncore_snb.c} (98%)
rename arch/x86/{kernel/cpu/perf_event_intel_uncore_snbep.c => events/intel/uncore_snbep.c} (99%)
rename arch/x86/{kernel/cpu/perf_event_msr.c => events/msr.c} (100%)
rename arch/x86/{kernel/cpu => events}/perf_event.h (99%)
create mode 100644 tools/build/feature/test-libcrypto.c
create mode 100644 tools/lib/api/debug-internal.h
create mode 100644 tools/lib/api/debug.c
create mode 100644 tools/lib/api/debug.h
create mode 100644 tools/perf/arch/powerpc/util/book3s_hcalls.h
create mode 100644 tools/perf/arch/powerpc/util/book3s_hv_exits.h
create mode 100644 tools/perf/arch/powerpc/util/kvm-stat.c
create mode 100644 tools/perf/jvmti/Makefile
create mode 100644 tools/perf/jvmti/jvmti_agent.c
create mode 100644 tools/perf/jvmti/jvmti_agent.h
create mode 100644 tools/perf/jvmti/libjvmti.c
create mode 100644 tools/perf/tests/bpf-script-test-relocation.c
create mode 100644 tools/perf/util/demangle-java.c
create mode 100644 tools/perf/util/demangle-java.h
create mode 100644 tools/perf/util/genelf.c
create mode 100644 tools/perf/util/genelf.h
create mode 100644 tools/perf/util/genelf_debug.c
create mode 100644 tools/perf/util/jit.h
create mode 100644 tools/perf/util/jitdump.c
create mode 100644 tools/perf/util/jitdump.h
create mode 100644 tools/perf/util/mem-events.c
create mode 100644 tools/perf/util/mem-events.h

[ ... diff omitted for size reasons ... ]