26 Mar, 2020

1 commit

  • Add the following CET instructions to the opcode map:

    INCSSP:
    Increment Shadow Stack pointer (SSP).

    RDSSP:
    Read SSP into a GPR.

    SAVEPREVSSP:
    Use "previous ssp" token at top of current Shadow Stack (SHSTK) to
    create a "restore token" on the previous (outgoing) SHSTK.

    RSTORSSP:
    Restore from a "restore token" to SSP.

    WRSS:
    Write to kernel-mode SHSTK (kernel-mode instruction).

    WRUSS:
    Write to user-mode SHSTK (kernel-mode instruction).

    SETSSBSY:
    Verify the "supervisor token" pointed by MSR_IA32_PL0_SSP, set the
    token busy, and set then Shadow Stack pointer(SSP) to the value of
    MSR_IA32_PL0_SSP.

    CLRSSBSY:
    Verify the "supervisor token" and clear its busy bit.

    ENDBR64/ENDBR32:
    Mark a valid 64/32 bit control transfer endpoint.

    Detailed information of CET instructions can be found in Intel Software
    Developer's Manual.

    Signed-off-by: Yu-cheng Yu
    Signed-off-by: Borislav Petkov
    Reviewed-by: Adrian Hunter
    Reviewed-by: Tony Luck
    Acked-by: Masami Hiramatsu
    Link: https://lkml.kernel.org/r/20200204171425.28073-2-yu-cheng.yu@intel.com

    Yu-cheng Yu
     

27 Feb, 2020

2 commits

  • Picking the changes from:

    5ef8acbdd687 ("KVM: nVMX: Emulate MTF when performing instruction emulation")

    Silencing this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
    diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h

    No change in tooling ensues, just the x86 kvm tooling gets rebuilt as
    those headers are included in its build:

    $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h
    $ make -C tools/perf
    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j12' parallel build

    Auto-detecting system features:
    ... dwarf: [ on ]

    ... disassembler-four-args: [ on ]

    DESCEND plugins
    CC /tmp/build/perf/arch/x86/util/kvm-stat.o

    LD /tmp/build/perf/arch/x86/util/perf-in.o
    LD /tmp/build/perf/arch/x86/perf-in.o
    LD /tmp/build/perf/arch/perf-in.o
    LD /tmp/build/perf/perf-in.o
    LINK /tmp/build/perf/perf

    $

    As it doesn't seem to be used there:

    $ grep STATE tools/perf/arch/x86/util/kvm-stat.c
    $

    And the 'perf trace' beautifier table generator isn't interested in
    these things:

    $ grep regex= tools/perf/trace/beauty/kvm_ioctl.sh
    regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
    $

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Oliver Upton
    Cc: Paolo Bonzini
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the changes from these csets:

    21b5ee59ef18 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF")

    $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
    $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
    $ git diff
    diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h
    index ebe1685e92dd..d5e517d1c3dd 100644
    --- a/tools/arch/x86/include/asm/msr-index.h
    +++ b/tools/arch/x86/include/asm/msr-index.h
    @@ -512,6 +512,8 @@
    #define MSR_K7_HWCR 0xc0010015
    #define MSR_K7_HWCR_SMMLOCK_BIT 0
    #define MSR_K7_HWCR_SMMLOCK BIT_ULL(MSR_K7_HWCR_SMMLOCK_BIT)
    +#define MSR_K7_HWCR_IRPERF_EN_BIT 30
    +#define MSR_K7_HWCR_IRPERF_EN BIT_ULL(MSR_K7_HWCR_IRPERF_EN_BIT)
    #define MSR_K7_FID_VID_CTL 0xc0010041
    #define MSR_K7_FID_VID_STATUS 0xc0010042
    $

    That don't result in any change in tooling:

    $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
    $ diff -u before after
    $

    To silence this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
    diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Jiri Olsa
    Cc: Kim Phillips
    Cc: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Feb, 2020

4 commits

  • To pick up the changes from:

    290a6bb06de9 ("arm64: KVM: Add UAPI notes for swapped registers")

    No tools changes are caused by this.

    This addresses these tools/perf build warnings:

    Cc: Adrian Hunter
    Cc: Andrew Jones
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the changes from:

    85c17291e2eb ("x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured")
    f444a5ff95dc ("x86/cpufeatures: Add support for fast short REP; MOVSB")

    These don't cause any changes in tooling, just silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Sean Christopherson
    Cc: Tony Luck
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To silence the following tools/perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
    diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h

    Picking up the changes in:

    45fc24e89b7c ("x86/mpx: remove MPX from arch/x86")

    that didn't entail any functionality change in the tooling side.

    Cc: Adrian Hunter
    Cc: Dave Hansen
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To get the changes in:

    3e3c8ca5a351 ("arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers")

    Silencing this tools/perf/ build warning:

    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/unistd.h' differs from latest version at 'arch/arm64/include/uapi/asm/unistd.h'
    diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/uapi/asm/unistd.h

    Which will probably end up enabling the use of "clone3" in 'perf trace -e',
    haven't checked the build with this change on an arm64 system.

    Cc: Adrian Hunter
    Cc: Amanieu d'Antras
    Cc: Christian Brauner
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Feb, 2020

2 commits

  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes:

    - three fixes and a cleanup for the resctrl code

    - a HyperV fix

    - a fix to /proc/kcore contents in live debugging sessions

    - a fix for the x86 decoder opcode map"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/decoder: Add TEST opcode to Group3-2
    x86/resctrl: Clean up unused function parameter in mkdir path
    x86/resctrl: Fix a deadlock due to inaccurate reference
    x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup
    x86/resctrl: Fix use-after-free when deleting resource groups
    x86/hyper-v: Add "polling" bit to hv_synic_sint
    x86/crash: Define arch_crash_save_vmcoreinfo() if CONFIG_CRASH_CORE=y

    Linus Torvalds
     
  • Pull KVM updates from Paolo Bonzini:
    "This is the first batch of KVM changes.

    ARM:
    - cleanups and corner case fixes.

    PPC:
    - Bugfixes

    x86:
    - Support for mapping DAX areas with large nested page table entries.

    - Cleanups and bugfixes here too. A particularly important one is a
    fix for FPU load when the thread has TIF_NEED_FPU_LOAD. There is
    also a race condition which could be used in guest userspace to
    exploit the guest kernel, for which the embargo expired today.

    - Fast path for IPI delivery vmexits, shaving about 200 clock cycles
    from IPI latency.

    - Protect against "Spectre-v1/L1TF" (bring data in the cache via
    speculative out of bound accesses, use L1TF on the sibling
    hyperthread to read it), which unfortunately is an even bigger
    whack-a-mole game than SpectreV1.

    Sean continues his mission to rewrite KVM. In addition to a sizable
    number of x86 patches, this time he contributed a pretty large
    refactoring of vCPU creation that affects all architectures but should
    not have any visible effect.

    s390 will come next week together with some more x86 patches"

    * tag 'kvm-5.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
    x86/KVM: Clean up host's steal time structure
    x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed
    x86/kvm: Cache gfn to pfn translation
    x86/kvm: Introduce kvm_(un)map_gfn()
    x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit
    KVM: PPC: Book3S PR: Fix -Werror=return-type build failure
    KVM: PPC: Book3S HV: Release lock on page-out failure path
    KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer
    KVM: arm64: pmu: Only handle supported event counters
    KVM: arm64: pmu: Fix chained SW_INCR counters
    KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled
    KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset
    KVM: x86: Use a typedef for fastop functions
    KVM: X86: Add 'else' to unify fastop and execute call path
    KVM: x86: inline memslot_valid_for_gpte
    KVM: x86/mmu: Use huge pages for DAX-backed files
    KVM: x86/mmu: Remove lpage_is_disallowed() check from set_spte()
    KVM: x86/mmu: Fold max_mapping_level() into kvm_mmu_hugepage_adjust()
    KVM: x86/mmu: Zap any compound page when collapsing sptes
    KVM: x86/mmu: Remove obsolete gfn restoration in FNAME(fetch)
    ...

    Linus Torvalds
     

