1. 19 Oct, 2015 16 commits
    • Ingo Molnar's avatar
      perf bench: Run benchmarks, don't test them · aa254af2
      Ingo Molnar authored
      So right now we output this text:
      
              memcpy: Benchmark for memcpy() functions
              memset: Benchmark for memset() functions
                 all: Test all memory access benchmarks
      
      But the right verb to use with benchmarks is to 'run' them, not 'test'
      them.
      
      So change this (and all similar texts) to:
      
              memcpy: Benchmark for memcpy() functions
              memset: Benchmark for memset() functions
                 all: Run all memory access benchmarks
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-15-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      aa254af2
    • Ingo Molnar's avatar
      perf bench mem: Rename 'routine' to 'function' · 2f211c84
      Ingo Molnar authored
      So right now there's a somewhat inconsistent mess of the benchmarking
      code and options sometimes calling benchmarked functions 'functions',
      sometimes calling them 'routines'.
      
      Name them 'functions' consistently.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-14-git-send-email-mingo@kernel.org
      [ Updated perf-bench man page, pointed out by David Ahern ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2f211c84
    • Ingo Molnar's avatar
      perf bench: Harmonize all the -l/--nr_loops options · b0d22e52
      Ingo Molnar authored
      We have three benchmarking subsystems that specify some sort of 'number
      of loops' parameter - but all of them do it inconsistently:
      
       numa:              -l/--nr_loops
       sched messaging:   -l/--loops
       mem memset/memcpy: -i/--iterations
      
      Harmonize them to -l/--nr_loops by picking the numa variant - which is
      also the most likely one to have existing scripting which we don't want
      to break.
      
      Plus improve the parameter help texts to indicate the default value for
      the nr_loops variable to keep users from guessing ...
      
      Also propagate the naming to internal variables.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-13-git-send-email-mingo@kernel.org
      [ Let the harmonisation reach the perf-bench man page as well ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b0d22e52
    • Ingo Molnar's avatar
      perf bench mem: Reorganize the code a bit · 5dd93304
      Ingo Molnar authored
      Reorder functions a bit, so that we synchronize the layout of the
      memcpy() and memset() portions of the code.
      
      This improves the code, especially after we'll add an strlcpy() variant
      as well.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-12-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5dd93304
    • Ingo Molnar's avatar
      perf bench mem: Improve user visible strings · 13b1fdce
      Ingo Molnar authored
       - fix various typos in user visible output strings
       - make the output consistent (wrt. capitalization and spelling)
       - offer the list of routines to benchmark on '-r help'.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-11-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      13b1fdce
    • Ingo Molnar's avatar
      perf bench mem: Fix 'length' vs. 'size' naming confusion · a69b4f74
      Ingo Molnar authored
      So 'perf bench mem memcpy/memset' consistently uses 'len' and 'length'
      for buffer sizes - while it's really a memory buffer size. (strings have
      length.)
      
      Rename all affected variables.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-10-git-send-email-mingo@kernel.org
      [ Update perf-bench man page ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a69b4f74
    • Ingo Molnar's avatar
      perf bench mem: Rename 'routine' to 'routine_str' · e815e327
      Ingo Molnar authored
      So bench/mem-functions.c has a 'routine' name for the routines parameter
      string, but a 'length_str' name for the length parameter string.
      
      We also have another entity named 'routine': 'struct routine'.
      
      This is inconsistent and confusing: rename 'routine' to 'routine_str'.
      
      Also fix typos in the --routine help text.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-9-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e815e327
    • Ingo Molnar's avatar
      perf bench mem: Change 'cycle' to 'cycles' · b14f2d35
      Ingo Molnar authored
      So 'perf bench mem memset/memcpy' has a CPU cycles measurement method,
      but calls it 'cycle' (singular) throughout the code, which makes it
      harder to read.
      
      Rename all related functions, variables and options to a plural 'cycles'
      nomenclature.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-8-git-send-email-mingo@kernel.org
      [ s/--cycle/--cycles/g in perf-bench man page ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b14f2d35
    • Ingo Molnar's avatar
      perf bench: List output formatting options on 'perf bench -h' · 7a46a8fd
      Ingo Molnar authored
      So 'perf bench -h' is not very helpful when printing the help line
      about the output formatting options:
      
          -f, --format <default>
                                    Specify format style
      
      There are two output format styles, 'default' and 'simple', so improve
      the help text to:
      
          -f, --format <default|simple>
                                    Specify the output formatting style
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-7-git-send-email-mingo@kernel.org
      [ Removed leftovers from the mem-functions.c rename ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7a46a8fd
    • Ingo Molnar's avatar
      perf bench: Remove the prefaulting complication from 'perf bench mem mem*' · 6db175c7
      Ingo Molnar authored
      So 'perf bench mem memcpy/memset' has elaborate code to measure
      memcpy()/memset() performance both with freshly allocated buffers (which
      includes initial page fault overhead) and with preallocated buffers.
      
      But the thing is, the resulting bandwidth results are mostly
      meaningless, because page faults dominate so much of the cost.
      
      It might make sense to measure cache cold vs. cache hot performance, but
      the code does not do this.
      
      So remove this complication, and always prefault the ranges before using
      them.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-6-git-send-email-mingo@kernel.org
      [ Remove --no-prefault, --only-prefault from docs, noticed by David Ahern ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6db175c7
    • Ingo Molnar's avatar
      perf bench: Rename 'mem-memcpy.c' => 'mem-functions.c' · 9b2fa7f3
      Ingo Molnar authored
      So mem-memcpy.c started out as a simple memcpy() benchmark, then it grew
      memset() functionality and now I plan to add string copy benchmarks as
      well.
      
      This makes the file name a misnomer: rename it to the more generic
      mem-functions.c name.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-5-git-send-email-mingo@kernel.org
      [ The "rename" was introducing __unused, wasn't removing the old file,
        and didn't update tools/perf/bench/Build, fix it ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9b2fa7f3
    • Ingo Molnar's avatar
      perf bench: Eliminate unused argument from bench_mem_common() · 2946f59a
      Ingo Molnar authored
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-4-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2946f59a
    • Ingo Molnar's avatar
      perf bench: Default to all routines in 'perf bench mem' · 27619741
      Ingo Molnar authored
      So few people know that the --routine option to 'perf bench memcpy/memset'
      exists, and would not know that it's capable of testing the kernel's
      memcpy/memset implementations.
      
      Furthermore, 'perf bench mem all' will not run all routines:
      
      	vega:~> perf bench mem all
      	# Running mem/memcpy benchmark...
      	Routine default (Default memcpy() provided by glibc)
      	# Copying 1MB Bytes ...
      
      	     894.454383 MB/Sec
      	       3.844734 GB/Sec (with prefault)
      
      	# Running mem/memset benchmark...
      	Routine default (Default memset() provided by glibc)
      	# Copying 1MB Bytes ...
      
      	       1.220703 GB/Sec
      	       9.042245 GB/Sec (with prefault)
      
      Because misleadingly the 'all' refers to 'all sub-benchmarks', not 'all
      sub-benchmarks and routines'.
      
      Fix all this by making the memcpy/memset routine to default to 'all',
      which results in all the benchmarks being run:
      
      	triton:~> perf bench mem all
      	# Running mem/memcpy benchmark...
      	Routine default (Default memcpy() provided by glibc)
      	# Copying 1MB Bytes ...
      
      	       1.448906 GB/Sec
      	       4.957170 GB/Sec (with prefault)
      	Routine x86-64-unrolled (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
      	# Copying 1MB Bytes ...
      
      	       1.614153 GB/Sec
      	       4.379204 GB/Sec (with prefault)
      	Routine x86-64-movsq (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
      	# Copying 1MB Bytes ...
      
      	       1.570036 GB/Sec
      	       4.264465 GB/Sec (with prefault)
      	Routine x86-64-movsb (movsb-based memcpy() in arch/x86/lib/memcpy_64.S)
      	# Copying 1MB Bytes ...
      
      	       1.788576 GB/Sec
      	       6.554111 GB/Sec (with prefault)
      
      	# Running mem/memset benchmark...
      	Routine default (Default memset() provided by glibc)
      	# Copying 1MB Bytes ...
      
      	       2.082223 GB/Sec
      	       9.126752 GB/Sec (with prefault)
      	Routine x86-64-unrolled (unrolled memset() in arch/x86/lib/memset_64.S)
      	# Copying 1MB Bytes ...
      
      	       5.710892 GB/Sec
      	       8.346688 GB/Sec (with prefault)
      	Routine x86-64-stosq (movsq-based memset() in arch/x86/lib/memset_64.S)
      	# Copying 1MB Bytes ...
      
      	       9.765625 GB/Sec
      	      12.520032 GB/Sec (with prefault)
      	Routine x86-64-stosb (movsb-based memset() in arch/x86/lib/memset_64.S)
      	# Copying 1MB Bytes ...
      
      	       9.668936 GB/Sec
      	      12.682630 GB/Sec (with prefault)
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-3-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      27619741
    • Ingo Molnar's avatar
      perf bench: Improve the 'perf bench mem memcpy' code readability · 13839ec4
      Ingo Molnar authored
       - improve the readability of initializations
       - fix unnecessary double negations
       - fix ugly line breaks
       - fix other small details
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1445241870-24854-2-git-send-email-mingo@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      13839ec4
    • Namhyung Kim's avatar
      perf test: Suppress libtraceevent warnings · 2690c730
      Namhyung Kim authored
      Currently libtraceevent emits warning on unsupported event formats.
      However it'd be better to see them only -v option is given.  To do that,
      it needs to override the warning() function which is used in the
      libtracevent.  Thus add set_warning_routine() same as set_die_routine()
      and check the verbose flag in our warning routine.
      
      Before:
        # perf test 5
         5: parse events tests                                       :
          Warning: [kvmmmu:kvm_mmu_get_page] bad op token {
          Warning: [kvmmmu:kvm_mmu_sync_page] bad op token {
          Warning: [kvmmmu:kvm_mmu_unsync_page] bad op token {
          Warning: [kvmmmu:kvm_mmu_prepare_zap_page] bad op token {
          Warning: [kvmmmu:fast_page_fault] function is_writable_pte not defined
          ...
         Ok
      
      After:
        # perf test 5
         5: parse events tests                                       : Ok
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1445268229-1601-2-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2690c730
    • Namhyung Kim's avatar
      perf test: Silence tracepoint event failures · 87191383
      Namhyung Kim authored
      Currently, when 'perf test' is run by a normal user, it'll fail to
      access tracepoint events.  The output becomes somewhat messy because it
      tries to be nice with long error messages and hints.
      
      IMHO this is not needed for 'perf test' by default and AFAIK 'perf test'
      uses pr_debug() rather than pr_err() for such messages so that one can
      use -v option to see further details on failed testcases if needed.
      
      Before:
        $ perf test
         1: vmlinux symtab matches kallsyms                          : FAILED!
         2: detect openat syscall event                              :Error:
        No permissions to read
        /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat
        Hint:	Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'
        FAILED!
         3: detect openat syscall event on all cpus                  :Error:
        No permissions to read
        /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat
        Hint:	Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'
        FAILED!
         ...
      
      After:
        $ perf test
         1: vmlinux symtab matches kallsyms                          : FAILED!
         2: detect openat syscall event                              : FAILED!
         3: detect openat syscall event on all cpus                  : FAILED!
         ...
      
        $ perf test -v 2
         2: detect openat syscall event                              :
        --- start ---
        test child forked, pid 30575
        Error:	    No permissions to read
        /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat
        Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'
      
        test child finished with -1
        ---- end ----
        detect openat syscall event: FAILED!
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1445268229-1601-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      87191383
  2. 14 Oct, 2015 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · e9363dee
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        - Use the alternative with the most descriptive filename containing
          a vmlinux file for a given build-id, providing a better title line
          for tools such as 'annotate'. (Arnaldo Carvalho de Melo)
      
        - Remove help messages about previous right and left arrow keybidings, that
          were repurposed for horizontal scrolling. (Arnaldo Carvalho de Melo)
      
        - Inform how to reset the symbol filter in the hists browser. (top & report)
          (Arnaldo Carvalho de Melo)
      
        - Add 'm' key for context menu display in the hists browser, that became
          inacessible with the repurposing of the right arrow key for horizontal
          scrolling. (Namhyung Kim)
      
        - Use debug_frame for callchains if eh_frame is unusable. (Rabin Vicent)
      
      Build fixes:
      
        - Fix strict-aliasing breakage with gcc 4.4 in the READ_ONCE/WRITE_ONCE code
          adopted from the kernel tree, that builds with -fno-strict-aliasing while
          tools/perf/ uses -Wstrict-aliasing=3. (Jiri Olsa)
      
        - Fix unw_word_t pointer casts in code using libunwind for callchains,
          fixing the build in at least 32-bit MIPS systems. (Rabin Vicent)
      
        - Work around cross compile build problems related to fixdep. (Jiri Olsa)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e9363dee
  3. 13 Oct, 2015 5 commits
  4. 12 Oct, 2015 3 commits
    • Arnaldo Carvalho de Melo's avatar
      perf hists browser: Inform how to reset the symbol filter · 4aa8e454
      Arnaldo Carvalho de Melo authored
      When in the hists browser, i.e. in 'perf report' or in 'perf top', it is
      possible to press '/' and specify a substring to filter by symbol name.
      
      Clarify how to remove a filter by making the prompt be:
      
         Please enter the name of symbol you want to see.
         To remove the filter later, press / + ENTER
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-vbq2b0kyufwy6p0ctkfswcoe@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4aa8e454
    • Arnaldo Carvalho de Melo's avatar
      perf ui browsers: Remove help messages about use of right and arrow keys · 7727a925
      Arnaldo Carvalho de Melo authored
      They were repurposed for horizontal scrolling, so use just ENTER/ESC in
      the help messages.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: c6c3c02d ("perf hists browser: Implement horizontal scrolling")
      Link: http://lkml.kernel.org/n/tip-n5ar4qg8fs12ax4vhr3rxhxj@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7727a925
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Try the .debug/ DSO cache as a last resort · dc38218e
      Arnaldo Carvalho de Melo authored
      Not as the first attempt at finding a vmlinux for the running kernel,
      this way we get a more informative filename to present in tools, it will
      check that the build-id is the same as the one previously loaded in the
      DSO in dso->build_id, reading from /sys/kernel/notes, for instance.
      
      E.g. in the annotation TUI, going from 'perf top', for the scsi_sg_alloc
      kernel function, in the first line:
      
      Before:
      
      scsi_sg_alloc  /root/.debug/.build-id/28/2777c262e6b3c0451375163c9a81c893218ab1
      
      After:
      
      scsi_sg_alloc  /lib/modules/4.3.0-rc1+/build/vmlinux
      
      And:
      
        # ls -la /root/.debug/.build-id/28/2777c262e6b3c0451375163c9a81c893218ab1
      lrwxrwxrwx. 1 root root 81 Sep 22 16:11 /root/.debug/.build-id/28/2777c262e6b3c0451375163c9a81c893218ab1 -> ../../home/git/build/v4.3.0-rc1+/vmlinux/282777c262e6b3c0451375163c9a81c893218ab1
        # file ~/.debug/home/git/build/v4.3.0-rc1+/vmlinux/282777c262e6b3c0451375163c9a81c893218ab1
      /root/.debug/home/git/build/v4.3.0-rc1+/vmlinux/282777c262e6b3c0451375163c9a81c893218ab1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=282777c262e6b3c0451375163c9a81c893218ab1, not stripped
        #
      
      The same as:
      
        # file /lib/modules/4.3.0-rc1+/build/vmlinux
      /lib/modules/4.3.0-rc1+/build/vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=282777c262e6b3c0451375163c9a81c893218ab1, not stripped
      
      Furthermore:
      
        # sha256sum /lib/modules/4.3.0-rc1+/build/vmlinux
        e7a789bbdc61029ec09140c228e1dd651271f38ef0b8416c0b7d5ff727b98be2  /lib/modules/4.3.0-rc1+/build/vmlinux
        # sha256sum ~/.debug/home/git/build/v4.3.0-rc1+/vmlinux/282777c262e6b3c0451375163c9a81c893218ab1
        e7a789bbdc61029ec09140c228e1dd651271f38ef0b8416c0b7d5ff727b98be2  /root/.debug/home/git/build/v4.3.0-rc1+/vmlinux/282777c262e6b3c0451375163c9a81c893218ab1
        [root@zoo new]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-9y42ikzq3jisiddoi6f07n8z@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dc38218e
  5. 08 Oct, 2015 2 commits
  6. 07 Oct, 2015 5 commits
    • Arnaldo Carvalho de Melo's avatar
      perf python: Support the PERF_RECORD_SWITCH event · ae938802
      Arnaldo Carvalho de Melo authored
      To test it check tools/perf/python/twatch.py, after following the
      instructions there to enable context_switch, output looks like:
      
        [root@zoo linux]# tools/perf/python/twatch.py
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
        cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 0 }
        cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 1 }
        cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 0 }
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 1 }
        cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 1 }
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
        ^CTraceback (most recent call last):
          File "tools/perf/python/twatch.py", line 67, in <module>
            main(context_switch = 1, thread = 31463)
          File "tools/perf/python/twatch.py", line 40, in main
            evlist.poll(timeout = -1)
        KeyboardInterrupt
        [root@zoo linux]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Guy Streeter <streeter@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-1ukistmpamc5z717k80ctcp2@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae938802
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · 00e6fa5f
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fix from Arnaldo Carvalho de Melo:
      
        - Fix build break on (at least) powerpc due to sample_reg_masks, not being
          available for linking. (Sukadev Bhattiprolu)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      00e6fa5f
    • Sukadev Bhattiprolu's avatar
      perf tools: Fix build break on powerpc due to sample_reg_masks · 9fb47654
      Sukadev Bhattiprolu authored
      perf_regs.c does not get built on Powerpc as CONFIG_PERF_REGS is false.
      So the weak definition for 'sample_regs_masks' doesn't get picked up.
      
      Adding perf_regs.o to util/Build unconditionally, exposes a redefinition
      error for 'perf_reg_value()' function (due to the static inline version
      in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that
      function.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: linuxppc-dev@ozlabs.org
      Link: http://lkml.kernel.org/r/20150930182836.GA27858@us.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9fb47654
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · a0eeb8dd
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfixes:
         - Fix a use-after-free bug in the RPC/RDMA client
         - Fix a write performance regression
         - Fix up page writeback accounting
         - Don't try to reclaim unused state owners
         - Fix a NFSv4 nograce recovery hang
         - reset states to use open_stateid when returning delegation
           voluntarily
         - Fix a tracepoint NULL-pointer dereference"
      
      * tag 'nfs-for-4.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix a tracepoint NULL-pointer dereference
        nfs4: reset states to use open_stateid when returning delegation voluntarily
        NFSv4: Fix a nograce recovery hang
        NFSv4.1: nfs4_opendata_check_deleg needs to handle NFS4_OPEN_CLAIM_DELEG_CUR_FH
        NFSv4: Don't try to reclaim unused state owners
        NFS: Fix a write performance regression
        NFS: Fix up page writeback accounting
        xprtrdma: disconnect and flush cqs before freeing buffers
      a0eeb8dd
    • Linus Torvalds's avatar
      Revert "fs: do not prefault sys_write() user buffer pages" · 00a3d660
      Linus Torvalds authored
      This reverts commit 998ef75d.
      
      The commit itself does not appear to be buggy per se, but it is exposing
      a bug in ext4 (and Ted thinks ext3 too, but we solved that by getting
      rid of it).  It's too late in the release cycle to really worry about
      this, even if Dave Hansen has a patch that may actually fix the
      underlying ext4 problem.  We can (and should) revisit this for the next
      release.
      
      The problem is that moving the prefaulting later now exposes a special
      case with partially successful writes that isn't handled correctly.  And
      the prefaulting likely isn't normally even that much of a performance
      issue - it looks like at least one reason Dave saw this in his
      performance tests is that he also ran them on Skylake that now supports
      the new SMAP code, which makes the normally very cheap user space
      prefaulting noticeably more expensive.
      Bisected-and-acked-by: default avatarTed Ts'o <tytso@mit.edu>
      Analyzed-and-acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00a3d660
  7. 06 Oct, 2015 8 commits