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 Aug, 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
     

17 Jan, 2015

1 commit

  • This is due to duplicated unistd inclusion (via uClibc headers + kernel headers)
    Also seen on ARM uClibc based tools

    ------- ARC build ---------->8-------------

    CC util/evlist.o
    In file included from
    ~/arc/k.org/arch/arc/include/uapi/asm/unistd.h:25:0,
    from util/../perf-sys.h:10,
    from util/../perf.h:15,
    from util/event.h:7,
    from util/event.c:3:
    ~/arc/k.org/include/uapi/asm-generic/unistd.h:906:0:
    warning: "__NR_fcntl64" redefined [enabled by default]
    #define __NR_fcntl64 __NR3264_fcntl
    ^
    In file included from
    ~/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/sys/syscall.h:24:0,
    from util/../perf-sys.h:6,
    ----------------->8-------------------

    ------- ARM build ---------->8-------------

    CC FPIC plugin_scsi.o
    In file included from util/../perf-sys.h:9:0,
    from util/../perf.h:15,
    from util/cache.h:7,
    from perf.c:12:
    ~/arc/k.org/arch/arm/include/uapi/asm/unistd.h:28:0:
    warning: "__NR_restart_syscall" redefined [enabled by default]
    In file included from
    ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/syscall.h:25:0,
    from util/../perf-sys.h:6,
    from util/../perf.h:15,
    from util/cache.h:7,
    from perf.c:12:
    ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/sysnum.h:17:0:
    note: this is the location of the previous definition
    ----------------->8-------------------

    Signed-off-by: Vineet Gupta
    Cc: Alexey Brodkin
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1421156604-30603-4-git-send-email-vgupta@synopsys.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Vineet Gupta
     

11 Oct, 2013

1 commit

  • Allow the measurement of thread versus process context switch
    performance.

    The default stays at 'process' based measurement, like lmbench's lat_ctx
    benchmark.

    Sample output:

    comet:~/tip/tools/perf> taskset 1 ./perf bench sched pipe
    # Running sched/pipe benchmark...
    # Executed 1000000 pipe operations between two processes

    Total time: 4.138 [sec]

    4.138729 usecs/op
    241620 ops/sec
    comet:~/tip/tools/perf> taskset 1 ./perf bench sched pipe --threaded
    # Running sched/pipe benchmark...
    # Executed 1000000 pipe operations between two threads

    Total time: 3.667 [sec]

    3.667667 usecs/op
    272652 ops/sec

    Signed-off-by: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/r/20130917114256.GA31159@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

11 Sep, 2012