29 Jan, 2020

1 commit

  • Pull x86 cpu-features updates from Ingo Molnar:
    "The biggest change in this cycle was a large series from Sean
    Christopherson to clean up the handling of VMX features. This both
    fixes bugs/inconsistencies and makes the code more coherent and
    future-proof.

    There are also two cleanups and a minor TSX syslog messages
    enhancement"

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
    x86/cpu: Remove redundant cpu_detect_cache_sizes() call
    x86/cpu: Print "VMX disabled" error message iff KVM is enabled
    KVM: VMX: Allow KVM_INTEL when building for Centaur and/or Zhaoxin CPUs
    perf/x86: Provide stubs of KVM helpers for non-Intel CPUs
    KVM: VMX: Use VMX_FEATURE_* flags to define VMCS control bits
    KVM: VMX: Check for full VMX support when verifying CPU compatibility
    KVM: VMX: Use VMX feature flag to query BIOS enabling
    KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR
    x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured
    x86/cpu: Set synthetic VMX cpufeatures during init_ia32_feat_ctl()
    x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_*
    x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs
    x86/vmx: Introduce VMX_FEATURES_*
    x86/cpu: Clear VMX feature flag if VMX is not fully enabled
    x86/zhaoxin: Use common IA32_FEAT_CTL MSR initialization
    x86/centaur: Use common IA32_FEAT_CTL MSR initialization
    x86/mce: WARN once if IA32_FEAT_CTL MSR is left unlocked
    x86/intel: Initialize IA32_FEAT_CTL MSR at boot
    tools/x86: Sync msr-index.h from kernel sources
    selftests, kvm: Replace manual MSR defs with common msr-index.h
    ...

    Linus Torvalds
     

22 Jan, 2020

1 commit

  • Add TEST opcode to Group3-2 reg=001b as same as Group3-1 does.

    Commit

    12a78d43de76 ("x86/decoder: Add new TEST instruction pattern")

    added a TEST opcode assignment to f6 XX/001/XXX (Group 3-1), but did
    not add f7 XX/001/XXX (Group 3-2).

    Actually, this TEST opcode variant (ModRM.reg /1) is not described in
    the Intel SDM Vol2 but in AMD64 Architecture Programmer's Manual Vol.3,
    Appendix A.2 Table A-6. ModRM.reg Extensions for the Primary Opcode Map.

    Without this fix, Randy found a warning by insn_decoder_test related
    to this issue as below.

    HOSTCC arch/x86/tools/insn_decoder_test
    HOSTCC arch/x86/tools/insn_sanity
    TEST posttest
    arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this.
    arch/x86/tools/insn_decoder_test: warning: ffffffff81000bf1: f7 0b 00 01 08 00 testl $0x80100,(%rbx)
    arch/x86/tools/insn_decoder_test: warning: objdump says 6 bytes, but insn_get_length() says 2
    arch/x86/tools/insn_decoder_test: warning: Decoded and checked 11913894 instructions with 1 failures
    TEST posttest
    arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x871ce29c)

    To fix this error, add the TEST opcode according to AMD64 APM Vol.3.

    [ bp: Massage commit message. ]

    Reported-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Borislav Petkov
    Acked-by: Randy Dunlap
    Tested-by: Randy Dunlap
    Link: https://lkml.kernel.org/r/157966631413.9580.10311036595431878351.stgit@devnote2

    Masami Hiramatsu
     

14 Jan, 2020

1 commit

  • Sync msr-index.h to pull in recent renames of the IA32_FEATURE_CONTROL
    MSR definitions. Update KVM's VMX selftest and turbostat accordingly.
    Keep the full name in turbostat's output to avoid breaking someone's
    workflow, e.g. if a script is looking for the full name.

    While using the renamed defines is by no means necessary, do the sync
    now to avoid leaving a landmine that will get stepped on the next time
    msr-index.h needs to be refreshed for some other reason.

    No functional change intended.

    Signed-off-by: Sean Christopherson
    Signed-off-by: Borislav Petkov
    Link: https://lkml.kernel.org/r/20191221044513.21680-4-sean.j.christopherson@intel.com

    Sean Christopherson
     

09 Jan, 2020

1 commit


03 Dec, 2019

