20 Apr, 2017

1 commit


27 Mar, 2017

1 commit

  • We got it from the git sources but never used it for anything, with the
    place where this would be somehow used remaining:

    static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
    {
    prefix = NULL;
    if (p->option & RUN_SETUP)
    prefix = NULL; /* setup_perf_directory(); */

    Ditch it.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

24 Oct, 2016

1 commit


24 Aug, 2016

1 commit

  • Following kernel practices, using linux/time64.h

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-xdtmguafva17wp023sxojiib@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Apr, 2016

1 commit


18 Dec, 2015

1 commit

  • Move the subcommand-related files from perf to a new library named
    libsubcmd.a.

    Since we're moving files anyway, go ahead and rename 'exec_cmd.*' to
    'exec-cmd.*' to be consistent with the naming of all the other files.

    Signed-off-by: Josh Poimboeuf
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/c0a838d4c878ab17fee50998811612b2281355c1.1450193761.git.jpoimboe@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Poimboeuf
     

20 Oct, 2015

10 commits

  • To avoid this splat with gcc 4.4.7:

    cc1: warnings being treated as errors
    bench/mem-functions.c:273: error: missing initializer
    bench/mem-functions.c:273: error: (near initialization for ‘memcpy_functions[4].desc’)
    bench/mem-functions.c:366: error: missing initializer
    bench/mem-functions.c:366: error: (near initialization for ‘memset_functions[4].desc’)

    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/n/tip-0s8o6tgw1pdwvdv02llb9tkd@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    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: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    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: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1445241870-24854-12-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • - 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1445241870-24854-11-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1445241870-24854-10-git-send-email-mingo@kernel.org
    [ Update perf-bench man page ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1445241870-24854-9-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    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: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    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: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 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: Ingo Molnar
    Cc: David Ahern
    Cc: Hitoshi Mitake
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    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: Arnaldo Carvalho de Melo

    Ingo Molnar