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: fd7647979a3948dae4fc6f25dbbdf9ba269bed78 Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core ( NOTE: this tree depends on the x86-process-for-linus tree. If you did not pull that tree then disregard this pull request, I'll rework it all. ) The main changes in this cycle were: kernel side changes: - Kprobes and uprobes changes: - Make their trampolines read-only while they are used - Make UPROBES_EVENTS default-y which is the distro practice - Apply misc fixes and robustization to probe point insertion. - Add support for AMD IOMMU events - extend hw events on Intel Goldmont CPUs - ... plus misc fixes and updates. perf tooling side changes: - Support s390 jump instructions in perf annotate (Christian Borntraeger) - Vendor hardware events updates (Andi Kleen) - Add argument support for SDT events in powerpc (Ravi Bangoria) - Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo) - Handle inline functions in callchains (Jin Yao) - Enable sorting by srcline as key (Milian Wolff) - Add 'brstackinsn' field in 'perf script' to reuse the x86 instruction decoder used in the Intel PT code to study hot paths to samples (Andi Kleen) - Add PERF_RECORD_NAMESPACES so that the kernel can record information required to associate samples to namespaces, helping in container problem characterization. (Hari Bathini) - Allow sorting by symbol_size in 'perf report' and 'perf top' (Charles Baylis) - In perf stat, make system wide (-a) the default option if no target was specified and one of following conditions is met: - No workload specified (current behaviour) - A workload is specified but all requested events are system wide ones, like uncore ones. (Jiri Olsa) - ... plus lots of other updates, enhancements, cleanups and fixes. Thanks, Ingo ------------------> Adrian Hunter (2): perf intel-PT/BTS: Add missing initialization perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Alexander Shishkin (6): perf/core: Add a flag for partial AUX records perf/x86/intel/pt: Handle VMX better tools lib api fs: Introduce sysfs__read_bool tools include: Sync {,tools/}include/uapi/linux/perf_event.h perf tools: Handle partial AUX records and print a warning perf/x86/intel/pt: Allow the disabling of branch tracing Alexis Berlemont (2): perf sdt: Add scanning of sdt probes arguments perf probe: Add sdt probes arguments into the uprobe cmd string Andi Kleen (23): perf script: Add 'brstackinsn' for branch stacks perf stat: Factor out callback for collecting event values perf stat: Collapse identically named events perf stat: Handle partially bad results with merging perf tools: Factor out PMU matching in parser perf pmu: Expand PMU events by prefix match perf pmu: Special case uncore_ prefix perf tools: Add a simple expression parser for JSON perf vendor events intel: Update Intel uncore JSON event files perf pmu: Support MetricExpr header in JSON event list perf stat: Output JSON MetricExpr metric perf list: Support printing MetricExpr with --debug perf pmu: Add support for MetricName JSON attribute perf list: Move extra details printing to new option perf vendor events intel: Add missing UNC_M_DCLOCKTICKS for Broadwell DE uncore perf vendor events intel: Add uncore events for Sandy Bridge client perf vendor events intel: Add uncore events for Ivy Bridge client perf vendor events intel: Add uncore events for Haswell client perf vendor events intel: Add uncore events for Broadwell client perf vendor events intel: Add uncore events for Skylake client perf vendor events intel: Add uncore_arb JSON support perf vendor events intel: Add missing space in json descriptions perf mem: Fix display of data source snoop indication Arnaldo Carvalho de Melo (83): tools include: Adopt __compiletime_error tools arch x86: Include asm/cmpxchg.h tools arch x86: Introduce atomic_cmpxchg() tools include: Introduce atomic_cmpxchg_{relaxed,release}() tools include: Provide gcc based cmpxchg fallback for !x86 tools include: Add UINT_MAX def to kernel.h tools include: Adopt kernel's refcount.h perf evlist: Clarify a bit the use of perf_mmap->refcnt tools build: Add test for sched_getcpu() perf bench futex: Use __maybe_unused perf bench futex: Fix build on musl + clang tools build: Use the same CC for feature detection and actual build tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h uprobes: Default UPROBES_EVENTS to Y perf lock: Make 'f' part of the common 'lock_options' perf timechart: Use OPT_PARENT for common options tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h perf annotate: Add comment clarifying how the source code line is parsed perf trace: Check for vfs_getname.pathname length perf trace: Fix up error path indentation perf trace: Fixup thread refcounting perf tools: Remove unused 'prefix' from builtin functions perf tools: Remove support for command aliases perf trace: Handle unpaired raw_syscalls:sys_exit event tools include uapi: Grab copies of stat.h and fcntl.h perf trace: Beautify statx syscall 'flag' and 'mask' arguments Merge branch 'perf/uncore-json-updates-1' of git://git.kernel.org/.../ak/linux-misc into perf/core perf tools: Remove die() call perf tools: Handle allocation failures gracefully perf tools: Don't die on a print function perf callchains: Switch from strtok() to strtok_r() when parsing options perf script: Use strtok_r() when parsing output field list perf string: Simplify ltrim() implementation perf unwind arm64: Add missing errno.h header perf tools: Remove FLEX_ARRAY definition tools include: Introduce linux/bug.h, from the kernel sources tools include: Adopt __same_type() and __must_be_array() from the kernel tools include: Move ARRAY_SIZE() to linux/kernel.h perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h perf tools: Remove unused macros from util.h perf tools: Including missing inttypes.h header perf tools: Remove PRI[xu] macros from perf.h perf tools: Replace STR() calls with __stringify() perf tools: Ditch unused PATH_SEP, STRIP_EXTENSION perf tools: Move sane ctype stuff from util.h to sane_ctype.h tools include: Include missing headers for fls() and types in linux/log2.h perf tools: Move print_binary definitions to separate files perf tools: Move srcline definitions to separate header perf tools: Move extra string util functions to util/string2.h perf tools: Include errno.h where needed perf str{filter,list}: Disentangle headers perf tools: Don't include terminal handling headers in util.h perf tools: Move path related functions to util/path.h perf tools: No need to include bitops.h in util.h perf tools: Use api/fs/tracing_path.h where needed perf tools: Remove misplaced __maybe_unused in some functions perf tools: Remove include dirent.h from util.h perf tools: Remove regex.h and fnmatch.h from util.h perf tools: Ditch unused strchrnul() reimplementation perf unwind: Provide only forward declarations for pointer types perf tools: Add signal.h to places using its definitions perf tools: Move units conversion/formatting routines to separate object perf tools: Move timestamp routines from util.h to time-utils.h perf kvm: Make function only used by 'perf kvm' static perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h perf tools: Add compress.h for the *_decompress_to_file() headers perf callchain: Move callchain specific routines from util.[ch] perf tools: Include sys/param.h where needed perf tools: Remove a few more needless includes from util.h perf tools: Remove sys/ioctl.h from util.h perf tools: Remove string.h from util.h perf tools: Remove stale prototypes from builtin.h perf tools: Remove string.h, unistd.h and sys/stat.h from util.h perf tools: Remove poll.h and wait.h from util.h perf tools: Add the right header to obtain PERF_ALIGN() perf tools: Use just forward declarations for struct thread where possible tools: Update asm-generic/mman-common.h copy from the kernel tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel tools arch x86: Sync cpufeatures.h Borislav Petkov (4): perf stat: Issue a HW watchdog disable hint perf/amd/uncore: Do feature check first, before assignments perf/amd/uncore: Clean up per-family setup perf/amd/uncore: Fix pr_fmt() prefix Brendan Gregg (1): perf sched timehist: Add --next option Changbin Du (6): perf tools: Missing c2c command in command-list perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git perf sort: Fix segfault with basic block 'cycles' sort dimension perf report: Document +field style argument support for --field option perf hists browser: Fix typo in function switch_data_file perf lock: Subcommands should include common options Charles Baylis (1): perf tools: Allow sorting by symbol size Christian Borntraeger (2): perf annotate s390: Fix perf annotate error -95 (4.10 regression) perf annotate s390: Implement jump types for perf annotate Colin Ian King (1): perf utils: Fix spelling mistake: "Invalud" -> "Invalid" David Carrillo-Cisneros (11): perf inject: Don't proceed if perf_session__process_event() fails perf inject: Copy events when reordering events in pipe mode perf tools: Describe pipe mode in perf.data-file-fomat.txt perf annotate: Process attr and build_id records perf session: Don't rely on evlist in pipe mode perf tools: Do not print missing features in pipe-mode perf tools: Pass PYTHON config to feature detection perf tools: Disable JVMTI if no ELF support available tools build: Fix feature detection redefinion of build flags perf util: Hint missing file when tool tips fail to load Revert "perf tools: Fix include of linux/mman.h" Elena Reshetova (9): perf cgroup: Convert cgroup_sel.refcnt from atomic_t to refcount_t perf cpumap: Convert cpu_map.refcnt from atomic_t to refcount_t perf comm: Convert comm_str.refcnt from atomic_t to refcount_t perf dso: Convert dso.refcnt from atomic_t to refcount_t perf map: Convert map.refcnt from atomic_t to refcount_t perf map: Convert map_groups.refcnt from atomic_t to refcount_t perf evlist: Convert perf_map.refcnt from atomic_t to refcount_t perf thread: convert thread.refcnt from atomic_t to refcount_t perf thread_map: Convert thread_map.refcnt from atomic_t to refcount_t Hari Bathini (5): perf: Add PERF_RECORD_NAMESPACES to include namespaces related info perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info perf record: Synthesize namespace events for current processes perf script: Add script print support for namespace events perf tools: Add 'cgroup_id' sort order keyword Ingo Molnar (19): Merge tag 'perf-core-for-mingo-4.11-20170306' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'perf-core-for-mingo-4.12-20170314' of git://git.kernel.org/.../acme/linux into perf/core Merge branch 'linus' into perf/core, to pick up fixes Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'perf-core-for-mingo-4.12-20170320' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'perf-core-for-mingo-4.12-20170324' of git://git.kernel.org/.../acme/linux into perf/core Merge branch 'perf/urgent' into perf/core, to pick up fixes Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/.../acme/linux into perf/core Merge branch 'linus' into perf/core, to pick up fixes Merge tag 'perf-core-for-mingo-4.12-20170331' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'perf-core-for-mingo-4.12-20170404' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'v4.11-rc6' into perf/core, to pick up fixes Merge branch 'perf/urgent' into perf/core, to pick up fixes Merge tag 'perf-core-for-mingo-4.12-20170411' of git://git.kernel.org/.../acme/linux into perf/core Merge branch 'perf/urgent' into perf/core, to pick up fixes Merge tag 'perf-core-for-mingo-4.12-20170413' of git://git.kernel.org/.../acme/linux into perf/core Merge branch 'WIP.x86/process' into perf/core Merge tag 'perf-core-for-mingo-4.12-20170419' of git://git.kernel.org/.../acme/linux into perf/core Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/.../acme/linux into perf/core Jin Yao (7): perf report: Refactor common code in srcline.c perf report: Find the inline stack for a given address perf report: Introduce --inline option perf report: Show inline stack for stdio mode perf report: Show inline stack for browser mode perf report: Drop cycles 0 for LBR print perf evsel: Return exact sub event which failed with EPERM for wildcards Jiri Olsa (4): perf tools: Force uncore events to system wide monitoring perf bench numa: Add more comment for -c option perf tools: Do not fail in case of empty HOME env variable perf tools: Fix the code to strip command name Kan Liang (2): perf/x86: Add Top Down events to Intel Goldmont perf/x86: Fix spurious NMI with PEBS Load Latency event Karol Wachowski (1): perf vendor events: Add mapping for KnightsMill PMU events Kefeng Wang (1): perf probe: Return errno when not hitting any event Masami Hiramatsu (8): kprobes/x86: Fix kprobe-booster not to boost far call instructions kprobes/x86: Fix the description of __copy_instruction() kprobes/x86: Use instruction decoder for booster kprobes/x86: Do not modify singlestep buffer while resuming kprobes/x86: Make boostable flag boolean kprobes/x86: Set kprobes pages read-only kprobes/x86: Use probe_kernel_read() instead of memcpy() kprobes/x86: Consolidate insn decoder users for copying code Milian Wolff (1): perf report: Enable sorting by srcline as key Namhyung Kim (7): perf ftrace: Add support for --pid option perf cpumap: Introduce cpu_map__snprint_mask() perf ftrace: Add support for -a and -C option perf ftrace: Use pager for displaying result perf report: Hide tip message when -q option is given perf c2c: Clarify help message of --stats option perf c2c: Fix display bug when using pipe Naveen N. Rao (9): kretprobes: Ensure probe location is at function entry trace/kprobes: Allow return probes with offsets and absolute addresses perf probe: Generalize probe event file open routine perf probe: Factor out the ftrace README scanning perf kretprobes: Offset from reloc_sym if kernel supports it perf powerpc: Choose local entry point with kretprobes doc: trace/kprobes: add information about NOKPROBE_SYMBOL kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL trace/kprobes: Fix check for kretprobe offset within function entry Ravi Bangoria (10): perf probe: Introduce util func is_sdt_event() perf stat: Correct --no-aggr description perf probe: Fix concat_probe_trace_events perf probe: Change MAX_CMDLEN perf sdt x86: Add renaming logic for rNN and other registers perf list sdt: Show option in man page perf/sdt/x86: Add renaming logic for (missing) 8 bit registers perf/sdt/x86: Move OP parser to tools/perf/arch/x86/ perf sdt powerpc: Add argument support perf trace: Add usage of --no-syscalls in man page Stephane Eranian (2): perf tools: Make perf_event__synthesize_mmap_events() scale perf stat: Fix bug in handling events in error state Steven Rostedt (VMware) (1): trace/kprobes: Add back warning about offset in return probes Suravee Suthikulpanit (10): x86/events/amd/iommu: Declare pr_fmt() format x86/events/amd/iommu: Clean up bitwise operations x86/events/amd/iommu: Clean up perf_iommu_read() drivers/iommu/amd: Clean up iommu_pc_get_set_reg() x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() x86/events/amd/iommu.c: Modify functions to query max banks and counters x86/events, drivers/amd/iommu: Prepare for multiple IOMMUs support x86/events/amd/iommu: Fix sysfs perf attribute groups x86/events/amd/iommu: Add IOMMU-specific hw_perf_event struct x86/events/amd/iommu: Enable support for multiple IOMMUs Taeung Song (10): perf annotate: More exactly grep -v of the objdump command perf annotate: Fix a bug following symbolic link of a build-id file perf annotate: Fix a bug of division by zero when calculating percent perf annotate: Fix missing number of samples for source_line_samples perf stat: Refactor the code to strip csv output with ltrim() perf ui browser: Refactor the code to parse color configs with ltrim() perf pmu: Refactor wordwrap() with ltrim() perf tools: Refactor the code to strip command name with {l,r}trim() perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() perf annotate: Use stripped line instead of raw disassemble line Tommi Rantala (6): perf buildid: Do not update SDT cache with null filename perf buildid: Do not assume that readlink() returns a null terminated string perf tests: Do not assume that readlink() returns a null terminated string perf utils: use sizeof(buf) - 1 in readlink() call perf utils: Null terminate buf in read_ftrace_printk() perf utils: Readlink /proc/self/exe to find the perf binary Will Deacon (1): perf/core: Keep AUX flags in the output handle Documentation/trace/kprobetrace.txt | 5 +- arch/x86/events/amd/iommu.c | 325 ++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------- arch/x86/events/amd/iommu.h | 18 ++++-- arch/x86/events/amd/uncore.c | 77 +++++++++------------- arch/x86/events/intel/bts.c | 16 ++--- arch/x86/events/intel/core.c | 24 ++++++- arch/x86/events/intel/ds.c | 2 +- arch/x86/events/intel/pt.c | 129 +++++++++++++++++++++++++++++-------- arch/x86/events/intel/pt.h | 2 +- arch/x86/events/perf_event.h | 1 + arch/x86/include/asm/kprobes.h | 7 +- arch/x86/kernel/kprobes/common.h | 4 +- arch/x86/kernel/kprobes/core.c | 149 +++++++++++++++++++++---------------------- arch/x86/kernel/kprobes/ftrace.c | 2 +- arch/x86/kernel/kprobes/opt.c | 13 +++- drivers/hwtracing/coresight/coresight-etb10.c | 9 ++- drivers/hwtracing/coresight/coresight-etm-perf.c | 9 ++- drivers/hwtracing/coresight/coresight-priv.h | 2 - drivers/hwtracing/coresight/coresight-tmc-etf.c | 7 +- drivers/iommu/amd_iommu.c | 6 +- drivers/iommu/amd_iommu_init.c | 101 +++++++++++++++++------------ drivers/iommu/amd_iommu_proto.h | 8 +-- drivers/iommu/amd_iommu_types.h | 3 - include/linux/coresight.h | 2 +- include/linux/kprobes.h | 2 + include/linux/perf_event.h | 17 ++++- include/uapi/linux/perf_event.h | 33 +++++++++- kernel/events/core.c | 139 ++++++++++++++++++++++++++++++++++++++++ kernel/events/ring_buffer.c | 34 ++++++---- kernel/fork.c | 2 + kernel/kprobes.c | 46 +++++++++++--- kernel/nsproxy.c | 3 + kernel/trace/Kconfig | 2 +- kernel/trace/trace.c | 1 + kernel/trace/trace_kprobe.c | 9 +-- tools/arch/arm/include/uapi/asm/kvm.h | 13 ++++ tools/arch/arm64/include/uapi/asm/kvm.h | 13 ++++ tools/arch/powerpc/include/uapi/asm/kvm.h | 22 +++++++ tools/arch/x86/include/asm/atomic.h | 7 ++ tools/arch/x86/include/asm/cmpxchg.h | 89 ++++++++++++++++++++++++++ tools/arch/x86/include/asm/cpufeatures.h | 9 +-- tools/arch/x86/lib/memcpy_64.S | 2 +- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 18 ++++-- tools/build/feature/test-all.c | 5 ++ tools/build/feature/test-sched_getcpu.c | 7 ++ tools/include/asm-generic/atomic-gcc.h | 8 +++ tools/include/linux/atomic.h | 6 ++ tools/include/linux/bug.h | 10 +++ tools/include/linux/compiler-gcc.h | 7 ++ tools/include/linux/compiler.h | 9 +++ tools/include/linux/hashtable.h | 4 -- tools/include/linux/kernel.h | 7 ++ tools/include/linux/log2.h | 3 + tools/include/linux/refcount.h | 151 +++++++++++++++++++++++++++++++++++++++++++ tools/include/linux/types.h | 1 + tools/include/uapi/linux/fcntl.h | 72 +++++++++++++++++++++ tools/include/uapi/linux/perf_event.h | 33 +++++++++- tools/include/uapi/linux/stat.h | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/api/fs/fs.c | 29 +++++++++ tools/lib/api/fs/fs.h | 1 + tools/lib/subcmd/help.h | 1 + tools/lib/symbol/kallsyms.c | 1 + tools/objtool/builtin-check.c | 3 +- tools/objtool/objtool.c | 3 +- tools/perf/.gitignore | 2 + tools/perf/Build | 1 + tools/perf/Documentation/perf-ftrace.txt | 18 ++++++ tools/perf/Documentation/perf-list.txt | 8 ++- tools/perf/Documentation/perf-record.txt | 3 + tools/perf/Documentation/perf-report.txt | 13 +++- tools/perf/Documentation/perf-sched.txt | 4 ++ tools/perf/Documentation/perf-script.txt | 16 ++++- tools/perf/Documentation/perf-stat.txt | 6 +- tools/perf/Documentation/perf-trace.txt | 3 +- tools/perf/Documentation/perf.data-file-format.txt | 19 +++++- tools/perf/MANIFEST | 5 ++ tools/perf/Makefile.config | 39 ++++++------ tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/arm/util/dwarf-regs.c | 4 +- tools/perf/arch/arm/util/unwind-libdw.c | 1 + tools/perf/arch/arm64/util/dwarf-regs.c | 5 +- tools/perf/arch/arm64/util/unwind-libunwind.c | 2 +- tools/perf/arch/common.c | 2 + tools/perf/arch/powerpc/util/dwarf-regs.c | 5 +- tools/perf/arch/powerpc/util/kvm-stat.c | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 112 ++++++++++++++++++++++++++++++++ tools/perf/arch/powerpc/util/sym-handling.c | 14 ++-- tools/perf/arch/s390/annotate/instructions.c | 30 +++++++++ tools/perf/arch/s390/util/kvm-stat.c | 1 + tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 + tools/perf/arch/x86/tests/intel-cqm.c | 3 + tools/perf/arch/x86/tests/perf-time-to-tsc.c | 2 + tools/perf/arch/x86/util/auxtrace.c | 1 + tools/perf/arch/x86/util/intel-bts.c | 1 + tools/perf/arch/x86/util/intel-pt.c | 1 + tools/perf/arch/x86/util/kvm-stat.c | 1 + tools/perf/arch/x86/util/perf_regs.c | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/arch/x86/util/unwind-libdw.c | 1 + tools/perf/bench/bench.h | 20 +++--- tools/perf/bench/futex-hash.c | 4 +- tools/perf/bench/futex-lock-pi.c | 4 +- tools/perf/bench/futex-requeue.c | 4 +- tools/perf/bench/futex-wake-parallel.c | 4 +- tools/perf/bench/futex-wake.c | 4 +- tools/perf/bench/futex.h | 10 ++- tools/perf/bench/mem-functions.c | 5 +- tools/perf/bench/numa.c | 7 +- tools/perf/bench/sched-messaging.c | 3 +- tools/perf/bench/sched-pipe.c | 2 +- tools/perf/builtin-annotate.c | 6 +- tools/perf/builtin-bench.c | 12 ++-- tools/perf/builtin-buildid-cache.c | 5 +- tools/perf/builtin-buildid-list.c | 4 +- tools/perf/builtin-c2c.c | 12 ++-- tools/perf/builtin-config.c | 2 +- tools/perf/builtin-data.c | 9 ++- tools/perf/builtin-diff.c | 5 +- tools/perf/builtin-evlist.c | 2 +- tools/perf/builtin-ftrace.c | 157 +++++++++++++++++++++++++++++++++++++-------- tools/perf/builtin-help.c | 25 +++----- tools/perf/builtin-inject.c | 20 +++++- tools/perf/builtin-kallsyms.c | 3 +- tools/perf/builtin-kmem.c | 10 ++- tools/perf/builtin-kvm.c | 39 +++++++++--- tools/perf/builtin-list.c | 16 +++-- tools/perf/builtin-lock.c | 32 ++++++---- tools/perf/builtin-mem.c | 12 +++- tools/perf/builtin-probe.c | 12 ++-- tools/perf/builtin-record.c | 44 +++++++++++-- tools/perf/builtin-report.c | 17 +++-- tools/perf/builtin-sched.c | 37 ++++++++--- tools/perf/builtin-script.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- tools/perf/builtin-stat.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- tools/perf/builtin-timechart.c | 28 ++++---- tools/perf/builtin-top.c | 6 +- tools/perf/builtin-trace.c | 95 ++++++++++++++++++--------- tools/perf/builtin-version.c | 6 +- tools/perf/builtin.h | 62 +++++++++--------- tools/perf/check-headers.sh | 2 + tools/perf/command-list.txt | 1 + tools/perf/perf.c | 129 ++++++------------------------------- tools/perf/perf.h | 1 + tools/perf/pmu-events/arch/x86/broadwell/uncore.json | 278 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/arch/x86/broadwellde/uncore-cache.json | 28 ++++---- tools/perf/pmu-events/arch/x86/broadwellde/uncore-memory.json | 29 +++++---- tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json | 26 +++++--- tools/perf/pmu-events/arch/x86/broadwellx/uncore-cache.json | 28 ++++---- tools/perf/pmu-events/arch/x86/broadwellx/uncore-interconnect.json | 6 +- tools/perf/pmu-events/arch/x86/broadwellx/uncore-memory.json | 21 +++--- tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json | 26 +++++--- tools/perf/pmu-events/arch/x86/haswell/uncore.json | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/arch/x86/haswellx/uncore-cache.json | 28 ++++---- tools/perf/pmu-events/arch/x86/haswellx/uncore-interconnect.json | 6 +- tools/perf/pmu-events/arch/x86/haswellx/uncore-memory.json | 21 +++--- tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json | 26 +++++--- tools/perf/pmu-events/arch/x86/ivybridge/uncore.json | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/arch/x86/ivytown/uncore-cache.json | 22 +++---- tools/perf/pmu-events/arch/x86/ivytown/uncore-interconnect.json | 12 ++-- tools/perf/pmu-events/arch/x86/ivytown/uncore-memory.json | 19 +++--- tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json | 53 ++++++++++++---- tools/perf/pmu-events/arch/x86/jaketown/uncore-cache.json | 13 ++-- tools/perf/pmu-events/arch/x86/jaketown/uncore-interconnect.json | 12 ++-- tools/perf/pmu-events/arch/x86/jaketown/uncore-memory.json | 21 +++--- tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json | 53 ++++++++++++---- tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + tools/perf/pmu-events/arch/x86/sandybridge/uncore.json | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/arch/x86/skylake/uncore.json | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/jevents.c | 28 ++++++-- tools/perf/pmu-events/jevents.h | 3 +- tools/perf/pmu-events/pmu-events.h | 2 + tools/perf/tests/Build | 1 + tools/perf/tests/attr.c | 6 ++ tools/perf/tests/backward-ring-buffer.c | 1 + tools/perf/tests/bpf.c | 4 ++ tools/perf/tests/builtin-test.c | 9 ++- tools/perf/tests/clang.c | 1 + tools/perf/tests/code-reading.c | 7 +- tools/perf/tests/cpumap.c | 2 +- tools/perf/tests/dso-data.c | 2 + tools/perf/tests/dwarf-unwind.c | 1 + tools/perf/tests/event-times.c | 3 + tools/perf/tests/evsel-roundtrip-name.c | 2 + tools/perf/tests/expr.c | 56 ++++++++++++++++ tools/perf/tests/hists_common.c | 2 + tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 2 + tools/perf/tests/hists_output.c | 1 + tools/perf/tests/is_printable_array.c | 3 +- tools/perf/tests/mmap-basic.c | 3 + tools/perf/tests/mmap-thread-lookup.c | 2 + tools/perf/tests/openat-syscall-all-cpus.c | 6 ++ tools/perf/tests/openat-syscall-tp-fields.c | 1 + tools/perf/tests/openat-syscall.c | 5 ++ tools/perf/tests/parse-events.c | 8 ++- tools/perf/tests/parse-no-sample-id-all.c | 1 + tools/perf/tests/perf-record.c | 2 + tools/perf/tests/pmu.c | 2 + tools/perf/tests/sample-parsing.c | 2 + tools/perf/tests/sdt.c | 3 +- tools/perf/tests/sw-clock.c | 2 + tools/perf/tests/switch-tracking.c | 1 + tools/perf/tests/task-exit.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/thread-map.c | 6 +- tools/perf/tests/thread-mg-share.c | 12 ++-- tools/perf/tests/unit_number__scnprintf.c | 3 +- tools/perf/tests/vmlinux-kallsyms.c | 1 + tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 24 +++++++ tools/perf/trace/beauty/signum.c | 1 + tools/perf/trace/beauty/statx.c | 72 +++++++++++++++++++++ tools/perf/ui/browser.c | 4 +- tools/perf/ui/browsers/annotate.c | 3 + tools/perf/ui/browsers/header.c | 2 + tools/perf/ui/browsers/hists.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- tools/perf/ui/browsers/map.c | 2 + tools/perf/ui/gtk/annotate.c | 3 +- tools/perf/ui/gtk/hists.c | 2 + tools/perf/ui/hist.c | 1 + tools/perf/ui/setup.c | 1 + tools/perf/ui/stdio/hist.c | 91 +++++++++++++++++++++++++- tools/perf/ui/tui/setup.c | 1 + tools/perf/util/Build | 11 +++- tools/perf/util/alias.c | 78 ----------------------- tools/perf/util/annotate.c | 89 +++++++++++++------------- tools/perf/util/annotate.h | 2 +- tools/perf/util/auxtrace.c | 10 +-- tools/perf/util/auxtrace.h | 1 + tools/perf/util/bpf-loader.c | 3 + tools/perf/util/bpf-loader.h | 2 + tools/perf/util/bpf-prologue.c | 1 + tools/perf/util/bpf-prologue.h | 2 + tools/perf/util/build-id.c | 20 ++++-- tools/perf/util/build-id.h | 4 +- tools/perf/util/c++/clang-c.h | 1 + tools/perf/util/cache.h | 1 - tools/perf/util/callchain.c | 271 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- tools/perf/util/callchain.h | 3 +- tools/perf/util/cgroup.c | 11 ++-- tools/perf/util/cgroup.h | 4 +- tools/perf/util/cloexec.c | 1 + tools/perf/util/cloexec.h | 6 -- tools/perf/util/color.h | 2 + tools/perf/util/comm.c | 17 +++-- tools/perf/util/compress.h | 12 ++++ tools/perf/util/config.c | 61 +++++++++++------- tools/perf/util/counts.c | 2 + tools/perf/util/cpumap.c | 65 ++++++++++++++++--- tools/perf/util/cpumap.h | 5 +- tools/perf/util/ctype.c | 2 +- tools/perf/util/data-convert-bt.c | 5 ++ tools/perf/util/data.c | 1 + tools/perf/util/debug.c | 37 ++++++++++- tools/perf/util/debug.h | 3 + tools/perf/util/demangle-java.c | 2 + tools/perf/util/drv_configs.c | 1 + tools/perf/util/dso.c | 14 +++- tools/perf/util/dso.h | 4 +- tools/perf/util/dump-insn.c | 14 ++++ tools/perf/util/dump-insn.h | 22 +++++++ tools/perf/util/dwarf-aux.c | 3 + tools/perf/util/dwarf-regs.c | 1 + tools/perf/util/env.c | 1 + tools/perf/util/event.c | 179 ++++++++++++++++++++++++++++++++++++++++++++++----- tools/perf/util/event.h | 22 ++++++- tools/perf/util/evlist.c | 36 ++++++++--- tools/perf/util/evlist.h | 6 +- tools/perf/util/evsel.c | 24 ++++++- tools/perf/util/evsel.h | 5 ++ tools/perf/util/evsel_fprintf.c | 2 + tools/perf/util/expr.h | 25 ++++++++ tools/perf/util/expr.y | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/header.c | 20 ++++-- tools/perf/util/help-unknown-cmd.c | 9 +-- tools/perf/util/hist.c | 18 +++++- tools/perf/util/hist.h | 2 + tools/perf/util/intel-bts.c | 2 + tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c | 26 ++++++++ tools/perf/util/intel-pt.c | 1 + tools/perf/util/jitdump.c | 7 +- tools/perf/util/llvm-utils.c | 1 + tools/perf/util/lzma.c | 2 + tools/perf/util/machine.c | 47 +++++++++++++- tools/perf/util/machine.h | 3 + tools/perf/util/map.c | 15 +++-- tools/perf/util/map.h | 10 +-- tools/perf/util/mem-events.c | 3 +- tools/perf/util/namespaces.c | 37 +++++++++++ tools/perf/util/namespaces.h | 26 ++++++++ tools/perf/util/ordered-events.c | 5 +- tools/perf/util/parse-events.c | 92 +++++++++++++++++++++++++-- tools/perf/util/parse-events.h | 30 ++++++++- tools/perf/util/parse-events.y | 73 +++++++++------------ tools/perf/util/path.c | 28 +++++++- tools/perf/util/path.h | 9 +++ tools/perf/util/perf-hooks.c | 1 + tools/perf/util/perf_regs.c | 6 ++ tools/perf/util/perf_regs.h | 7 ++ tools/perf/util/pmu.c | 38 ++++++++--- tools/perf/util/pmu.h | 6 +- tools/perf/util/print_binary.c | 55 ++++++++++++++++ tools/perf/util/print_binary.h | 28 ++++++++ tools/perf/util/probe-event.c | 29 ++++----- tools/perf/util/probe-event.h | 7 +- tools/perf/util/probe-file.c | 218 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- tools/perf/util/probe-file.h | 8 ++- tools/perf/util/probe-finder.c | 3 + tools/perf/util/probe-finder.h | 2 +- tools/perf/util/python-ext-sources | 2 + tools/perf/util/python.c | 14 ++++ tools/perf/util/quote.c | 1 + tools/perf/util/record.c | 1 + tools/perf/util/sane_ctype.h | 51 +++++++++++++++ tools/perf/util/scripting-engines/trace-event-perl.c | 1 + tools/perf/util/scripting-engines/trace-event-python.c | 2 + tools/perf/util/session.c | 54 ++++++++++++++-- tools/perf/util/session.h | 4 +- tools/perf/util/sort.c | 109 +++++++++++++++++++++++++++++-- tools/perf/util/sort.h | 16 ++++- tools/perf/util/srcline.c | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- tools/perf/util/srcline.h | 34 ++++++++++ tools/perf/util/stat-shadow.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/stat.c | 2 + tools/perf/util/stat.h | 2 + tools/perf/util/strbuf.c | 1 + tools/perf/util/strfilter.c | 5 +- tools/perf/util/string.c | 24 +++---- tools/perf/util/string2.h | 42 ++++++++++++ tools/perf/util/strlist.c | 1 + tools/perf/util/symbol-elf.c | 33 +++++++++- tools/perf/util/symbol-minimal.c | 8 +++ tools/perf/util/symbol.c | 3 + tools/perf/util/symbol.h | 8 ++- tools/perf/util/term.c | 6 +- tools/perf/util/thread-stack.c | 1 + tools/perf/util/thread.c | 52 +++++++++++++-- tools/perf/util/thread.h | 10 ++- tools/perf/util/thread_map.c | 22 ++++--- tools/perf/util/thread_map.h | 4 +- tools/perf/util/time-utils.c | 25 ++++++++ tools/perf/util/time-utils.h | 7 ++ tools/perf/util/tool.h | 2 + tools/perf/util/top.h | 2 +- tools/perf/util/trace-event-parse.c | 3 +- tools/perf/util/trace-event-read.c | 4 +- tools/perf/util/units.c | 39 ++++++++++++ tools/perf/util/units.h | 10 +++ tools/perf/util/unwind-libdw.c | 1 + tools/perf/util/unwind-libdw.h | 6 +- tools/perf/util/unwind-libunwind-local.c | 2 + tools/perf/util/unwind.h | 9 ++- tools/perf/util/util.c | 278 ++----------------------------------------------------------------------------- tools/perf/util/util.h | 273 ++---------------------------------------------------------------------------- tools/perf/util/values.c | 63 +++++++++++++----- tools/perf/util/vdso.c | 2 +- tools/perf/util/xyarray.c | 2 + tools/perf/util/zlib.c | 1 + tools/scripts/Makefile.include | 9 +++ 360 files changed, 8122 insertions(+), 2203 deletions(-) create mode 100644 tools/arch/x86/include/asm/cmpxchg.h create mode 100644 tools/build/feature/test-sched_getcpu.c create mode 100644 tools/include/linux/bug.h create mode 100644 tools/include/linux/refcount.h create mode 100644 tools/include/uapi/linux/fcntl.h create mode 100644 tools/include/uapi/linux/stat.h create mode 100644 tools/perf/arch/s390/annotate/instructions.c create mode 100644 tools/perf/pmu-events/arch/x86/broadwell/uncore.json create mode 100644 tools/perf/pmu-events/arch/x86/haswell/uncore.json create mode 100644 tools/perf/pmu-events/arch/x86/ivybridge/uncore.json create mode 100644 tools/perf/pmu-events/arch/x86/sandybridge/uncore.json create mode 100644 tools/perf/pmu-events/arch/x86/skylake/uncore.json create mode 100644 tools/perf/tests/expr.c create mode 100644 tools/perf/trace/beauty/Build create mode 100644 tools/perf/trace/beauty/beauty.h create mode 100644 tools/perf/trace/beauty/statx.c delete mode 100644 tools/perf/util/alias.c create mode 100644 tools/perf/util/compress.h create mode 100644 tools/perf/util/dump-insn.c create mode 100644 tools/perf/util/dump-insn.h create mode 100644 tools/perf/util/expr.h create mode 100644 tools/perf/util/expr.y create mode 100644 tools/perf/util/namespaces.c create mode 100644 tools/perf/util/namespaces.h create mode 100644 tools/perf/util/path.h create mode 100644 tools/perf/util/print_binary.c create mode 100644 tools/perf/util/print_binary.h create mode 100644 tools/perf/util/sane_ctype.h create mode 100644 tools/perf/util/srcline.h create mode 100644 tools/perf/util/string2.h create mode 100644 tools/perf/util/units.c create mode 100644 tools/perf/util/units.h