1 commit

  • To pick up the changes from:

    a25bbc2644f0 ("Merge branches 'x86-cpu-for-linus' and 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
    db4d30fbb71b ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure")
    1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort")
    9d40b85bb46a ("x86/cpufeatures: Add feature bit RDPRU on AMD")

    These don't cause any changes in tooling, just silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    Cc: Adrian Hunter
    Cc: Babu Moger
    Cc: Borislav Petkov
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Pawan Gupta
    Cc: Thomas Gleixner
    Cc: Vineela Tummalapalli
    Link: https://lkml.kernel.org/n/tip-yufg9yt2nbkh45r9xvxnnscq@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 Dec, 2019

3 commits

  • To pick up the changes from:

    14edff88315a Merge tag 'kvmarm-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
    a4b28f5c6798 Merge remote-tracking branch 'kvmarm/kvm-arm64/stolen-time' into kvmarm-master/next
    58772e9a3db7 ("KVM: arm64: Provide VCPU attributes for stolen time")
    da345174ceca ("KVM: arm/arm64: Allow user injection of external data aborts")
    c726200dd106 ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace")
    efe5ddcae496 ("KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs")

    No tools changes are caused by this, as the only defines so far used
    from these files are for syscall arg pretty printing are:

    $ grep KVM tools/perf/trace/beauty/*.sh
    tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
    $

    Some are also include by:

    tools/perf/arch/x86/util/kvm-stat.c
    tools/perf/arch/powerpc/util/kvm-stat.c

    This addresses these tools/perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
    diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
    Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
    diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h

    Cc: Adrian Hunter
    Cc: Christoffer Dall
    Cc: Fabiano Rosas
    Cc: Greg Kurz
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Steven Price
    Link: https://lkml.kernel.org/n/tip-qrjdudhq25mk5bfnhveofbm4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the changes from these csets:

    3f3c8be973af Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
    4e3f77d8419b ("xen/mcelog: add PPIN to record when available")
    db4d30fbb71b ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure")
    1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort")
    c2955f270a84 ("x86/msr: Add the IA32_TSX_CTRL MSR")

    These are the changes in tooling that this udpate ensues:

    $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/before
    $
    $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
    $
    $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/after
    $ diff -u /tmp/before /tmp/after
    --- /tmp/before 2019-12-02 11:54:44.371035723 -0300
    +++ /tmp/after 2019-12-02 11:55:31.847859784 -0300
    @@ -48,6 +48,7 @@
    [0x00000119] = "IA32_BBL_CR_CTL",
    [0x0000011e] = "IA32_BBL_CR_CTL3",
    [0x00000120] = "IDT_MCR_CTRL",
    + [0x00000122] = "IA32_TSX_CTRL",
    [0x00000140] = "MISC_FEATURES_ENABLES",
    [0x00000174] = "IA32_SYSENTER_CS",
    [0x00000175] = "IA32_SYSENTER_ESP",
    @@ -283,4 +284,6 @@
    [0xc0010240 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTL",
    [0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR",
    [0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC",
    + [0xc00102f0 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN_CTL",
    + [0xc00102f1 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN",
    };
    $

    CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o
    LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o
    LD /tmp/build/perf/trace/beauty/perf-in.o
    LD /tmp/build/perf/perf-in.o

    Now it is possible to use these strings when setting up filters for the msr:*
    tracepoints, like:

    # perf trace -e msr:* --filter=msr==IA32_TSX_CTRL
    ^C[root@quaco ~]#

    If we use an invalid operator we can check what is the filter that is put in
    place:

    # perf trace -e msr:* --filter=msr=IA32_TSX_CTRL
    Failed to set filter "(msr=0x122) && (common_pid != 25976 && common_pid != 25860)" on event msr:read_msr with 22 (Invalid argument)

    One can as well use -v to see the tracepoints and its filters:

    # perf trace -v -e msr:* --filter=msr==IA32_TSX_CTRL
    Using CPUID GenuineIntel-6-8E-A
    New filter for msr:read_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
    New filter for msr:write_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
    New filter for msr:rdpmc: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
    mmap size 528384B
    ^C#

    Better than keep looking up those numbers, works with callchains as
    well, e.g. for something more common:

    # perf trace -e msr:*/max-stack=16/ --filter="msr==IA32_SPEC_CTRL" --max-events=2
    0.000 SCTP timer/6158 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
    do_trace_write_msr ([kernel.kallsyms])
    do_trace_write_msr ([kernel.kallsyms])
    __switch_to_xtra ([kernel.kallsyms])
    __switch_to ([kernel.kallsyms])
    __sched_text_start ([kernel.kallsyms])
    schedule ([kernel.kallsyms])
    schedule_hrtimeout_range_clock ([kernel.kallsyms])
    poll_schedule_timeout.constprop.0 ([kernel.kallsyms])
    do_select ([kernel.kallsyms])
    core_sys_select ([kernel.kallsyms])
    kern_select ([kernel.kallsyms])
    __x64_sys_select ([kernel.kallsyms])
    do_syscall_64 ([kernel.kallsyms])
    entry_SYSCALL_64 ([kernel.kallsyms])
    __select (/usr/lib64/libc-2.29.so)
    [0] ([unknown])
    0.024 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL)
    do_trace_write_msr ([kernel.kallsyms])
    do_trace_write_msr ([kernel.kallsyms])
    __switch_to_xtra ([kernel.kallsyms])
    __switch_to ([kernel.kallsyms])
    __sched_text_start ([kernel.kallsyms])
    schedule_idle ([kernel.kallsyms])
    do_idle ([kernel.kallsyms])
    cpu_startup_entry ([kernel.kallsyms])
    start_secondary ([kernel.kallsyms])
    [0x2000d4] ([kernel.kallsyms])
    #

    Cc: Adrian Hunter
    Cc: Jan Beulich
    Cc: Jiri Olsa
    Cc: Juergen Gross
    Cc: Namhyung Kim
    Cc: Pawan Gupta
    Cc: Thomas Gleixner
    Cc: Vineela Tummalapalli
    Link: https://lkml.kernel.org/n/tip-n1xd78fpd5lxn4q1brqi2jl6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • And update linux/linkage.h, which requires in turn that we make these
    files switch from ENTRY()/ENDPROC() to SYM_FUNC_START()/SYM_FUNC_END():

    tools/perf/arch/arm64/tests/regs_load.S
    tools/perf/arch/arm/tests/regs_load.S
    tools/perf/arch/powerpc/tests/regs_load.S
    tools/perf/arch/x86/tests/regs_load.S

    We also need to switch SYM_FUNC_START_LOCAL() to SYM_FUNC_START() for
    the functions used directly by 'perf bench', and update
    tools/perf/check_headers.sh to ignore those changes when checking if the
    kernel original files drifted from the copies we carry.

    This is to get the changes from:

    6dcc5627f6ae ("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*")
    ef1e03152cb0 ("x86/asm: Make some functions local")
    e9b9d020c487 ("x86/asm: Annotate aliases")

    And address these tools/perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
    diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
    Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S'
    diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Jiri Olsa
    Cc: Jiri Slaby
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-tay3l8x8k11p7y3qcpqh9qh5@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

29 Nov, 2019

