1. 26 1月, 2017 4 次提交
  2. 21 1月, 2017 3 次提交
  3. 20 1月, 2017 1 次提交
  4. 18 1月, 2017 2 次提交
  5. 17 1月, 2017 10 次提交
  6. 14 1月, 2017 1 次提交
    • M
      kprobes, extable: Identify kprobes trampolines as kernel text area · 5b485629
      Masami Hiramatsu 提交于
      Improve __kernel_text_address()/kernel_text_address() to return
      true if the given address is on a kprobe's instruction slot
      trampoline.
      
      This can help stacktraces to determine the address is on a
      text area or not.
      
      To implement this atomically in is_kprobe_*_slot(), also change
      the insn_cache page list to an RCU list.
      
      This changes timings a bit (it delays page freeing to the RCU garbage
      collection phase), but none of that is in the hot path.
      
      Note: this change can add small overhead to stack unwinders because
      it adds 2 additional checks to __kernel_text_address(). However, the
      impact should be very small, because kprobe_insn_pages list has 1 entry
      per 256 probes(on x86, on arm/arm64 it will be 1024 probes),
      and kprobe_optinsn_pages has 1 entry per 32 probes(on x86).
      In most use cases, the number of kprobe events may be less
      than 20, which means that is_kprobe_*_slot() will check just one entry.
      Tested-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andrey Konovalov <andreyknvl@google.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/148388747896.6869.6354262871751682264.stgit@devbox
      [ Improved the changelog and coding style. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      5b485629
  7. 12 1月, 2017 14 次提交
  8. 11 1月, 2017 2 次提交
  9. 05 1月, 2017 2 次提交
    • D
      perf/x86: Set pmu->module in Intel PMU modules · 74545f63
      David Carrillo-Cisneros 提交于
      The conversion of Intel PMU drivers into modules did not include reference
      counting. The machine will crash when attempting to  access deleted code
      if an event from a module PMU is started and the module removed before the
      event is destroyed.
      
      i.e. this crashes the machine:
      
      	$ insmod intel-rapl-perf.ko
      	$ perf stat -e power/energy-cores/ -C 0 &
      	$ rmmod intel-rapl-perf.ko
      
      Set THIS_MODULE to pmu->module in Intel module PMUs so that generic code
      can handle reference counting and deny rmmod while an event still exists.
      Signed-off-by: NDavid Carrillo-Cisneros <davidcc@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Turner <pjt@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1482455860-116269-1-git-send-email-davidcc@google.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      74545f63
    • I
      Merge tag 'perf-urgent-for-mingo-4.10-20170104' of... · 4e06d4f0
      Ingo Molnar 提交于
      Merge tag 'perf-urgent-for-mingo-4.10-20170104' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes and one improvement from Arnaldo Carvalho de Melo:
      
      Fixes:
      
        - Fix prev/next_prio formatting for deadline tasks in libtraceevent (Daniel Bristot de Oliveira)
      
        - Robustify reading of build-ids from /sys/kernel/note (Arnaldo Carvalho de Melo)
      
        - Fix building some sample/bpf in Alpine Linux 3.4 (Arnaldo Carvalho de Melo)
      
        - Fix 'make install-bin' to install libtraceevent plugins (Arnaldo Carvalho de Melo)
      
        - Fix 'perf record --switch-output' documentation and comment (Jiri Olsa)
      
        - Fix 'perf probe' for cross arch probing (Masami Hiramatsu)
      
      Improvement:
      
        - Show total scheduling time in 'perf sched timehist' (Namhyumg Kim)
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4e06d4f0
  10. 04 1月, 2017 1 次提交
    • M
      perf probe: Fix to probe on gcc generated symbols for offline kernel · 8a937a25
      Masami Hiramatsu 提交于
      Fix perf-probe to show probe definition on gcc generated symbols for
      offline kernel (including cross-arch kernel image).
      
      gcc sometimes optimizes functions and generate new symbols with suffixes
      such as ".constprop.N" or ".isra.N" etc. Since those symbol names are
      not recorded in DWARF, we have to find correct generated symbols from
      offline ELF binary to probe on it (kallsyms doesn't correct it).  For
      online kernel or uprobes we don't need it because those are rebased on
      _text, or a section relative address.
      
      E.g. Without this:
      
        $ perf probe -k build-arm/vmlinux -F __slab_alloc*
        __slab_alloc.constprop.9
        $ perf probe -k build-arm/vmlinux -D __slab_alloc
        p:probe/__slab_alloc __slab_alloc+0
      
      If you put above definition on target machine, it should fail
      because there is no __slab_alloc in kallsyms.
      
      With this fix, perf probe shows correct probe definition on
      __slab_alloc.constprop.9:
      
        $ perf probe -k build-arm/vmlinux -D __slab_alloc
        p:probe/__slab_alloc __slab_alloc.constprop.9+0
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/148350060434.19001.11864836288580083501.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8a937a25