1. 30 Aug, 2018 14 commits
  2. 23 Aug, 2018 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-4.19-20180820' of... · 66e5db4a
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-4.19-20180820' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      LLVM/clang/eBPF: (Arnaldo Carvalho de Melo)
      
       - Allow passing options to llc in addition to to clang.
      
      Hardware tracing: (Jack Henschel)
      
       - Improve error message for PMU address filters, clarifying availability of
         that feature in hardware having hardware tracing such as Intel PT.
      
      Python interface: (Jiri Olsa)
      
       - Fix read_on_cpu() interface.
      
      ELF/DWARF libraries: (Jiri Olsa)
      
       - Fix handling of the combo compressed module file + decompressed associated
         debuginfo file.
      
      Build (Rasmus Villemoes)
      
       - Disable parallelism for 'make clean', avoiding multiple submakes deleting
         the same files and causing the build to fail on systems such as Yocto.
      
      Kernel ABI copies: (Arnaldo Carvalho de Melo)
      
       - Update tools's copy of x86's cpufeatures.h.
      
       - Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'.
      
      Miscellaneous: (Steven Rostedt)
      
       - Change libtraceevent to SPDX License format.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      66e5db4a
  3. 20 Aug, 2018 21 commits
  4. 18 Aug, 2018 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-4.19-20180815' of... · 5804b110
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-4.19-20180815' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      kernel:
      
      - kallsyms, x86: Export addresses of PTI entry trampolines (Alexander Shishkin)
      
      - kallsyms: Simplify update_iter_mod() (Adrian Hunter)
      
      - x86: Add entry trampolines to kcore (Adrian Hunter)
      
      Hardware tracing:
      
      - Fix auxtrace queue resize (Adrian Hunter)
      
      Arch specific:
      
      - Fix uninitialized ARM SPE record error variable (Kim Phillips)
      
      - Fix trace event post-processing in powerpc (Sandipan Das)
      
      Build:
      
      - Fix check-headers.sh AND list path of execution (Alexander Kapshuk)
      
      - Remove -mcet and -fcf-protection when building the python binding
        with older clang versions (Arnaldo Carvalho de Melo)
      
      - Make check-headers.sh check based on kernel dir (Jiri Olsa)
      
      - Move syscall_64.tbl check into check-headers.sh (Jiri Olsa)
      
      Infrastructure:
      
      - Check for null when copying nsinfo.  (Benno Evers)
      
      Libraries:
      
      - Rename libtraceevent prefixes, prep work for making it a shared
        library generaly available (Tzvetomir Stoyanov (VMware))
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5804b110
  5. 14 Aug, 2018 3 commits
    • Adrian Hunter's avatar
      x86: Add entry trampolines to kcore · 6855dc41
      Adrian Hunter authored
      Without program headers for PTI entry trampoline pages, the trampoline
      virtual addresses do not map to anything.
      
      Example before:
      
       sudo gdb --quiet vmlinux /proc/kcore
       Reading symbols from vmlinux...done.
       [New process 1]
       Core was generated by `BOOT_IMAGE=/boot/vmlinuz-4.16.0 root=UUID=a6096b83-b763-4101-807e-f33daff63233'.
       #0  0x0000000000000000 in irq_stack_union ()
       (gdb) x /21ib 0xfffffe0000006000
          0xfffffe0000006000:  Cannot access memory at address 0xfffffe0000006000
       (gdb) quit
      
      After:
      
       sudo gdb --quiet vmlinux /proc/kcore
       [sudo] password for ahunter:
       Reading symbols from vmlinux...done.
       [New process 1]
       Core was generated by `BOOT_IMAGE=/boot/vmlinuz-4.16.0-fix-4-00005-gd6e65a8b4072 root=UUID=a6096b83-b7'.
       #0  0x0000000000000000 in irq_stack_union ()
       (gdb) x /21ib 0xfffffe0000006000
          0xfffffe0000006000:  swapgs
          0xfffffe0000006003:  mov    %rsp,-0x3e12(%rip)        # 0xfffffe00000021f8
          0xfffffe000000600a:  xchg   %ax,%ax
          0xfffffe000000600c:  mov    %cr3,%rsp
          0xfffffe000000600f:  bts    $0x3f,%rsp
          0xfffffe0000006014:  and    $0xffffffffffffe7ff,%rsp
          0xfffffe000000601b:  mov    %rsp,%cr3
          0xfffffe000000601e:  mov    -0x3019(%rip),%rsp        # 0xfffffe000000300c
          0xfffffe0000006025:  pushq  $0x2b
          0xfffffe0000006027:  pushq  -0x3e35(%rip)        # 0xfffffe00000021f8
          0xfffffe000000602d:  push   %r11
          0xfffffe000000602f:  pushq  $0x33
          0xfffffe0000006031:  push   %rcx
          0xfffffe0000006032:  push   %rdi
          0xfffffe0000006033:  mov    $0xffffffff91a00010,%rdi
          0xfffffe000000603a:  callq  0xfffffe0000006046
          0xfffffe000000603f:  pause
          0xfffffe0000006041:  lfence
          0xfffffe0000006044:  jmp    0xfffffe000000603f
          0xfffffe0000006046:  mov    %rdi,(%rsp)
          0xfffffe000000604a:  retq
       (gdb) quit
      
      In addition, entry trampolines all map to the same page.  Represent that
      by giving the corresponding program headers in kcore the same offset.
      
      This has the benefit that, when perf tools uses /proc/kcore as a source
      for kernel object code, samples from different CPU trampolines are
      aggregated together.  Note, such aggregation is normal for profiling
      i.e. people want to profile the object code, not every different virtual
      address the object code might be mapped to (across different processes
      for example).
      
      Notes by PeterZ:
      
      This also adds the KCORE_REMAP functionality.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      Link: http://lkml.kernel.org/r/1528289651-4113-4-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6855dc41
    • Alexander Shishkin's avatar
      kallsyms, x86: Export addresses of PTI entry trampolines · d83212d5
      Alexander Shishkin authored
      Currently, the addresses of PTI entry trampolines are not exported to
      user space. Kernel profiling tools need these addresses to identify the
      kernel code, so add a symbol and address for each CPU's PTI entry
      trampoline.
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      Link: http://lkml.kernel.org/r/1528289651-4113-3-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d83212d5
    • Adrian Hunter's avatar
      kallsyms: Simplify update_iter_mod() · b9667942
      Adrian Hunter authored
      The logic in update_iter_mod() is overcomplicated and gets worse every
      time another get_ksymbol_* function is added.
      
      In preparation for adding another get_ksymbol_* function, simplify logic
      in update_iter_mod().
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatar(ftrace changes only) Steven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      Link: http://lkml.kernel.org/r/1528289651-4113-2-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b9667942