1 commit

  • …ux/kernel/git/acme/linux into perf/urgent

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    perf script:

    Adrian Hunter:

    - Fix brstackinsn for AUXTRACE.

    - Fix invalid LBR/binary mismatch error.

    perf diff:

    Arnaldo Carvalho de Melo:

    - Use llabs() with 64-bit values, fixing the build in some 32-bit
    architectures.

    perf pmu:

    Andi Kleen:

    - Use file system cache to optimize sysfs access.

    x86:

    Adrian Hunter:

    - Add some more Intel instructions to the opcode map and to the perf
    test entry:

    gf2p8affineinvqb, gf2p8affineqb, gf2p8mulb, v4fmaddps,
    v4fmaddss, v4fnmaddps, v4fnmaddss, vaesdec, vaesdeclast, vaesenc,
    vaesenclast, vcvtne2ps2bf16, vcvtneps2bf16, vdpbf16ps,
    vgf2p8affineinvqb, vgf2p8affineqb, vgf2p8mulb, vp2intersectd,
    vp2intersectq, vp4dpwssd, vp4dpwssds, vpclmulqdq, vpcompressb,
    vpcompressw, vpdpbusd, vpdpbusds, vpdpwssd, vpdpwssds, vpexpandb,
    vpexpandw, vpopcntb, vpopcntd, vpopcntq, vpopcntw, vpshldd, vpshldq,
    vpshldvd, vpshldvq, vpshldvw, vpshldw, vpshrdd, vpshrdq, vpshrdvd,
    vpshrdvq, vpshrdvw, vpshrdw, vpshufbitqmb.

    perf affinity:

    Andi Kleen:

    - Add infrastructure to save/restore affinity

    perf maps:

    Arnaldo Carvalho de Melo:

    - Merge 'struct maps' with 'struct map_groups', as there is a
    1x1 relationship, simplifying code overal.

    perf build:

    Jiri Olsa:

    - Allow to link with libbpf dynamicaly.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

27 Nov, 2019

3 commits

  • Pull perf updates from Ingo Molnar:
    "The main kernel side changes in this cycle were:

    - Various Intel-PT updates and optimizations (Alexander Shishkin)

    - Prohibit kprobes on Xen/KVM emulate prefixes (Masami Hiramatsu)

    - Add support for LSM and SELinux checks to control access to the
    perf syscall (Joel Fernandes)

    - Misc other changes, optimizations, fixes and cleanups - see the
    shortlog for details.

    There were numerous tooling changes as well - 254 non-merge commits.
    Here are the main changes - too many to list in detail:

    - Enhancements to core tooling infrastructure, perf.data, libperf,
    libtraceevent, event parsing, vendor events, Intel PT, callchains,
    BPF support and instruction decoding.

    - There were updates to the following tools:

    perf annotate
    perf diff
    perf inject
    perf kvm
    perf list
    perf maps
    perf parse
    perf probe
    perf record
    perf report
    perf script
    perf stat
    perf test
    perf trace

    - And a lot of other changes: please see the shortlog and Git log for
    more details"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (279 commits)
    perf parse: Fix potential memory leak when handling tracepoint errors
    perf probe: Fix spelling mistake "addrees" -> "address"
    libtraceevent: Fix memory leakage in copy_filter_type
    libtraceevent: Fix header installation
    perf intel-bts: Does not support AUX area sampling
    perf intel-pt: Add support for decoding AUX area samples
    perf intel-pt: Add support for recording AUX area samples
    perf pmu: When using default config, record which bits of config were changed by the user
    perf auxtrace: Add support for queuing AUX area samples
    perf session: Add facility to peek at all events
    perf auxtrace: Add support for dumping AUX area samples
    perf inject: Cut AUX area samples
    perf record: Add aux-sample-size config term
    perf record: Add support for AUX area sampling
    perf auxtrace: Add support for AUX area sample recording
    perf auxtrace: Move perf_evsel__find_pmu()
    perf record: Add a function to test for kernel support for AUX area sampling
    perf tools: Add kernel AUX area sampling definitions
    perf/core: Make the mlock accounting simple again
    perf report: Jump to symbol source view from total cycles view
    ...

    Linus Torvalds
     
  • …rg/pub/scm/linux/kernel/git/tip/tip

    Pull x86 cpu and fpu updates from Ingo Molnar:

    - math-emu fixes

    - CPUID updates

    - sanity-check RDRAND output to see whether the CPU at least pretends
    to produce random data

    - various unaligned-access across cachelines fixes in preparation of
    hardware level split-lock detection

    - fix MAXSMP constraints to not allow !CPUMASK_OFFSTACK kernels with
    larger than 512 NR_CPUS

    - misc FPU related cleanups

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cpu: Align the x86_capability array to size of unsigned long
    x86/cpu: Align cpu_caps_cleared and cpu_caps_set to unsigned long
    x86/umip: Make the comments vendor-agnostic
    x86/Kconfig: Rename UMIP config parameter
    x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK
    x86/cpufeatures: Add feature bit RDPRU on AMD
    x86/math-emu: Limit MATH_EMULATION to 486SX compatibles
    x86/math-emu: Check __copy_from_user() result
    x86/rdrand: Sanity-check RDRAND output

    * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/fpu: Use XFEATURE_FP/SSE enum values instead of hardcoded numbers
    x86/fpu: Shrink space allocated for xstate_comp_offsets
    x86/fpu: Update stale variable name in comment

    Linus Torvalds
     
  • …for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

    Pull x86 objtool, cleanup, and apic updates from Ingo Molnar:
    "Objtool:

    - Fix a gawk 5.0 incompatibility in gen-insn-attr-x86.awk. Most
    distros are still on gawk 4.2.x.

    Cleanup:

    - Misc cleanups, plus the removal of obsolete code such as Calgary
    IOMMU support, which code hasn't seen any real testing in a long
    time and there's no known users left.

    apic:

    - Two changes: a cleanup and a fix for an (old) race for oneshot
    threaded IRQ handlers"

    * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/insn: Fix awk regexp warnings

    * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Remove unused asm/rio.h
    x86: Fix typos in comments
    x86/pci: Remove #ifdef __KERNEL__ guard from <asm/pci.h>
    x86/pci: Remove pci_64.h
    x86: Remove the calgary IOMMU driver
    x86/apic, x86/uprobes: Correct parameter names in kernel-doc comments
    x86/kdump: Remove the unused crash_copy_backup_region()
    x86/nmi: Remove stale EDAC include leftover

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/ioapic: Rename misnamed functions
    x86/ioapic: Prevent inconsistent state when moving an interrupt

    Linus Torvalds
     

26 Nov, 2019