1 commit

  • perf defines both __used and __unused variables to use for marking
    unused variables. The variable __used is defined to
    __attribute__((__unused__)), which contradicts the kernel definition to
    __attribute__((__used__)) for new gcc versions. On Android, __used is
    also defined in system headers and this leads to warnings like: warning:
    '__used__' attribute ignored

    __unused is not defined in the kernel and is not a standard definition.
    If __unused is included everywhere instead of __used, this leads to
    conflicts with glibc headers, since glibc has a variables with this name
    in its headers.

    The best approach is to use __maybe_unused, the definition used in the
    kernel for __attribute__((unused)). In this way there is only one
    definition in perf sources (instead of 2 definitions that point to the
    same thing: __used and __unused) and it works on both Linux and Android.
    This patch simply replaces all instances of __used and __unused with
    __maybe_unused.

    Signed-off-by: Irina Tirdea
    Acked-by: Pekka Enberg
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
    [ committer note: fixed up conflict with a116e05 in builtin-sched.c ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Irina Tirdea
     

09 Sep, 2012

1 commit

  • When NDEBUG is defined, the assert macro will be expanded to nothing.
    Some assert calls used in perf are also including some functionality
    (e.g. system calls), not only validity checks. Therefore, if NDEBUG is
    defined, this functionality will be removed along with the assert. Perf
    also defines BUG_ON based on assert, so it has the same problem.

    Define BUG_ON so that the condition will be executed when NDEBUG is
    defined. Replace the assert statements that have these side effects
    with BUG_ON.

    For defining BUG_ON, use "if (cond) {}" insted of "if (cond) ;" because
    in the latter case build fails with "error: suggest braces around empty
    body in an ‘if’ statement [-Werror=empty-body]"

    Suggested-by: Peter Zijlstra
    Signed-off-by: Irina Tirdea
    Reviewed-by: Namhyung Kim
    Reviewed-by: Pekka Enberg
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1347082551-2394-1-git-send-email-irina.tirdea@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Irina Tirdea
     

07 Feb, 2011

1 commit

  • GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf
    due to the -Werror=unused-but-set-variable flag.

    I've gone through and annotated some of the assignments that had side
    effects (ie: return value from a function) with the __used annotation,
    and in some cases, just removed unused code.

    In a few cases, we were assigning something useful, but not using it in
    later parts of the function.

    kyle@dreadnought:~/src% gcc --version
    gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3)

    Cc: Ingo Molnar
    LKML-Reference:
    Signed-off-by: Kyle McMartin
    [ committer note: Fixed up the annotation fixes, as that code moved recently ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Kyle McMartin
     

08 Apr, 2010

1 commit


14 Dec, 2009

2 commits

  • Here, tvec->tv_usec is "unsigned int" not "unsigned long".

    Since the type is different on every platform, it's probably
    best to just use long printf formats and cast.

    Signed-off-by: David S. Miller
    Cc: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    David Miller
     
  • This patch adds a new "all" pseudo subsystem and an "all" pseudo
    suite. These are for testing all subsystem and its all suite, or
    all suite of one subsystem.

    (This patch also contains a few trivial comment fixes for
    bench/* and output style fixes. I judged that there are no
    necessity to make them into individual patch.)

    Example of use:

    | % ./perf bench sched all # Test all suites of sched subsystem
    | # Running sched/messaging benchmark...
    | # 20 sender and receiver processes per group
    | # 10 groups == 400 processes run
    |
    | Total time: 0.414 [sec]
    |
    | # Running sched/pipe benchmark...
    | # Extecuted 1000000 pipe operations between two tasks
    |
    | Total time: 10.999 [sec]
    |
    | 10.999317 usecs/op
    | 90914 ops/sec
    |
    | % ./perf bench all # Test all suites of all subsystems
    | # Running sched/messaging benchmark...
    | # 20 sender and receiver processes per group
    | # 10 groups == 400 processes run
    |
    | Total time: 0.420 [sec]
    |
    | # Running sched/pipe benchmark...
    | # Extecuted 1000000 pipe operations between two tasks
    |
    | Total time: 11.741 [sec]
    |
    | 11.741346 usecs/op
    | 85169 ops/sec
    |
    | # Running mem/memcpy benchmark...
    | # Copying 1MB Bytes from 0x7ff33e920010 to 0x7ff3401ae010 ...
    |
    | 808.407437 MB/Sec

    Signed-off-by: Hitoshi Mitake
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Hitoshi Mitake
     

11 Nov, 2009

1 commit

  • This patch improves sched-pipe.c with more comfortable output.

    Change points are comment style description and
    formatting numerical values and its units.

    Example:

    | % ./perf bench sched pipe
    | # Running sched/pipe benchmark...
    | # Extecuted 1000000 pipe operations between two tasks
    |
    | Total time:5.822 [sec]
    |
    | 5.822553 usecs/op
    | 171745 ops/sec

    Signed-off-by: Hitoshi Mitake
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Hitoshi Mitake
     

10 Nov, 2009

1 commit

  • This patch modifies builtin-pipe.c for processing common
    options. The first option added is "--format".
    Users of perf bench will be able to specify output style by
    --format.

    Usage example:

    % ./perf bench sched pipe # with no style specify
    (executing 1000000 pipe operations between two tasks)

    Total time:5.855 sec
    5.855061 usecs/op
    170792 ops/sec

    % ./perf bench --format=simple sched pipe # specified simple
    5.988

    Signed-off-by: Hitoshi Mitake
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Paul Mackerras

    Hitoshi Mitake
     

09 Nov, 2009

1 commit

  • Ingo reported this small 'perf bench sched pipe' output problem:

    | $ ./perf bench sched pipe
    | (executing 1000000 pipe operations between two tasks)
    |
    | Total time:4.898 sec
    | $ 4.898586 usecs/op
    | 204140 ops/sec
    |
    | the shell prompt came back before the usecs/op and ops/sec line
    | was printed. Process teardown race, lack of wait() or so?

    This caused by lack of calling waitpid() by parent process,
    so I added it.

    Signed-off-by: Hitoshi Mitake
    Cc: Rusty Russell
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Mike Galbraith
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Jiri Kosina
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Hitoshi Mitake
     

08 Nov, 2009

1 commit

  • This patch adds bench/sched-pipe.c.

    bench/sched-pipe.c is a benchmark program
    to measure performance of pipe() system call.
    This benchmark is based on pipe-test-1m.c by Ingo Molnar:

    http://people.redhat.com/mingo/cfs-scheduler/tools/pipe-test-1m.c

    Example of use:

    % perf bench sched pipe
    (executing 1000000 pipe operations between two tasks)

    Total time:4.499 sec
    4.499179 usecs/op
    222262 ops/sec

    % perf bench sched pipe -s -l 1000
    0.015

    Signed-off-by: Hitoshi Mitake
    Cc: Rusty Russell
    Cc: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Arnaldo Carvalho de Melo
    Cc: fweisbec@gmail.com
    Cc: Jiri Kosina
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Hitoshi Mitake