1. 16 Feb, 2018 6 commits
    • Jiri Olsa's avatar
      tools lib api fs: Add filename__read_xll function · 6baddfc6
      Jiri Olsa authored
      Adding filename__read_xll function to be able to read files with hex
      numbers in, which do not have 0x prefix.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180206181813.10943-5-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6baddfc6
    • Jiri Olsa's avatar
      perf script: Add --show-round-event to display PERF_RECORD_FINISHED_ROUND · 3233b37a
      Jiri Olsa authored
      Adding --show-round-event to display PERF_RECORD_FINISHED_ROUND events
      like:
      
        # perf script --show-round-events 2>/dev/null
                     yes  8591 [002] 124177.397597:         18         cpu/mem-stores/P: ff...
                     yes  8591 [002] 124177.397615:          1 cpu/mem-loads,ldlat=30/P: ff...
        PERF_RECORD_FINISHED_ROUND
                    perf 10380 [001] 124177.397622:          6 cpu/mem-loads,ldlat=30/P: ff...
        PERF_RECORD_FINISHED_ROUND
                 swapper     0 [000] 124177.400518:         88         cpu/mem-stores/P: ff...
                 swapper     0 [000] 124177.400521:         88         cpu/mem-stores/P: ff...
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180206181813.10943-4-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3233b37a
    • Jiri Olsa's avatar
      perf record: Put new line after target override warning · c3dec27b
      Jiri Olsa authored
      There's no new-line after target-override warning, now:
      
        $ perf record -a --per-thread
        Warning:
        SYSTEM/CPU switch overriding PER-THREAD^C[ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.705 MB perf.data (2939 samples) ]
      
      with patch:
      
        $ perf record -a --per-thread
        Warning:
        SYSTEM/CPU switch overriding PER-THREAD
        ^C[ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.705 MB perf.data (2939 samples) ]
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Fixes: 16ad2ffb ("perf tools: Introduce perf_target__strerror()")
      Link: http://lkml.kernel.org/r/20180206181813.10943-3-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c3dec27b
    • Jessica Yu's avatar
      kprobes: Propagate error from disarm_kprobe_ftrace() · 297f9233
      Jessica Yu authored
      Improve error handling when disarming ftrace-based kprobes. Like with
      arm_kprobe_ftrace(), propagate any errors from disarm_kprobe_ftrace() so
      that we do not disable/unregister kprobes that are still armed. In other
      words, unregister_kprobe() and disable_kprobe() should not report success
      if the kprobe could not be disarmed.
      
      disarm_all_kprobes() keeps its current behavior and attempts to
      disarm all kprobes. It returns the last encountered error and gives a
      warning if not all probes could be disarmed.
      
      This patch is based on Petr Mladek's original patchset (patches 2 and 3)
      back in 2015, which improved kprobes error handling, found here:
      
         https://lkml.org/lkml/2015/2/26/452
      
      However, further work on this had been paused since then and the patches
      were not upstreamed.
      Based-on-patches-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: David S . Miller <davem@davemloft.net>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Joe Lawrence <joe.lawrence@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Miroslav Benes <mbenes@suse.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: live-patching@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180109235124.30886-3-jeyu@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      297f9233
    • Jessica Yu's avatar
      kprobes: Propagate error from arm_kprobe_ftrace() · 12310e34
      Jessica Yu authored
      Improve error handling when arming ftrace-based kprobes. Specifically, if
      we fail to arm a ftrace-based kprobe, register_kprobe()/enable_kprobe()
      should report an error instead of success. Previously, this has lead to
      confusing situations where register_kprobe() would return 0 indicating
      success, but the kprobe would not be functional if ftrace registration
      during the kprobe arming process had failed. We should therefore take any
      errors returned by ftrace into account and propagate this error so that we
      do not register/enable kprobes that cannot be armed. This can happen if,
      for example, register_ftrace_function() finds an IPMODIFY conflict (since
      kprobe_ftrace_ops has this flag set) and returns an error. Such a conflict
      is possible since livepatches also set the IPMODIFY flag for their ftrace_ops.
      
      arm_all_kprobes() keeps its current behavior and attempts to arm all
      kprobes. It returns the last encountered error and gives a warning if
      not all probes could be armed.
      
      This patch is based on Petr Mladek's original patchset (patches 2 and 3)
      back in 2015, which improved kprobes error handling, found here:
      
         https://lkml.org/lkml/2015/2/26/452
      
      However, further work on this had been paused since then and the patches
      were not upstreamed.
      Based-on-patches-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: David S . Miller <davem@davemloft.net>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Joe Lawrence <joe.lawrence@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Miroslav Benes <mbenes@suse.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: live-patching@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180109235124.30886-2-jeyu@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      12310e34
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-4.17-20180215' of... · 3f9e6463
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-4.17-20180215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core fixes from Arnaldo Carvalho de Melo:
      
      - perf_mmap overwrite mode fixes/overhaul, prep work to get 'perf top'
        using it, making it bearable to use it in large core count systems
        such as Knights Landing/Mill Intel systems (Kan Liang)
      
      - s/390 now uses syscall.tbl, just like x86-64 to generate the syscall
        table id -> string tables used by 'perf trace' (Hendrik Brueckner)
      
      - Use strtoull() instead of home grown function (Andy Shevchenko)
      
      - Synchronize kernel ABI headers, v4.16-rc1 (Ingo Molnar)
      
      - Document missing 'perf data --force' option (Sangwon Hong)
      
      - Add perf vendor JSON metrics for ARM Cortex-A53 Processor (William Cohen)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3f9e6463
  2. 15 Feb, 2018 34 commits