1 commit

  • Add to the opcode map the following instructions:

    v4fmaddps
    v4fmaddss
    v4fnmaddps
    v4fnmaddss
    vaesdec
    vaesdeclast
    vaesenc
    vaesenclast
    vcvtne2ps2bf16
    vcvtneps2bf16
    vdpbf16ps
    gf2p8affineinvqb
    vgf2p8affineinvqb
    gf2p8affineqb
    vgf2p8affineqb
    gf2p8mulb
    vgf2p8mulb
    vp2intersectd
    vp2intersectq
    vp4dpwssd
    vp4dpwssds
    vpclmulqdq
    vpcompressb
    vpcompressw
    vpdpbusd
    vpdpbusds
    vpdpwssd
    vpdpwssds
    vpexpandb
    vpexpandw
    vpopcntb
    vpopcntd
    vpopcntq
    vpopcntw
    vpshldd
    vpshldq
    vpshldvd
    vpshldvq
    vpshldvw
    vpshldw
    vpshrdd
    vpshrdq
    vpshrdvd
    vpshrdvq
    vpshrdvw
    vpshrdw
    vpshufbitqmb

    For information about the instructions, refer Intel SDM May 2019
    (325462-070US) and Intel Architecture Instruction Set Extensions May
    2019 (319433-037).

    The instruction decoding can be tested using the perf tools' "x86
    instruction decoder - new instructions" test e.g.

    $ perf test -v "new " 2>&1 | grep -i 'v4fmaddps'
    Decoded ok: 62 f2 7f 48 9a 20 v4fmaddps (%eax),%zmm0,%zmm4
    Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4
    Decoded ok: 62 f2 7f 48 9a 20 v4fmaddps (%rax),%zmm0,%zmm4
    Decoded ok: 67 62 f2 7f 48 9a 20 v4fmaddps (%eax),%zmm0,%zmm4
    Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%rax,%rcx,8),%zmm0,%zmm4
    Decoded ok: 67 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4

    Signed-off-by: Adrian Hunter
    Acked-by: Masami Hiramatsu
    Cc: Andi Kleen
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Yu-cheng Yu
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/20191125125044.31879-3-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

25 Nov, 2019

1 commit


19 Nov, 2019

1 commit

  • Add to the opcode map the following instructions:
    cldemote
    tpause
    umonitor
    umwait
    movdiri
    movdir64b
    enqcmd
    enqcmds
    encls
    enclu
    enclv
    pconfig
    wbnoinvd

    For information about the instructions, refer Intel SDM May 2019
    (325462-070US) and Intel Architecture Instruction Set Extensions
    May 2019 (319433-037).

    The instruction decoding can be tested using the perf tools'
    "x86 instruction decoder - new instructions" test as folllows:

    $ perf test -v "new " 2>&1 | grep -i cldemote
    Decoded ok: 0f 1c 00 cldemote (%eax)
    Decoded ok: 0f 1c 05 78 56 34 12 cldemote 0x12345678
    Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%eax,%ecx,8)
    Decoded ok: 0f 1c 00 cldemote (%rax)
    Decoded ok: 41 0f 1c 00 cldemote (%r8)
    Decoded ok: 0f 1c 04 25 78 56 34 12 cldemote 0x12345678
    Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%rax,%rcx,8)
    Decoded ok: 41 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%r8,%rcx,8)
    $ perf test -v "new " 2>&1 | grep -i tpause
    Decoded ok: 66 0f ae f3 tpause %ebx
    Decoded ok: 66 0f ae f3 tpause %ebx
    Decoded ok: 66 41 0f ae f0 tpause %r8d
    $ perf test -v "new " 2>&1 | grep -i umonitor
    Decoded ok: 67 f3 0f ae f0 umonitor %ax
    Decoded ok: f3 0f ae f0 umonitor %eax
    Decoded ok: 67 f3 0f ae f0 umonitor %eax
    Decoded ok: f3 0f ae f0 umonitor %rax
    Decoded ok: 67 f3 41 0f ae f0 umonitor %r8d
    $ perf test -v "new " 2>&1 | grep -i umwait
    Decoded ok: f2 0f ae f0 umwait %eax
    Decoded ok: f2 0f ae f0 umwait %eax
    Decoded ok: f2 41 0f ae f0 umwait %r8d
    $ perf test -v "new " 2>&1 | grep -i movdiri
    Decoded ok: 0f 38 f9 03 movdiri %eax,(%ebx)
    Decoded ok: 0f 38 f9 88 78 56 34 12 movdiri %ecx,0x12345678(%eax)
    Decoded ok: 48 0f 38 f9 03 movdiri %rax,(%rbx)
    Decoded ok: 48 0f 38 f9 88 78 56 34 12 movdiri %rcx,0x12345678(%rax)
    $ perf test -v "new " 2>&1 | grep -i movdir64b
    Decoded ok: 66 0f 38 f8 18 movdir64b (%eax),%ebx
    Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx
    Decoded ok: 67 66 0f 38 f8 1c movdir64b (%si),%bx
    Decoded ok: 67 66 0f 38 f8 8c 34 12 movdir64b 0x1234(%si),%cx
    Decoded ok: 66 0f 38 f8 18 movdir64b (%rax),%rbx
    Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%rax),%rcx
    Decoded ok: 67 66 0f 38 f8 18 movdir64b (%eax),%ebx
    Decoded ok: 67 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i enqcmd
    Decoded ok: f2 0f 38 f8 18 enqcmd (%eax),%ebx
    Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx
    Decoded ok: 67 f2 0f 38 f8 1c enqcmd (%si),%bx
    Decoded ok: 67 f2 0f 38 f8 8c 34 12 enqcmd 0x1234(%si),%cx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx
    Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx
    Decoded ok: f2 0f 38 f8 18 enqcmd (%rax),%rbx
    Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%rax),%rcx
    Decoded ok: 67 f2 0f 38 f8 18 enqcmd (%eax),%ebx
    Decoded ok: 67 f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx
    Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i enqcmds
    Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx
    Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx
    Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i encls
    Decoded ok: 0f 01 cf encls
    Decoded ok: 0f 01 cf encls
    $ perf test -v "new " 2>&1 | grep -i enclu
    Decoded ok: 0f 01 d7 enclu
    Decoded ok: 0f 01 d7 enclu
    $ perf test -v "new " 2>&1 | grep -i enclv
    Decoded ok: 0f 01 c0 enclv
    Decoded ok: 0f 01 c0 enclv
    $ perf test -v "new " 2>&1 | grep -i pconfig
    Decoded ok: 0f 01 c5 pconfig
    Decoded ok: 0f 01 c5 pconfig
    $ perf test -v "new " 2>&1 | grep -i wbnoinvd
    Decoded ok: f3 0f 09 wbnoinvd
    Decoded ok: f3 0f 09 wbnoinvd

    Signed-off-by: Adrian Hunter
    Reviewed-by: Andi Kleen
    Acked-by: Masami Hiramatsu
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/20191115135447.6519-3-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

07 Nov, 2019

