Messages in this thread | | | Date | Mon, 13 Nov 2017 08:47:56 +0100 | From | Ingo Molnar <> | Subject | [GIT PULL] perf updates for v4.15 |
| |
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: fcdfafcb73be8fa45909327bbddca46fb362a675 kprobes: Don't spam the build log with deprecation warnings
The main changes in this cycle were:
- kprobes updates: use better W^X patterns for code modifications, improve optprobes, remove jprobes. (Masami Hiramatsu, Kees Cook)
- core fixes: event timekeeping (enabled/running times statistics) fixes, perf_event_read() locking fixes and cleanups, etc. (Peter Zijlstra)
- Extend x86 Intel free-running PEBS support and support x86 user-register sampling in perf record and perf script. (Andi Kleen)
- Tooling updates:
- Completely rework the way inline frames are handled. Instead of querying for the inline nodes on-demand in the individual tools, we now create proper callchain nodes for inlined frames. (Milian Wolff)
- 'perf trace' updates (Arnaldo Carvalho de Melo)
- Implement a way to print formatted output to per-event files in 'perf script' to facilitate generate flamegraphs, elliminating the need to write scripts to do that separation (yuzhoujian, Arnaldo Carvalho de Melo)
- Update vendor events JSON metrics for Intel's Broadwell, Broadwell Server, Haswell, Haswell Server, IvyBridge, IvyTown, JakeTown, Sandy Bridge, Skylake, SkyLake Server - and Goldmont Plus V1 (Andi Kleen, Kan Liang)
- Multithread the synthesizing of PERF_RECORD_ events for pre-existing threads in 'perf top', speeding up that phase, greatly improving the user experience in systems such as Intel's Knights Mill (Kan Liang)
- Introduce the concept of weak groups in 'perf stat': try to set up a group, but if it's not schedulable fallback to not using a group. That gives us the best of both worlds: groups if they work, but still a usable fallback if they don't. E.g: (Andi Kleen)
- perf sched timehist enhancements (David Ahern)
- ... various other enhancements, updates, cleanups and fixes.
Thanks,
Ingo
------------------> Alexander Shishkin (1): perf/core: Explain perf_sched_mutex
Andi Kleen (40): perf tools: Support weak groups in 'perf stat' perf vendor events: Support metric_group and no event name in JSON parser perf stat: Factor out generic metric printing perf stat: Print generic metric header even for failed expressions perf pmu: Extract function to get JSON alias map perf stat: Support JSON metrics in perf stat perf list: Add metric groups to perf list perf stat: Don't use ctx for saved values lookup perf stat: Support duration_time for metrics perf stat: Hide internal duration_time counter perf stat: Update walltime_nsecs_stats in interval mode perf record: Support direct --user-regs arguments perf script: Support user regs perf stat: Fall weak group back even for EBADF perf vendor events: Add JSON metrics for Broadwell perf vendor events: Add JSON metrics for Skylake perf vendor events: Add JSON metrics for Sandy Bridge perf vendor events: Add JSON metrics for Sandy Bridge EP perf vendor events: Add JSON metrics for Ivy Bridge perf vendor events: Add JSON metrics for Haswell perf vendor events: Add JSON metrics for Ivy Town perf vendor events: Add JSON metrics for Haswell EP perf vendor events: Add JSON metrics for Broadwell Server perf vendor events: Add JSON metrics for Broadwell DE perf vendor events: Add JSON metrics for Skylake server perf pmu: Improve error messages for missing PMUs perf stat: Fix adding multiple event groups perf/x86: Enable free running PEBS for REGS_USER/INTR perf vendor events: Update JSON metrics for Broadwell perf vendor events: Update JSON metrics for Broadwell Server perf vendor events: Update JSON metrics for Haswell perf vendor events: Update JSON metrics for Haswell Server perf vendor events: Update JSON metrics for IvyBridge perf vendor events: Update JSON metrics for IvyTown perf vendor events: Update JSON metrics for JakeTown perf vendor events: Update JSON metrics for Sandy Bridge perf vendor events: Update JSON metrics for Skylake perf vendor events: Update JSON metrics for Skylake Server perf list: Fix group description in the man page perf vendor events: Fix incorrect cmask syntax for some Intel metrics
Arnaldo Carvalho de Melo (25): perf tools: Make copyfile_offset() static perf machine: Optimize a bit the machine__findnew_thread() methods perf trace beauty madvise: Generate 'behavior' string table from kernel headers tools: Update asm-generic/mman-common.h copy from the kernel perf tools: Get all of tools/{arch,include}/ in the MANIFEST tools include: Do not use poison with C++ perf tools: Provide mutex wrappers for pthreads rwlocks perf mmap: Move perf_mmap and methods to separate mmap.[ch] files perf record: Make record__mmap_read generic perf mmap: Adopt push method from builtin-record.c perf tools: Do not check ABI headers in a detached tarball build perf tools: Introduce binary__fprintf() perf script: Use fprintf like printing uniformly perf namespaces: Add more appropriate set of headers perf script: Add a few missing conversions to fprintf style perf script: Use pr_debug where appropriate perf script: Use event_format__fprintf() perf evsel: Restore evsel->priv as a tool private area perf script: Allow creating per-event dump files tools include uapi: Grab a copy of linux/prctl.h perf trace beauty prctl: Generate 'option' string table from kernel headers perf script: Print information about per-event-dump files tools include uapi: Grab a copy of linux/kcmp.h perf trace beauty: Implement pid_fd beautifier perf trace beauty kcmp: Beautify arguments
Christophe JAILLET (2): perf script: Fix error handling path perf kmem: Perform some cleanup if '--time' is given an invalid value
David Ahern (1): perf sched timehist: Add pid and tid options
Ingo Molnar (1): kprobes: Don't spam the build log with deprecation warnings
Jiri Olsa (12): perf tools: Add python-clean target perf ui progress: Add ui specific init function perf ui progress: Add size info into progress bar perf tests attr: Fix task term values perf tests attr: Fix group stat tests perf tests attr: Make hw events optional perf annotate: Remove arch::cpuid_parse callback perf tools: Rename struct perf_data_file to perf_data perf tools: Add struct perf_data_file perf tools: Add perf_data_file__write function perf stat: Move the shadow stats scale computation in perf_stat__update_shadow_stats perf stat: Make --per-thread update shadow stats to show metrics
Kan Liang (7): perf tools: Use scandir() to replace readdir() perf machine: Use hashtable for machine threads perf tools: Lock to protect namespaces and comm list perf tools: Lock to protect comm_str rb tree perf top: Implement multithreading for perf_event__synthesize_threads perf top: Add option to set the number of thread for event synthesize perf vendor events: Add Goldmont Plus V1 event file
Kees Cook (1): lkdtm, kprobes: Convert from jprobes to kprobes
Martin Kepplinger (1): perf tools: Fix leaking rec_argv in error cases
Masami Hiramatsu (15): kprobes/x86: Make insn buffer always ROX and use text_poke() kprobes/x86: Remove addressof() operators kprobes: Improve smoke test to check preemptibility kprobes/x86: Move the get_kprobe_ctlblk() into irq-disabled block kprobes: Warn if optprobe handler tries to change execution path kprobes/x86: Disable preemption in optprobe kprobes/x86: Disable preemption in ftrace-based jprobes kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT=y kprobes: Disable the jprobes APIs kprobes: Disable the jprobes test code kprobes: Remove the jprobes sample code kprobes/docs: Remove jprobes related documents arm/kprobes: Fix kretprobe test to check correct counter arm/kprobes: Remove jprobe test case
Milian Wolff (15): perf report: Remove code to handle inline frames from browsers perf callchain: Store srcline in callchain_cursor_node perf callchain: Refactor inline_list to operate on symbols perf callchain: Refactor inline_list to store srcline string directly perf callchain: Create real callchain entries for inlined frames perf report: Fall-back to function name comparison for -g srcline perf callchain: Mark inlined frames in output by " (inlined)" suffix perf script: Mark inlined frames and do not print DSO for them perf callchain: Compare symbol name for inlined frames when matching perf report: Compare symbol name for inlined frames when sorting perf report: Properly handle branch count in match_chain() perf report: Cache failed lookups of inlined frames perf report: Cache srclines for callchain nodes perf report: Use srcline from callchain for hist entries perf util: Enable handling of inlined frames by default
Namhyung Kim (3): perf callchain: Fix double mapping al->addr for children without self period perf srcline: Fix memory leak in addr2inlines() perf srcline: Show correct function name for srcline of callchains
Naveen N. Rao (1): Revert "kprobes: Warn if optprobe handler tries to change execution path"
Peter Zijlstra (8): perf/core: Fix perf_event_read_value() locking perf/core: Update ctx time before detaching events perf/core: Fix __perf_read_group_add() locking perf/core: Make sure to update ctx time before using it perf/core: Rename 'enum perf_event_active_state' perf/core: Remove wrong barrier perf/core: Fix perf_event_read() perf/core: Rewrite event timekeeping
Taeung Song (2): perf config: Write a config file just once perf config: Allow creating empty config set for config file autogeneration
Thomas Richter (2): perf test attr: Fix python error on empty result perf test attr: Fix ignored test case result
Xiaochen Shen (1): perf tests: Remove Intel CQM perf test
Yonghong Song (1): perf/bpf: Extend the perf_event_read_local() interface, a.k.a. "bpf: perf event change needed for subsequent bpf helpers"
Documentation/kprobes.txt | 159 +-- arch/Kconfig | 2 +- arch/arm/probes/kprobes/test-core.c | 59 +- arch/x86/events/intel/core.c | 4 + arch/x86/events/perf_event.h | 24 +- arch/x86/include/asm/kprobes.h | 4 +- arch/x86/kernel/kprobes/common.h | 6 +- arch/x86/kernel/kprobes/core.c | 61 +- arch/x86/kernel/kprobes/ftrace.c | 32 +- arch/x86/kernel/kprobes/opt.c | 79 +- drivers/misc/lkdtm_core.c | 154 +-- include/linux/kprobes.h | 36 +- include/linux/perf_event.h | 32 +- kernel/bpf/arraymap.c | 2 +- kernel/events/core.c | 470 +++---- kernel/kprobes.c | 18 +- kernel/test_kprobes.c | 29 +- kernel/trace/bpf_trace.c | 2 +- samples/kprobes/Makefile | 2 +- samples/kprobes/jprobe_example.c | 67 - tools/include/linux/poison.h | 5 + tools/include/uapi/linux/kcmp.h | 27 + tools/include/uapi/linux/prctl.h | 200 +++ tools/perf/Documentation/perf-list.txt | 11 +- tools/perf/Documentation/perf-record.txt | 2 + tools/perf/Documentation/perf-report.txt | 3 +- tools/perf/Documentation/perf-sched.txt | 8 + tools/perf/Documentation/perf-script.txt | 11 +- tools/perf/Documentation/perf-stat.txt | 7 + tools/perf/Documentation/perf-top.txt | 3 + tools/perf/Makefile.perf | 39 +- tools/perf/arch/arm/annotate/instructions.c | 3 +- tools/perf/arch/arm64/annotate/instructions.c | 3 +- tools/perf/arch/powerpc/annotate/instructions.c | 4 +- tools/perf/arch/s390/annotate/instructions.c | 4 +- tools/perf/arch/x86/annotate/instructions.c | 14 + tools/perf/arch/x86/include/arch-tests.h | 1 - tools/perf/arch/x86/tests/Build | 1 - tools/perf/arch/x86/tests/arch-tests.c | 4 - tools/perf/builtin-annotate.c | 10 +- tools/perf/builtin-buildid-cache.c | 8 +- tools/perf/builtin-buildid-list.c | 16 +- tools/perf/builtin-c2c.c | 11 +- tools/perf/builtin-config.c | 22 +- tools/perf/builtin-diff.c | 18 +- tools/perf/builtin-evlist.c | 12 +- tools/perf/builtin-inject.c | 36 +- tools/perf/builtin-kmem.c | 11 +- tools/perf/builtin-kvm.c | 18 +- tools/perf/builtin-list.c | 7 + tools/perf/builtin-lock.c | 12 +- tools/perf/builtin-mem.c | 13 +- tools/perf/builtin-record.c | 159 +-- tools/perf/builtin-report.c | 14 +- tools/perf/builtin-sched.c | 28 +- tools/perf/builtin-script.c | 714 ++++++---- tools/perf/builtin-stat.c | 121 +- tools/perf/builtin-timechart.c | 18 +- tools/perf/builtin-top.c | 13 +- tools/perf/builtin-trace.c | 76 +- tools/perf/check-headers.sh | 7 + tools/perf/perf.h | 1 + .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 164 +++ .../arch/x86/broadwellde/bdwde-metrics.json | 164 +++ .../arch/x86/broadwellx/bdx-metrics.json | 164 +++ .../pmu-events/arch/x86/goldmontplus/cache.json | 1453 ++++++++++++++++++++ .../pmu-events/arch/x86/goldmontplus/frontend.json | 62 + .../pmu-events/arch/x86/goldmontplus/memory.json | 38 + .../pmu-events/arch/x86/goldmontplus/other.json | 98 ++ .../pmu-events/arch/x86/goldmontplus/pipeline.json | 544 ++++++++ .../arch/x86/goldmontplus/virtual-memory.json | 218 +++ .../pmu-events/arch/x86/haswell/hsw-metrics.json | 158 +++ .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 158 +++ .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 164 +++ .../pmu-events/arch/x86/ivytown/ivt-metrics.json | 164 +++ .../pmu-events/arch/x86/jaketown/jkt-metrics.json | 140 ++ tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + .../arch/x86/sandybridge/snb-metrics.json | 140 ++ .../pmu-events/arch/x86/skylake/skl-metrics.json | 164 +++ .../pmu-events/arch/x86/skylakex/skx-metrics.json | 164 +++ tools/perf/pmu-events/jevents.c | 24 +- tools/perf/pmu-events/jevents.h | 2 +- tools/perf/pmu-events/pmu-events.h | 1 + tools/perf/tests/attr.c | 2 +- tools/perf/tests/attr.py | 6 +- tools/perf/tests/attr/base-record | 2 +- tools/perf/tests/attr/test-record-group | 1 + tools/perf/tests/attr/test-record-group-sampling | 2 +- tools/perf/tests/attr/test-record-group1 | 1 + tools/perf/tests/attr/test-stat-C0 | 1 + tools/perf/tests/attr/test-stat-basic | 1 + tools/perf/tests/attr/test-stat-default | 4 + tools/perf/tests/attr/test-stat-detailed-1 | 8 + tools/perf/tests/attr/test-stat-detailed-2 | 13 + tools/perf/tests/attr/test-stat-detailed-3 | 13 + tools/perf/tests/attr/test-stat-group | 2 + tools/perf/tests/attr/test-stat-group1 | 2 + tools/perf/tests/attr/test-stat-no-inherit | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/mmap-thread-lookup.c | 2 +- tools/perf/tests/topology.c | 22 +- tools/perf/trace/beauty/Build | 2 + tools/perf/trace/beauty/beauty.h | 18 + tools/perf/trace/beauty/kcmp.c | 44 + tools/perf/trace/beauty/kcmp_type.sh | 10 + tools/perf/trace/beauty/madvise_behavior.sh | 10 + tools/perf/trace/beauty/mmap.c | 38 +- tools/perf/trace/beauty/prctl.c | 82 ++ tools/perf/trace/beauty/prctl_option.sh | 17 + tools/perf/ui/browsers/hists.c | 180 +-- tools/perf/ui/progress.c | 6 +- tools/perf/ui/progress.h | 12 +- tools/perf/ui/stdio/hist.c | 77 +- tools/perf/ui/tui/progress.c | 32 +- tools/perf/util/Build | 3 + tools/perf/util/annotate.c | 10 +- tools/perf/util/auxtrace.c | 4 +- tools/perf/util/callchain.c | 179 +-- tools/perf/util/callchain.h | 6 +- tools/perf/util/comm.c | 18 +- tools/perf/util/config.c | 5 +- tools/perf/util/data-convert-bt.c | 12 +- tools/perf/util/data.c | 95 +- tools/perf/util/data.h | 38 +- tools/perf/util/debug.c | 31 +- tools/perf/util/dso.c | 20 +- tools/perf/util/dso.h | 6 +- tools/perf/util/event.c | 162 ++- tools/perf/util/event.h | 3 +- tools/perf/util/evlist.c | 248 ---- tools/perf/util/evlist.h | 77 +- tools/perf/util/evsel.c | 7 +- tools/perf/util/evsel.h | 4 + tools/perf/util/evsel_fprintf.c | 37 +- tools/perf/util/header.c | 20 +- tools/perf/util/hist.c | 7 +- tools/perf/util/intel-bts.c | 6 +- tools/perf/util/intel-pt.c | 6 +- tools/perf/util/jit.h | 2 +- tools/perf/util/jitdump.c | 10 +- tools/perf/util/machine.c | 228 ++- tools/perf/util/machine.h | 33 +- tools/perf/util/map.c | 34 +- tools/perf/util/map.h | 3 +- tools/perf/util/metricgroup.c | 490 +++++++ tools/perf/util/metricgroup.h | 31 + tools/perf/util/mmap.c | 352 +++++ tools/perf/util/mmap.h | 97 ++ tools/perf/util/namespaces.c | 1 + tools/perf/util/namespaces.h | 5 +- tools/perf/util/parse-events.c | 29 +- tools/perf/util/parse-events.h | 3 + tools/perf/util/parse-events.l | 3 +- tools/perf/util/pmu.c | 55 +- tools/perf/util/pmu.h | 2 + tools/perf/util/print_binary.c | 30 +- tools/perf/util/print_binary.h | 18 +- tools/perf/util/probe-file.c | 1 + tools/perf/util/python-ext-sources | 1 + tools/perf/util/rb_resort.h | 5 +- tools/perf/util/rwsem.c | 32 + tools/perf/util/rwsem.h | 19 + tools/perf/util/session.c | 46 +- tools/perf/util/session.h | 4 +- tools/perf/util/sort.c | 6 + tools/perf/util/sort.h | 1 - tools/perf/util/srcline.c | 296 +++- tools/perf/util/srcline.h | 26 +- tools/perf/util/stat-shadow.c | 158 ++- tools/perf/util/stat.c | 24 +- tools/perf/util/stat.h | 6 +- tools/perf/util/symbol.c | 9 +- tools/perf/util/symbol.h | 2 + tools/perf/util/thread.c | 57 +- tools/perf/util/thread.h | 3 + tools/perf/util/top.h | 1 + tools/perf/util/trace-event-info.c | 1 - tools/perf/util/trace-event-read.c | 1 - tools/perf/util/util.c | 16 +- tools/perf/util/util.h | 7 +- tools/perf/util/vdso.c | 4 +- tools/perf/util/zlib.c | 1 + 182 files changed, 8370 insertions(+), 2521 deletions(-) delete mode 100644 samples/kprobes/jprobe_example.c create mode 100644 tools/include/uapi/linux/kcmp.h create mode 100644 tools/include/uapi/linux/prctl.h create mode 100644 tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/other.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json create mode 100644 tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json create mode 100644 tools/perf/trace/beauty/kcmp.c create mode 100755 tools/perf/trace/beauty/kcmp_type.sh create mode 100755 tools/perf/trace/beauty/madvise_behavior.sh create mode 100644 tools/perf/trace/beauty/prctl.c create mode 100755 tools/perf/trace/beauty/prctl_option.sh create mode 100644 tools/perf/util/metricgroup.c create mode 100644 tools/perf/util/metricgroup.h create mode 100644 tools/perf/util/mmap.c create mode 100644 tools/perf/util/mmap.h create mode 100644 tools/perf/util/rwsem.c create mode 100644 tools/perf/util/rwsem.h
| |