[GIT pull] perf updates for 4.17
Linus, please pull the latest perf-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus The perf update contains the following bits: x86: - Prevent setting freeze_on_smi on PerfMon V1 CPUs to avoid #GP perf stat: - Keep the '/' event modifier separator in fallback, for example when fallbacking from 'cpu/cpu-cycles/' to user level only, where it should become 'cpu/cpu-cycles/u' and not 'cpu/cpu-cycles/:u' (Jiri Olsa) - Fix PMU events parsing rule, improving error reporting for invalid events (Jiri Olsa) - Disable write_backward and other event attributes for !group events in a group, fixing, for instance this group: '{cycles,msr/aperf/}:S' that has leader sampling (:S) and where just the 'cycles', the leader event, should have the write_backward attribute set, in this case it all fails because the PMU where 'msr/aperf/' lives doesn't accepts write_backward style sampling (Jiri Olsa) - Only fall back group read for leader (Kan Liang) - Fix core PMU alias list for x86 platform (Kan Liang) - Print out hint for mixed PMU group error (Kan Liang) - Fix duplicate PMU name for interval print (Kan Liang) Core: - Set main kernel end address properly when reading kernel and module maps (Namhyung Kim) perf mem: - Fix incorrect entries and add missing man options (Sangwon Hong) s/390: - Remove s390 specific strcmp_cpuid_cmp function (Thomas Richter) - Adapt 'perf test' case record+probe_libc_inet_pton.sh for s390 - Fix s390 undefined record__auxtrace_init() return value in 'perf record' (Thomas Richter) Thanks, tglx --> Jiri Olsa (3): perf stat: Keep the / modifier separator in fallback perf pmu: Fix pmu events parsing rule perf evsel: Disable write_backward for leader sampling group events Kan Liang (5): perf pmu: Fix core PMU alias list for X86 platform perf stat: Print out hint for mixed PMU group error perf evsel: Only fall back group read for leader perf stat: Fix duplicate PMU name for interval print perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1 Namhyung Kim (1): perf machine: Set main kernel end address properly Sangwon Hong (1): perf mem: Document incorrect and missing options Thomas Richter (3): perf list: Remove s390 specific strcmp_cpuid_cmp function perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 perf record: Fix s390 undefined record__auxtrace_init() return value arch/x86/events/intel/core.c | 9 +++-- tools/perf/Documentation/perf-mem.txt | 41 +++--- tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/s390/util/header.c | 18 -- tools/perf/builtin-stat.c | 40 +++-- tools/perf/pmu-events/arch/s390/mapfile.csv| 10 +++--- tools/perf/tests/attr/test-record-group-sampling | 3 ++ .../tests/shell/record+probe_libc_inet_pton.sh | 6 ++-- tools/perf/util/evsel.c| 18 +++--- tools/perf/util/evsel.h| 1 + tools/perf/util/machine.c | 30 +--- tools/perf/util/parse-events.y | 8 ++--- tools/perf/util/pmu.c | 22 +--- 13 files changed, 129 insertions(+), 78 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 607bf565a90c..707b2a96e516 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3339,7 +3339,8 @@ static void intel_pmu_cpu_starting(int cpu) cpuc->lbr_sel = NULL; - flip_smm_bit(_pmu.attr_freeze_on_smi); + if (x86_pmu.version > 1) + flip_smm_bit(_pmu.attr_freeze_on_smi); if (!cpuc->shared_regs) return; @@ -3502,6 +3503,8 @@ static __initconst const struct x86_pmu core_pmu = { .cpu_dying = intel_pmu_cpu_dying, }; +static struct attribute *intel_pmu_attrs[]; + static __initconst const struct x86_pmu intel_pmu = { .name = "Intel", .handle_irq = intel_pmu_handle_irq, @@ -3533,6 +3536,8 @@ static __initconst const struct x86_pmu intel_pmu = { .format_attrs = intel_arch3_formats_attr, .events_sysfs_show = intel_event_sysfs_show, + .attrs = intel_pmu_attrs, + .cpu_prepare= intel_pmu_cpu_prepare, .cpu_starting = intel_pmu_cpu_starting, .cpu_dying = intel_pmu_cpu_dying, @@ -3911,8 +3916,6 @@ __init int intel_pmu_init(void) x86_pmu.max_pebs_events =
[GIT pull] perf updates for 4.17
Linus, please pull the latest perf-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus The perf update contains the following bits: x86: - Prevent setting freeze_on_smi on PerfMon V1 CPUs to avoid #GP perf stat: - Keep the '/' event modifier separator in fallback, for example when fallbacking from 'cpu/cpu-cycles/' to user level only, where it should become 'cpu/cpu-cycles/u' and not 'cpu/cpu-cycles/:u' (Jiri Olsa) - Fix PMU events parsing rule, improving error reporting for invalid events (Jiri Olsa) - Disable write_backward and other event attributes for !group events in a group, fixing, for instance this group: '{cycles,msr/aperf/}:S' that has leader sampling (:S) and where just the 'cycles', the leader event, should have the write_backward attribute set, in this case it all fails because the PMU where 'msr/aperf/' lives doesn't accepts write_backward style sampling (Jiri Olsa) - Only fall back group read for leader (Kan Liang) - Fix core PMU alias list for x86 platform (Kan Liang) - Print out hint for mixed PMU group error (Kan Liang) - Fix duplicate PMU name for interval print (Kan Liang) Core: - Set main kernel end address properly when reading kernel and module maps (Namhyung Kim) perf mem: - Fix incorrect entries and add missing man options (Sangwon Hong) s/390: - Remove s390 specific strcmp_cpuid_cmp function (Thomas Richter) - Adapt 'perf test' case record+probe_libc_inet_pton.sh for s390 - Fix s390 undefined record__auxtrace_init() return value in 'perf record' (Thomas Richter) Thanks, tglx --> Jiri Olsa (3): perf stat: Keep the / modifier separator in fallback perf pmu: Fix pmu events parsing rule perf evsel: Disable write_backward for leader sampling group events Kan Liang (5): perf pmu: Fix core PMU alias list for X86 platform perf stat: Print out hint for mixed PMU group error perf evsel: Only fall back group read for leader perf stat: Fix duplicate PMU name for interval print perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1 Namhyung Kim (1): perf machine: Set main kernel end address properly Sangwon Hong (1): perf mem: Document incorrect and missing options Thomas Richter (3): perf list: Remove s390 specific strcmp_cpuid_cmp function perf test: Adapt test case record+probe_libc_inet_pton.sh for s390 perf record: Fix s390 undefined record__auxtrace_init() return value arch/x86/events/intel/core.c | 9 +++-- tools/perf/Documentation/perf-mem.txt | 41 +++--- tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/s390/util/header.c | 18 -- tools/perf/builtin-stat.c | 40 +++-- tools/perf/pmu-events/arch/s390/mapfile.csv| 10 +++--- tools/perf/tests/attr/test-record-group-sampling | 3 ++ .../tests/shell/record+probe_libc_inet_pton.sh | 6 ++-- tools/perf/util/evsel.c| 18 +++--- tools/perf/util/evsel.h| 1 + tools/perf/util/machine.c | 30 +--- tools/perf/util/parse-events.y | 8 ++--- tools/perf/util/pmu.c | 22 +--- 13 files changed, 129 insertions(+), 78 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 607bf565a90c..707b2a96e516 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3339,7 +3339,8 @@ static void intel_pmu_cpu_starting(int cpu) cpuc->lbr_sel = NULL; - flip_smm_bit(_pmu.attr_freeze_on_smi); + if (x86_pmu.version > 1) + flip_smm_bit(_pmu.attr_freeze_on_smi); if (!cpuc->shared_regs) return; @@ -3502,6 +3503,8 @@ static __initconst const struct x86_pmu core_pmu = { .cpu_dying = intel_pmu_cpu_dying, }; +static struct attribute *intel_pmu_attrs[]; + static __initconst const struct x86_pmu intel_pmu = { .name = "Intel", .handle_irq = intel_pmu_handle_irq, @@ -3533,6 +3536,8 @@ static __initconst const struct x86_pmu intel_pmu = { .format_attrs = intel_arch3_formats_attr, .events_sysfs_show = intel_event_sysfs_show, + .attrs = intel_pmu_attrs, + .cpu_prepare= intel_pmu_cpu_prepare, .cpu_starting = intel_pmu_cpu_starting, .cpu_dying = intel_pmu_cpu_dying, @@ -3911,8 +3916,6 @@ __init int intel_pmu_init(void) x86_pmu.max_pebs_events =
[GIT pull] perf updates for 4.17
Linus, please pull the latest perf-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus A rather large set of perf updates: - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo) e.g: See what 'openat' syscalls are failing: # perf trace --failure -e openat 762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory 790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory ^C# - Show information about the event (freq, nr_samples, total period/nr_events) in the annotate --tui and --stdio2 'perf annotate' output, similar to the first line in the 'perf report --tui', but just for the samples for a the annotated symbol (Arnaldo Carvalho de Melo) - Introduce 'perf version --build-options' to show what features were linked, aliased as well as a shorter 'perf -vv' (Jin Yao) - Add a "dso_size" sort order (Kim Phillips) - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du) - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo) - Show group details on the title line in the annotate browser and 'perf annotate --stdio2' output, so that the per-event columns can have headers (Arnaldo Carvalho de Melo) - Fixup vertical line separating metrics from instructions and cleaning unused lines at the bottom, both in the annotate TUI browser (Arnaldo Carvalho de Melo) - Remove duplicated 'samples' in lost samples warning in 'perf report' (Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing the perf build process, automagically adding support for the new DRM_I915_QUERY ioctl (Arnaldo Carvalho de Melo) - Make auxtrace_queues__add_buffer() allocate struct buffer, from a patchkit already applied (Adrian Hunter) . Fix the --stdio2/TUI annotate output to include group details, be it for a recorded '{a,b,f}' explicit event group or when forcing group display using 'perf report --group' for a set of events not recorded as a group (Arnaldo Carvalho de Melo) . Fix display artifacts in the ui browser (base class for the annotate and main report/top TUI browser) related to the extra title lines work (Arnaldo Carvalho de Melo) . perf auxtrace refactorings, leftovers from a previously partially processed patchset (Adrian Hunter) . Fix the builtin clang build (Sandipan Das, Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing a perf build warning and in the process automagically adding support for a new ioctl command (Arnaldo Carvalho de Melo) - Fix various initialization issues - Prevent creating [ku]probes for not CAP_SYS_ADMIN users - Fix a strncpy issue in uprobe tracing Thanks, tglx --> Adrian Hunter (2): perf auxtrace: Make auxtrace_queues__add_buffer() allocate struct buffer perf auxtrace: Make auxtrace_queues__add_buffer() do CPU filtering Arnaldo Carvalho de Melo (17): tools headers: Synchronize x86's cpufeatures.h perf trace: Show only failing syscalls perf hists browser: Rename perf_evsel_browser_title to a more descriptive name perf hists: Introduce hists__scnprint_title() perf hists: Move hists__scnprintf_title() away from the TUI code perf ui browser: Move the extra title lines from the hists browser perf annotate: Introduce annotation__scnprintf_samples_period() method perf annotate browser: Show extra title line with event information perf annotate stdio2: Print more descriptive event information header perf annotate: Show group details on the title line perf annotate browser: Fixup vertical line separating metrics from instructions perf ui browser: Fixup cleaning unused lines at the bottom perf report: Remove duplicated 'samples' in lost samples warning tools headers uapi: Synchronize i915_drm.h perf hists browser: Show extra_title_lines in the 'D' debug hotkey perf hists browser: Remove leftover from row returned from refresh perf tools: No need to include namespaces.h in util.h Changbin Du (1): perf trace: Remove redundant ')' Jin Yao (5): perf config: Add some new -DHAVE_XXX to CFLAGS perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT perf version: Print the compiled-in status of libraries perf tools: Add 'perf -vv' as an alias to 'perf version --build-options' perf version: Add man page Jiri Olsa (1): tools include: Add config.h header file Kim Phillips (1): perf tools: Add a "dso_size" sort order Masami Hiramatsu (2):
[GIT pull] perf updates for 4.17
Linus, please pull the latest perf-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus A rather large set of perf updates: - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo) e.g: See what 'openat' syscalls are failing: # perf trace --failure -e openat 762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory 790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory ^C# - Show information about the event (freq, nr_samples, total period/nr_events) in the annotate --tui and --stdio2 'perf annotate' output, similar to the first line in the 'perf report --tui', but just for the samples for a the annotated symbol (Arnaldo Carvalho de Melo) - Introduce 'perf version --build-options' to show what features were linked, aliased as well as a shorter 'perf -vv' (Jin Yao) - Add a "dso_size" sort order (Kim Phillips) - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du) - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo) - Show group details on the title line in the annotate browser and 'perf annotate --stdio2' output, so that the per-event columns can have headers (Arnaldo Carvalho de Melo) - Fixup vertical line separating metrics from instructions and cleaning unused lines at the bottom, both in the annotate TUI browser (Arnaldo Carvalho de Melo) - Remove duplicated 'samples' in lost samples warning in 'perf report' (Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing the perf build process, automagically adding support for the new DRM_I915_QUERY ioctl (Arnaldo Carvalho de Melo) - Make auxtrace_queues__add_buffer() allocate struct buffer, from a patchkit already applied (Adrian Hunter) . Fix the --stdio2/TUI annotate output to include group details, be it for a recorded '{a,b,f}' explicit event group or when forcing group display using 'perf report --group' for a set of events not recorded as a group (Arnaldo Carvalho de Melo) . Fix display artifacts in the ui browser (base class for the annotate and main report/top TUI browser) related to the extra title lines work (Arnaldo Carvalho de Melo) . perf auxtrace refactorings, leftovers from a previously partially processed patchset (Adrian Hunter) . Fix the builtin clang build (Sandipan Das, Arnaldo Carvalho de Melo) - Synchronize i915_drm.h, silencing a perf build warning and in the process automagically adding support for a new ioctl command (Arnaldo Carvalho de Melo) - Fix various initialization issues - Prevent creating [ku]probes for not CAP_SYS_ADMIN users - Fix a strncpy issue in uprobe tracing Thanks, tglx --> Adrian Hunter (2): perf auxtrace: Make auxtrace_queues__add_buffer() allocate struct buffer perf auxtrace: Make auxtrace_queues__add_buffer() do CPU filtering Arnaldo Carvalho de Melo (17): tools headers: Synchronize x86's cpufeatures.h perf trace: Show only failing syscalls perf hists browser: Rename perf_evsel_browser_title to a more descriptive name perf hists: Introduce hists__scnprint_title() perf hists: Move hists__scnprintf_title() away from the TUI code perf ui browser: Move the extra title lines from the hists browser perf annotate: Introduce annotation__scnprintf_samples_period() method perf annotate browser: Show extra title line with event information perf annotate stdio2: Print more descriptive event information header perf annotate: Show group details on the title line perf annotate browser: Fixup vertical line separating metrics from instructions perf ui browser: Fixup cleaning unused lines at the bottom perf report: Remove duplicated 'samples' in lost samples warning tools headers uapi: Synchronize i915_drm.h perf hists browser: Show extra_title_lines in the 'D' debug hotkey perf hists browser: Remove leftover from row returned from refresh perf tools: No need to include namespaces.h in util.h Changbin Du (1): perf trace: Remove redundant ')' Jin Yao (5): perf config: Add some new -DHAVE_XXX to CFLAGS perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT perf version: Print the compiled-in status of libraries perf tools: Add 'perf -vv' as an alias to 'perf version --build-options' perf version: Add man page Jiri Olsa (1): tools include: Add config.h header file Kim Phillips (1): perf tools: Add a "dso_size" sort order Masami Hiramatsu (2):