1 commit

  • AMD 2nd generation EPYC processors support the UMIP (User-Mode
    Instruction Prevention) feature. So, rename X86_INTEL_UMIP to
    generic X86_UMIP and modify the text to cover both Intel and AMD.

    [ bp: take of the disabled-features.h copy in tools/ too. ]

    Signed-off-by: Babu Moger
    Signed-off-by: Borislav Petkov
    Cc: Andy Lutomirski
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Ricardo Neri
    Cc: Thomas Gleixner
    Cc: "x86@kernel.org"
    Link: https://lkml.kernel.org/r/157298912544.17462.2018334793891409521.stgit@naples-babu.amd.com

    Babu Moger
     

22 Oct, 2019

2 commits

  • …ux/kernel/git/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    perf trace:

    - Add syscall failure stats to -s/--summary and -S/--with-summary, works in
    combination with specifying just a set of syscalls, see below first with
    -s/--summary, then with -S/--with-summary just for the syscalls we saw failing
    with -s:

    # perf trace -s sleep 1

    Summary of events:

    sleep (16218), 80 events, 93.0%

    syscall calls errors total min avg max stddev
    (msec) (msec) (msec) (msec) (%)
    ----------- ----- ------ -------- -------- -------- -------- ------
    nanosleep 1 0 1000.091 1000.091 1000.091 1000.091 0.00%
    mmap 8 0 0.045 0.005 0.006 0.008 7.09%
    mprotect 4 0 0.028 0.005 0.007 0.009 11.38%
    openat 3 0 0.021 0.005 0.007 0.009 14.07%
    munmap 1 0 0.017 0.017 0.017 0.017 0.00%
    brk 4 0 0.010 0.001 0.002 0.004 23.15%
    read 4 0 0.009 0.002 0.002 0.003 8.13%
    close 5 0 0.008 0.001 0.002 0.002 10.83%
    fstat 3 0 0.006 0.002 0.002 0.002 6.97%
    access 1 1 0.006 0.006 0.006 0.006 0.00%
    lseek 3 0 0.005 0.001 0.002 0.002 7.37%
    arch_prctl 2 1 0.004 0.001 0.002 0.002 17.64%
    execve 1 0 0.000 0.000 0.000 0.000 0.00%

    # perf trace -e access,arch_prctl -S sleep 1
    0.000 ( 0.006 ms): sleep/19503 arch_prctl(option: 0x3001, arg2: 0x7fff165996b0) = -1 EINVAL (Invalid argument)
    0.024 ( 0.006 ms): sleep/19503 access(filename: 0x2177e510, mode: R) = -1 ENOENT (No such file or directory)
    0.136 ( 0.002 ms): sleep/19503 arch_prctl(option: SET_FS, arg2: 0x7f9421737580) = 0

    Summary of events:

    sleep (19503), 6 events, 50.0%

    syscall calls errors total min avg max stddev
    (msec) (msec) (msec) (msec) (%)
    ---------- ----- ------ ------ ------ ------ ------ ------
    arch_prctl 2 1 0.008 0.002 0.004 0.006 57.22%
    access 1 1 0.006 0.006 0.006 0.006 0.00%

    #

    - Introduce --errno-summary, to drill down a bit more in the errno stats:

    # perf trace --errno-summary -e access,arch_prctl -S sleep 1
    0.000 ( 0.006 ms): sleep/5587 arch_prctl(option: 0x3001, arg2: 0x7ffd6ba6aa00) = -1 EINVAL (Invalid argument)
    0.028 ( 0.007 ms): sleep/5587 access(filename: 0xb83d9510, mode: R) = -1 ENOENT (No such file or directory)
    0.172 ( 0.003 ms): sleep/5587 arch_prctl(option: SET_FS, arg2: 0x7f45b8392580) = 0

    Summary of events:

    sleep (5587), 6 events, 50.0%

    syscall calls errors total min avg max stddev
    (msec) (msec) (msec) (msec) (%)
    ---------- ----- ------ ------ ------ ------ ------ ------
    arch_prctl 2 1 0.009 0.003 0.005 0.006 38.90%
    EINVAL: 1
    access 1 1 0.007 0.007 0.007 0.007 0.00%
    ENOENT: 1
    #

    - Filter own pid to avoid a feedback look in 'perf trace record -a'

    - Add the glue for the auto generated x86 IRQ vector array.

    - Show error message when not finding a field used in a filter expression

    # perf trace --max-events=4 -e syscalls:sys_enter_write --filter="cnt>32767"
    Failed to set filter "(cnt>32767) && (common_pid != 19938 && common_pid != 8922)" on event syscalls:sys_enter_write with 22 (Invalid argument)
    #
    # perf trace --max-events=4 -e syscalls:sys_enter_write --filter="count>32767"
    0.000 python3.5/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0dc53600, count: 172086)
    12.641 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0db63660, count: 75994)
    27.738 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0db4b1e0, count: 41635)
    136.070 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0dbab510, count: 62232)
    #

    - Add a generator for x86's IRQ vectors -> strings

    - Introduce stroul() (string -> number) methods for the strarray and
    strarrays classes, also strtoul_flags, allowing to go from both strings
    and or-ed strings to numbers, allowing things like:

    # perf trace -e syscalls:sys_enter_mmap --filter="flags==DENYWRITE|PRIVATE|FIXED" sleep 1
    0.000 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2aa5000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000)
    0.011 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2bf2000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000)
    0.015 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2c3f000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000)
    #

    Allowing to narrow down from the complete set of mmap calls for that workload:

    # perf trace -e syscalls:sys_enter_mmap sleep 1
    0.000 sleep/22695 syscalls:sys_enter_mmap(len: 134773, prot: READ, flags: PRIVATE, fd: 3)
    0.041 sleep/22695 syscalls:sys_enter_mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS)
    0.053 sleep/22695 syscalls:sys_enter_mmap(len: 1857472, prot: READ, flags: PRIVATE|DENYWRITE, fd: 3)
    0.069 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd23ffb6000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000)
    0.077 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240103000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000)
    0.083 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240150000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000)
    0.095 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240156000, len: 14272, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS)
    0.339 sleep/22695 syscalls:sys_enter_mmap(len: 217750512, prot: READ, flags: PRIVATE, fd: 3)
    #

    Works with all targets, so, for system wide, looking at who calls mmap with flags set to just "PRIVATE":

    # perf trace --max-events=5 -e syscalls:sys_enter_mmap --filter="flags==PRIVATE"
    0.000 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14)
    0.050 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14)
    0.062 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14)
    0.145 goa-identity-s/2240 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 18)
    0.183 goa-identity-s/2240 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 18)
    #

    # perf trace --max-events=2 -e syscalls:sys_enter_lseek --filter="whence==SET && offset != 0"
    0.000 Cache2 I/O/12047 syscalls:sys_enter_lseek(fd: 277, offset: 43, whence: SET)
    1142.070 mozStorage #5/12302 syscalls:sys_enter_lseek(fd: 44</home/acme/.mozilla/firefox/ina67tev.default/cookies.sqlite-wal>, offset: 393536, whence: SET)
    #

    perf annotate:

    - Fix objdump --no-show-raw-insn flag to work with goth gcc and clang.

    - Streamline objdump execution, preserving the right error codes for better
    reporting to user.

    perf report:

    - Add warning when libunwind not compiled in.

    perf stat:

    Jin Yao:

    - Support --all-kernel/--all-user, to match options available in 'perf record',
    asking that all the events specified work just with kernel or user events.

    perf list:

    Jin Yao:

    - Hide deprecated events by default, allow showing them with --deprecated.

    libbperf:

    Jiri Olsa:

    - Allow to build with -ltcmalloc.

    - Finish mmap interface, getting more stuff from tools/perf while adding
    abstractions to avoid pulling too much stuff, to get libperf to grow as
    tools needs things like auxtrace, etc.

    perf scripting engines:

    Steven Rostedt (VMware):

    - Iterate on tep event arrays directly, fixing script generation with
    '-g python' when having multiple tracepoints in a perf.data file.

    core:

    - Allow to build with -ltcmalloc.

    perf test:

    Leo Yan:

    - Report failure for mmap events.

    - Avoid infinite loop for task exit case.

    - Remove needless headers for bp_account test.

    - Add dedicated checking helper is_supported().

    - Disable bp_signal testing for arm64.

    Vendor events:

    arm64:

    John Garry:

    - Fix Hisi hip08 DDRC PMU eventname.

    - Add some missing events for Hisi hip08 DDRC, L3C and HHA PMUs.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     

18 Oct, 2019

1 commit

  • Decode Xen and KVM's emulate-prefix signature by x86 insn decoder.
    It is called "prefix" but actually not x86 instruction prefix, so
    this adds insn.emulate_prefix_size field instead of reusing
    insn.prefixes.

    If x86 decoder finds a special sequence of instructions of
    XEN_EMULATE_PREFIX and 'ud2a; .ascii "kvm"', it just counts the
    length, set insn.emulate_prefix_size and fold it with the next
    instruction. In other words, the signature and the next instruction
    is treated as a single instruction.

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Josh Poimboeuf
    Cc: Juergen Gross
    Cc: x86@kernel.org
    Cc: Boris Ostrovsky
    Cc: Ingo Molnar
    Cc: Stefano Stabellini
    Cc: Andrew Cooper
    Cc: Borislav Petkov
    Cc: xen-devel@lists.xenproject.org
    Cc: Randy Dunlap
    Link: https://lkml.kernel.org/r/156777564986.25081.4964537658500952557.stgit@devnote2

    Masami Hiramatsu
     

16 Oct, 2019

1 commit


15 Oct, 2019

2 commits

  • To pick the changes in:

    0cb8410b90e7 ("kvm: svm: Intercept RDPRU")

    That trigger a rebuild in too in tooling:

    CC /tmp/build/perf/arch/x86/util/kvm-stat.o

    But this time around no changes in tooling results, as SVM_EXIT_RDPRU
    wasn't added to SVM_EXIT_REASONS, that is used in kvm-stat.c.

    And addresses this perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
    diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h

    Cc: Adrian Hunter
    Cc: Jim Mattson
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Link: https://lkml.kernel.org/n/tip-pqzkt1hmfpqph3ts8i6zzmim@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick the changes in:

    bf653b78f960 ("KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit")

    That trigger these changes in tooling:

    CC /tmp/build/perf/arch/x86/util/kvm-stat.o
    INSTALL GTK UI
    DESCEND plugins
    make[3]: Nothing to be done for '/tmp/build/perf/plugins/libtraceevent-dynamic-list'.
    INSTALL trace_plugins
    LD /tmp/build/perf/arch/x86/util/perf-in.o
    LD /tmp/build/perf/arch/x86/perf-in.o
    LD /tmp/build/perf/arch/perf-in.o
    LD /tmp/build/perf/perf-in.o
    LINK /tmp/build/perf/perf

    And this is not just because that header is included, kvm-stat.c
    uses the VMX_EXIT_REASONS define and it got changed by the above cset.

    And addresses this perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
    diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Tao Xu
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-gr1eel0hckmi5l3p2ewdpfxh@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

07 Oct, 2019

1 commit


01 Oct, 2019

2 commits

  • gawk 5.0.1 generates the following regexp warnings:

    GEN /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c
    awk: ../arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
    awk: ../arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=../arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

    Ealier versions of gawk are not known to generate these warnings. The
    gawk manual referenced below does not list characters ':' and '&' as
    needing escaping, so 'unescape' them. See

    https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html

    for more info.

    Running diff on the output generated by the script before and after
    applying the patch reported no differences.

    [ bp: Massage commit message. ]

    [ Caught the respective tools header discrepancy. ]
    Reported-by: kbuild test robot
    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Borislav Petkov
    Acked-by: Masami Hiramatsu
    Cc: "H. Peter Anvin"
    Cc: "Peter Zijlstra (Intel)"
    Cc: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Josh Poimboeuf
    Cc: Thomas Gleixner
    Cc: x86-ml
    Link: https://lkml.kernel.org/r/20190924044659.3785-1-alexander.kapshuk@gmail.com

    Alexander Kapshuk
     
  • To pick the changes in:

    200824f55eef ("KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs")
    4a53d99dd0c2 ("KVM: VMX: Introduce exit reason for receiving INIT signal on guest-mode")
    7396d337cfad ("KVM: x86: Return to userspace with internal error on unexpected exit reason")
    92f35b751c71 ("KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE")

    None of them trigger any changes in tooling, this time this is just to silence
    these perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
    diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
    diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
    Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
    diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h

    Cc: Adrian Hunter
    Cc: Janosch Frank
    Cc: Jiri Olsa
    Cc: Liran Alon
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Thomas Huth
    Link: https://lkml.kernel.org/n/tip-akuugvvjxte26kzv23zp5d2z@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

21 Sep, 2019

2 commits

  • To pick up the changes from:

    b4dd4f6e3648 ("x86/vmware: Add a header file for hypercall definitions")
    f36cf386e3fe ("x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS")
    be261ffce6f1 ("x86: Remove X86_FEATURE_MFENCE_RDTSC")
    018ebca8bd70 ("x86/cpufeatures: Enable a new AVX512 CPU feature")

    These don't cause any changes in tooling, just silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    To clarify, updating those files cause these bits of tools/perf to rebuild:

    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
    CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o
    INSTALL GTK UI
    LD /tmp/build/perf/bench/perf-in.o

    Those use just:

    $ grep FEATURE tools/arch/x86/lib/mem*.S
    tools/arch/x86/lib/memcpy_64.S: ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \
    tools/arch/x86/lib/memcpy_64.S: "jmp memcpy_erms", X86_FEATURE_ERMS
    tools/arch/x86/lib/memset_64.S: ALTERNATIVE_2 "jmp memset_orig", "", X86_FEATURE_REP_GOOD, \
    tools/arch/x86/lib/memset_64.S: "jmp memset_erms", X86_FEATURE_ERMS
    $

    I.e. none of the feature defines added/removed by the patches above.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Gayatri Kammela
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Thomas Hellstrom
    Link: https://lkml.kernel.org/n/tip-pq63abgknsaeov23p80d8gjv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the change in:

    45e29d119e99 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")

    That doesn't trigger any changes in tooling and silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/unistd.h' differs from latest version at 'arch/x86/include/uapi/asm/unistd.h'
    diff -u tools/arch/x86/include/uapi/asm/unistd.h arch/x86/include/uapi/asm/unistd.h

    Cc: Adrian Hunter
    Cc: Andy Lutomirski
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Sep, 2019

2 commits

  • Pull x86 cpu-feature updates from Ingo Molnar:

    - Rework the Intel model names symbols/macros, which were decades of
    ad-hoc extensions and added random noise. It's now a coherent, easy
    to follow nomenclature.

    - Add new Intel CPU model IDs:
    - "Tiger Lake" desktop and mobile models
    - "Elkhart Lake" model ID
    - and the "Lightning Mountain" variant of Airmont, plus support code

    - Add the new AVX512_VP2INTERSECT instruction to cpufeatures

    - Remove Intel MPX user-visible APIs and the self-tests, because the
    toolchain (gcc) is not supporting it going forward. This is the
    first, lowest-risk phase of MPX removal.

    - Remove X86_FEATURE_MFENCE_RDTSC

    - Various smaller cleanups and fixes

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    x86/cpu: Update init data for new Airmont CPU model
    x86/cpu: Add new Airmont variant to Intel family
    x86/cpu: Add Elkhart Lake to Intel family
    x86/cpu: Add Tiger Lake to Intel family
    x86: Correct misc typos
    x86/intel: Add common OPTDIFFs
    x86/intel: Aggregate microserver naming
    x86/intel: Aggregate big core graphics naming
    x86/intel: Aggregate big core mobile naming
    x86/intel: Aggregate big core client naming
    x86/cpufeature: Explain the macro duplication
    x86/ftrace: Remove mcount() declaration
    x86/PCI: Remove superfluous returns from void functions
    x86/msr-index: Move AMD MSRs where they belong
    x86/cpu: Use constant definitions for CPU models
    lib: Remove redundant ftrace flag removal
    x86/crash: Remove unnecessary comparison
    x86/bitops: Use __builtin_constant_p() directly instead of IS_IMMEDIATE()
    x86: Remove X86_FEATURE_MFENCE_RDTSC
    x86/mpx: Remove MPX APIs
    ...

    Linus Torvalds
     
  • Pull perf updates from Ingo Molnar:
    "Kernel side changes:

    - Improved kbprobes robustness

    - Intel PEBS support for PT hardware tracing

    - Other Intel PT improvements: high order pages memory footprint
    reduction and various related cleanups

    - Misc cleanups

    The perf tooling side has been very busy in this cycle, with over 300
    commits. This is an incomplete high-level summary of the many
    improvements done by over 30 developers:

    - Lots of updates to the following tools:

    'perf c2c'
    'perf config'
    'perf record'
    'perf report'
    'perf script'
    'perf test'
    'perf top'
    'perf trace'

    - Updates to libperf and libtraceevent, and a consolidation of the
    proliferation of x86 instruction decoder libraries.

    - Vendor event updates for Intel and PowerPC CPUs,

    - Updates to hardware tracing tooling for ARM and Intel CPUs,

    - ... and lots of other changes and cleanups - see the shortlog and
    Git log for details"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (322 commits)
    kprobes: Prohibit probing on BUG() and WARN() address
    perf/x86: Make more stuff static
    x86, perf: Fix the dependency of the x86 insn decoder selftest
    objtool: Ignore intentional differences for the x86 insn decoder
    objtool: Update sync-check.sh from perf's check-headers.sh
    perf build: Ignore intentional differences for the x86 insn decoder
    perf intel-pt: Use shared x86 insn decoder
    perf intel-pt: Remove inat.c from build dependency list
    perf: Update .gitignore file
    objtool: Move x86 insn decoder to a common location
    perf metricgroup: Support multiple events for metricgroup
    perf metricgroup: Scale the metric result
    perf pmu: Change convert_scale from static to global
    perf symbols: Move mem_info and branch_info out of symbol.h
    perf auxtrace: Uninline functions that touch perf_session
    perf tools: Remove needless evlist.h include directives
    perf tools: Remove needless evlist.h include directives
    perf tools: Remove needless thread_map.h include directives
    perf tools: Remove needless thread.h include directives
    perf tools: Remove needless map.h include directives
    ...

    Linus Torvalds
     

05 Sep, 2019

1 commit

  • This patch adds support for DWARF register mappings and libdw registers
    initialization, which is used by perf callchain analyzing when
    --call-graph=dwarf is given.

    Signed-off-by: Mao Han
    Cc: Paul Walmsley
    Cc: Greentime Hu
    Cc: Palmer Dabbelt
    Cc: linux-riscv
    Cc: Christoph Hellwig
    Cc: Guo Ren
    Tested-by: Greentime Hu
    Signed-off-by: Paul Walmsley

    Mao Han
     

01 Sep, 2019

1 commit

  • Now that there's a common version of the decoder for all tools, use it
    instead of the local copy.

    Also use perf's check-headers.sh script to diff the decoder files to
    make sure they remain in sync with the kernel version. Objtool has a
    similar check.

    Committer notes:

    Had to keep this all pointing explicitely to x86 headers/files, i.e.
    instead of asm/isnn.h we had to use ../include/asm/insn.h when the files
    were in differemt dirs, or just replace "" with "foo.h".

    This way we continue to be able to process perf.data files with Intel PT
    traces in distros other than x86.

    Also fixed up the awk script paths to use $(srcdir)/tools/arch instead
    or relative directories so that we keep detached tarballs (make help |
    grep perf) working.

    For now the include lines in these headers are being ignored so as not
    to flag false reports of kernel/tools out of sync.

    Signed-off-by: Josh Poimboeuf
    Reviewed-by: Masami Hiramatsu
    Acked-by: Peter Zijlstra (Intel)
    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/8a37e615d2880f039505d693d1e068a009358a2b.1567118001.git.jpoimboe@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Poimboeuf