15 Oct, 2012

1 commit

  • The UAPI commits forgot to test tooling builds such as tools/perf/,
    and this fixes the fallout.

    Manual conversion.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

13 Oct, 2012

1 commit

  • Perf build fails with the new rbtree implementation:

    ../../lib/rbtree.c:24:36: fatal error: linux/rbtree_augmented.h: No such file or directory compilation terminated.

    Fix by updating the Makefile and adding a btree_augmented.h
    wrapper.

    Reported-and-tested-by: Borislav Petkov
    Signed-off-by: Markus Trippelsdorf
    Cc: Arnaldo Carvalho de Melo
    Cc: Borislav Petkov
    Link: http://lkml.kernel.org/r/20121009180156.GA245@x4
    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Markus Trippelsdorf
     

11 Oct, 2012

1 commit


09 Oct, 2012

1 commit

  • In __rb_erase_color(), we were always setting a node to black after
    exiting the main loop. And in one case, after fixing up the tree to
    satisfy all rbtree invariants, we were setting the current node to root
    just to guarantee a loop exit, at which point the root would be set to
    black. However this is not necessary, as the root of an rbtree is already
    known to be black. The only case where the color flip is required is when
    we exit the loop due to the current node being red, and it's easiest to
    just do the flip at that point instead of doing it after the loop.

    [adrian.hunter@intel.com: perf tools: fix build for another rbtree.c change]
    Signed-off-by: Michel Lespinasse
    Cc: Andrea Arcangeli
    Acked-by: David Woodhouse
    Cc: Rik van Riel
    Cc: Peter Zijlstra
    Cc: Daniel Santos
    Cc: Jens Axboe
    Cc: "Eric W. Biederman"
    Signed-off-by: Adrian Hunter
    Cc: Alexander Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     

11 Sep, 2012

6 commits

  • 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
     
  • Adding memdup function to duplicate region of memory.

    void *memdup(const void *src, size_t len)

    Signed-off-by: Jiri Olsa
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1347295819-23177-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • On some systems (e.g. Android), ALIGN is defined in system headers as
    ALIGN(p). The definition of ALIGN used in perf takes 2 parameters:
    ALIGN(x,a). This leads to redefinition conflicts.

    Redefinition error on Android:
    In file included from util/include/linux/list.h:1:0,
    from util/callchain.h:5,
    from util/hist.h:6,
    from util/session.h:4,
    from util/build-id.h:4,
    from util/annotate.c:11:
    util/include/linux/kernel.h:11:0: error: "ALIGN" redefined [-Werror]
    bionic/libc/include/sys/param.h:38:0: note: this is the location of
    the previous definition

    Conflics with system defined ALIGN in Android:
    util/event.c: In function 'perf_event__synthesize_comm':
    util/event.c:115:32: error: macro "ALIGN" passed 2 arguments, but takes just 1
    util/event.c:115:9: error: 'ALIGN' undeclared (first use in this function)
    util/event.c:115:9: note: each undeclared identifier is reported only once for
    each function it appears in

    In order to avoid this redefinition, ALIGN is renamed to PERF_ALIGN.

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

    Irina Tirdea
     
  • __WORDSIZE is GLibC-specific and is not defined on all systems or glibc
    versions (e.g. Android's bionic does not define it).

    In file included from util/include/linux/bitmap.h:5:0,
    from util/header.h:10,
    from util/session.h:6,
    from util/build-id.h:4,
    from util/annotate.c:11:
    util/include/linux/bitops.h: In function 'set_bit':
    util/include/linux/bitops.h:25:12: error:
    '__WORDSIZE' undeclared (first use in this function)
    util/include/linux/bitops.h:25:12: note:
    each undeclared identifier is reported only once for each function it appears in
    util/include/linux/bitops.h:23:51: error:
    parameter 'addr' set but not used [-Werror=unused-but-set-parameter]
    util/include/linux/bitops.h: In function 'clear_bit':
    util/include/linux/bitops.h:30:12: error:
    '__WORDSIZE' undeclared (first use in this function)
    util/include/linux/bitops.h:28:53: error:
    parameter 'addr' set but not used [-Werror=unused-but-set-parameter]
    In file included from util/header.h:10:0,
    from util/session.h:6,
    from util/build-id.h:4,
    from util/annotate.c:11:
    util/include/linux/bitmap.h: In function 'bitmap_zero':
    util/include/linux/bitmap.h:22:6: error:
    '__WORDSIZE' undeclared (first use in this function)

    Defining __WORDSIZE in perf's headers if it is not already defined.

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

    Irina Tirdea
     
  • Some type definitions are missing from Android or are already defined in
    bionic and lead to redefinition errors.

    Android defines in types.h __le32. Since perf is wrapping with a
    local version, we need to define this constant in the local version too.
    Error in Android:
    In file included from bionic/libc/include/unistd.h:36:0,
    from external/perf/tools/perf/util/util.h:46,
    from external/perf/tools/perf/util/cache.h:5,
    from external/perf/tools/perf/util/abspath.c:1:
    bionic/libc/kernel/common/linux/capability.h:60:2:
    error: unknown type name '__le32'

    roundup() definition is missing:
    util/symbol.c: In function 'symbols__fixup_end':
    util/symbol.c:106: warning: implicit declaration of function 'roundup'
    util/symbol.c:106: warning: nested extern declaration of 'roundup'

    __force macro defined in perf is also defined in libc which leads to
    redefinition errors. In order to avoid these, we guard these definition
    with

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

    Irina Tirdea
     
  • perf is currently including magic.h directly from the kernel. If the
    glibc magic.h is also included, this leads to warnings that the
    constants are redefined. This happens on some systems (e.g. Android).

    Redefinition errors on Android:
    In file included from util/util.h:79:0,
    from util/cache.h:5,
    from util/abspath.c:1:
    util/../../../include/linux/magic.h:5:0:
    error: "AFFS_SUPER_MAGIC" redefined [-Werror]
    bionic/libc/include/sys/vfs.h:53:0:
    note: this is the location of the previous definition
    util/../../../include/linux/magic.h:19:0:
    error: "EFS_SUPER_MAGIC" redefined [-Werror]
    bionic/libc/include/sys/vfs.h:61:0:
    note: this is the location of the previous definition
    util/../../../include/linux/magic.h:26:0:
    error: "HPFS_SUPER_MAGIC" redefined [-Werror]
    bionic/libc/include/sys/vfs.h:67:0:
    note: this is the location of the previous definition

    Only two constants from magic.h are used by perf (DEBUGFS_MAGIC and
    SYSFS_MAGIC). This fix provides a wrapper for magic.h that includes only
    these constants instead of including the kernel header file directly.

    Signed-off-by: Irina Tirdea
    Acked-by: Pekka Enberg
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Irina Tirdea
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1347315303-29906-2-git-send-email-irina.tirdea@intel.com
    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
     

08 Sep, 2012

1 commit

  • Fixes:

    ../../lib/rbtree.c: In function 'rb_insert_color':
    ../../lib/rbtree.c:95:9: error: 'true' undeclared (first use in this function)
    ../../lib/rbtree.c:95:9: note: each undeclared identifier is reported only once for each function it appears in
    ../../lib/rbtree.c: In function '__rb_erase_color':
    ../../lib/rbtree.c:216:9: error: 'true' undeclared (first use in this function)
    ../../lib/rbtree.c: In function 'rb_erase':
    ../../lib/rbtree.c:368:2: error: unknown type name 'bool'
    make: *** [util/rbtree.o] Error 1

    Signed-off-by: Adrian Hunter
    Cc: Michel Lespinasse
    Cc: Andrew Morton
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/50406F60.5040707@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

12 Aug, 2012

1 commit

  • This brings the support for DWARF cfi unwinding on perf post
    processing. Call frame informations are retrieved and then passed
    to libunwind that requests memory and register content from the
    applications.

    Adding unwind object to handle the user stack backtrace based
    on the user register values and user stack dump.

    The unwind object access the libunwind via remote interface
    and provides to it all the necessary data to unwind the stack.

    The unwind interface provides following function:
    unwind__get_entries

    And callback (specified in above function) to retrieve
    the backtrace entries:
    typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry,
    void *arg);

    Signed-off-by: Jiri Olsa
    Original-patch-by: Frederic Weisbecker
    Cc: "Frank Ch. Eigler"
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1344345647-11536-12-git-send-email-jolsa@redhat.com
    [ Replaced use of perf_session by usage of perf_evsel ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

30 Jun, 2012

1 commit

  • Adding round_up and round_down macros. They will be used in upcoming
    patches.

    Signed-off-by: Jiri Olsa
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1340120894-9465-21-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

11 Jun, 2012

1 commit

  • Based on Jiri's latest attempt:
    https://lkml.org/lkml/2012/5/16/61

    Basically, adds_features should be byte swapped assuming unsigned
    longs are either 8-bytes (u64) or 4-bytes (u32).

    Fixes 32-bit ppc dumping 64-bit x86 feature data:
    ========
    captured on: Sun May 20 19:23:23 2012
    hostname : nxos-vdc-dev3
    os release : 3.4.0-rc7+
    perf version : 3.4.rc4.137.g978da3
    arch : x86_64
    nrcpus online : 16
    nrcpus avail : 16
    cpudesc : Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
    cpuid : GenuineIntel,6,26,5
    total memory : 24680324 kB
    ...

    Verified 64-bit x86 can still dump feature data for 32-bit ppc.

    Signed-off-by: David Ahern
    Reviewed-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/4FBBB539.5010805@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

26 Mar, 2012

1 commit

  • When merged to Linus's latest tree the perf build is broken
    due to following change in lib/rbtree.c object:

    lib: reduce the use of module.h wherever possible
    commit 8bc3bcc93a2b4e47d5d410146f6546bca6171663
    Author: Paul Gortmaker
    Date: Wed Nov 16 21:29:17 2011 -0500

    We need to move module.h header into export.h.

    Signed-off-by: Jiri Olsa
    Cc: acme@redhat.com
    Cc: a.p.zijlstra@chello.nl
    Cc: paulus@samba.org
    Cc: cjashfor@linux.vnet.ibm.com
    Cc: fweisbec@gmail.com
    Link: http://lkml.kernel.org/r/1332753425-3299-1-git-send-email-jolsa@redhat.com
    Signed-off-by: Ingo Molnar

    Jiri Olsa
     

24 Mar, 2012

1 commit

  • This renames for_each_set_bit_cont() to for_each_set_bit_from() because
    it is analogous to list_for_each_entry_from() in list.h rather than
    list_for_each_entry_continue().

    This doesn't remove for_each_set_bit_cont() for now.

    Signed-off-by: Akinobu Mita
    Cc: Robert Richter
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

21 Mar, 2012

1 commit

  • Pull perf events changes for v3.4 from Ingo Molnar:

    - New "hardware based branch profiling" feature both on the kernel and
    the tooling side, on CPUs that support it. (modern x86 Intel CPUs
    with the 'LBR' hardware feature currently.)

    This new feature is basically a sophisticated 'magnifying glass' for
    branch execution - something that is pretty difficult to extract from
    regular, function histogram centric profiles.

    The simplest mode is activated via 'perf record -b', and the result
    looks like this in perf report:

    $ perf record -b any_call,u -e cycles:u branchy

    $ perf report -b --sort=symbol
    52.34% [.] main [.] f1
    24.04% [.] f1 [.] f3
    23.60% [.] f1 [.] f2
    0.01% [k] _IO_new_file_xsputn [k] _IO_file_overflow
    0.01% [k] _IO_vfprintf_internal [k] _IO_new_file_xsputn
    0.01% [k] _IO_vfprintf_internal [k] strchrnul
    0.01% [k] __printf [k] _IO_vfprintf_internal
    0.01% [k] main [k] __printf

    This output shows from/to branch columns and shows the highest
    percentage (from,to) jump combinations - i.e. the most likely taken
    branches in the system. "branches" can also include function calls
    and any other synchronous and asynchronous transitions of the
    instruction pointer that are not 'next instruction' - such as system
    calls, traps, interrupts, etc.

    This feature comes with (hopefully intuitive) flat ascii and TUI
    support in perf report.

    - Various 'perf annotate' visual improvements for us assembly junkies.
    It will now recognize function calls in the TUI and by hitting enter
    you can follow the call (recursively) and back, amongst other
    improvements.

    - Multiple threads/processes recording support in perf record, perf
    stat, perf top - which is activated via a comma-list of PIDs:

    perf top -p 21483,21485
    perf stat -p 21483,21485 -ddd
    perf record -p 21483,21485

    - Support for per UID views, via the --uid paramter to perf top, perf
    report, etc. For example 'perf top --uid mingo' will only show the
    tasks that I am running, excluding other users, root, etc.

    - Jump label restructurings and improvements - this includes the
    factoring out of the (hopefully much clearer) include/linux/static_key.h
    generic facility:

    struct static_key key = STATIC_KEY_INIT_FALSE;

    ...

    if (static_key_false(&key))
    do unlikely code
    else
    do likely code

    ...
    static_key_slow_inc();
    ...
    static_key_slow_inc();
    ...

    The static_key_false() branch will be generated into the code with as
    little impact to the likely code path as possible. the
    static_key_slow_*() APIs flip the branch via live kernel code patching.

    This facility can now be used more widely within the kernel to
    micro-optimize hot branches whose likelihood matches the static-key
    usage and fast/slow cost patterns.

    - SW function tracer improvements: perf support and filtering support.

    - Various hardenings of the perf.data ABI, to make older perf.data's
    smoother on newer tool versions, to make new features integrate more
    smoothly, to support cross-endian recording/analyzing workflows
    better, etc.

    - Restructuring of the kprobes code, the splitting out of 'optprobes',
    and a corner case bugfix.

    - Allow the tracing of kernel console output (printk).

    - Improvements/fixes to user-space RDPMC support, allowing user-space
    self-profiling code to extract PMU counts without performing any
    system calls, while playing nice with the kernel side.

    - 'perf bench' improvements

    - ... and lots of internal restructurings, cleanups and fixes that made
    these features possible. And, as usual this list is incomplete as
    there were also lots of other improvements

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (120 commits)
    perf report: Fix annotate double quit issue in branch view mode
    perf report: Remove duplicate annotate choice in branch view mode
    perf/x86: Prettify pmu config literals
    perf report: Enable TUI in branch view mode
    perf report: Auto-detect branch stack sampling mode
    perf record: Add HEADER_BRANCH_STACK tag
    perf record: Provide default branch stack sampling mode option
    perf tools: Make perf able to read files from older ABIs
    perf tools: Fix ABI compatibility bug in print_event_desc()
    perf tools: Enable reading of perf.data files from different ABI rev
    perf: Add ABI reference sizes
    perf report: Add support for taken branch sampling
    perf record: Add support for sampling taken branch
    perf tools: Add code to support PERF_SAMPLE_BRANCH_STACK
    x86/kprobes: Split out optprobe related code to kprobes-opt.c
    x86/kprobes: Fix a bug which can modify kernel code permanently
    x86/kprobes: Fix instruction recovery on optimized path
    perf: Add callback to flush branch_stack on context switch
    perf: Disable PERF_SAMPLE_BRANCH_* when not supported
    perf/x86: Add LBR software filter support for Intel CPUs
    ...

    Linus Torvalds
     

14 Mar, 2012

1 commit

  • On ancient systems I get this build failure:

    util/../../../arch/x86/include/asm/unistd.h:67:29: error: asm/unistd_64.h: No such file or directory
    In file included from util/cache.h:7,
    from builtin-test.c:8:
    util/../perf.h: In function ‘sys_perf_event_open’:In file included from util/../perf.h:16
    perf.h:170: error: ‘__NR_perf_event_open’ undeclared (first use in this function)

    The reason is that this old system does not have the split
    unistd.h headers yet, from which to pick up the syscall
    definitions.

    Add the syscall numbers to the already existing i386 and x86_64
    blocks in perf.h, and also provide empty include file stubs.

    With this patch perf builds and works fine on 5 years old
    user-space as well.

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/n/tip-jctwg64le1w47tuaoeyftsg9@git.kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

14 Feb, 2012

1 commit

  • Adding implementation os bitmap_or function to the bitmap object. It is
    stolen from the kernel lib/bitmap.o object.

    It is used in upcomming patches.

    Cc: Corey Ashford
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1327674868-10486-5-git-send-email-jolsa@redhat.com
    Signed-off-by: Jiri Olsa
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

25 Jan, 2012

1 commit

  • This simply clones the respective memcpy() implementation.

    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/4F16D743020000780006D735@nat28.tlf.novell.com
    Signed-off-by: Jan Beulich
    Signed-off-by: Arnaldo Carvalho de Melo

    Jan Beulich
     

24 Dec, 2011

1 commit


18 Aug, 2011

1 commit

  • Upstream glibc commit 295e904 added a definition for __attribute_const__
    to cdefs.h. This causes the following error when building perf:

    util/include/linux/compiler.h:8:0: error: "__attribute_const__"
    redefined [-Werror] /usr/include/sys/cdefs.h:226:0: note: this is the
    location of the previous definition

    Wrap __attribute_const__ in #ifndef as we do for __always_inline.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110818113720.GL2227@zod.bos.redhat.com
    Signed-off-by: Josh Boyer
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Boyer
     

26 May, 2011

1 commit

  • Where /usr/include/linux/const.h is not present, e.g. RHEL5.

    Reported-by: Srikar Dronamraju
    Cc: Srikar Dronamraju
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Link: http://lkml.kernel.org/n/tip-ypcw2mu0w7dl1rrc6ncz3pee@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

24 May, 2011

1 commit

  • …l/git/tip/linux-2.6-tip

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf tools: Fix sample size bit operations
    perf tools: Fix ommitted mmap data update on remap
    watchdog: Change the default timeout and configure nmi watchdog period based on watchdog_thresh
    watchdog: Disable watchdog when thresh is zero
    watchdog: Only disable/enable watchdog if neccessary
    watchdog: Fix rounding bug in get_sample_period()
    perf tools: Propagate event parse error handling
    perf tools: Robustify dynamic sample content fetch
    perf tools: Pre-check sample size before parsing
    perf tools: Move evlist sample helpers to evlist area
    perf tools: Remove junk code in mmap size handling
    perf tools: Check we are able to read the event size on mmap

    Linus Torvalds
     

22 May, 2011

1 commit


21 May, 2011

1 commit

  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 May, 2011

1 commit

  • perf bench needs this to build the kernel's memcpy routine:

    In file included from bench/mem-memcpy-x86-64-asm.S:2:0:
    bench/../../../arch/x86/lib/memcpy_64.S:7:33: fatal error: asm/alternative-asm.h: No such file or directory

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/n/tip-c5d41xibgullk8h2280q4gv0@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

23 Jan, 2011

2 commits

  • Killing two more perf wide global variables: nr_counters and evsel_list
    as a list_head.

    There are more operations that will need more fields in perf_evlist,
    like the pollfd for polling all the fds in a list of evsel instances.

    Use option->value to pass the evsel_list to parse_{events,filters}.

    LKML-Reference:
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • We need the definiton for __always_inline in bitops.h to fix the build
    on distros where it isn't available or compiler.h doesn't get included
    indirectly.

    One of the fixes needed to build perf on RHEL4 systems, for instance.

    Cc: Eric Dumazet
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Nov, 2010

1 commit

  • Collecting build-ids for long running sessions may take a long time
    because it needs to traverse the whole just collected perf.data stream
    of events, marking the DSOs that had hits and then looking for the
    .note.gnu.build-id ELF section.

    For things like the 'trace' tool that records and right away consumes
    the data on systems where its unlikely that the DSOs being monitored
    will change while 'trace' runs, it is desirable to remove build id
    collection, so add a -B/--no-buildid option to perf record to allow such
    use case.

    Longer term we'll avoid all this if we, at DSO load time, in the kernel,
    take advantage of this slow code path to collect the build-id and stash
    it somewhere, so that we can insert it in the PERF_RECORD_MMAP event.

    Reported-by: Thomas Gleixner
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Nov, 2010

1 commit

  • …_64.S memcpy routines via 'perf bench mem'

    This patch ports arch/x86/lib/memcpy_64.S to perf bench mem
    memcpy for benchmarking memcpy() in userland with tricky and
    dirty way.

    util/include/asm/cpufeature.h, util/include/asm/dwarf2.h, and
    util/include/linux/linkage.h are mostly dummy files with small
    wrappers, so that we are able to include memcpy_64.S
    unmodified.

    Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
    Cc: h.mitake@gmail.com
    Cc: Miao Xie <miaox@cn.fujitsu.com>
    Cc: Ma Ling <ling.ma@intel.com>
    Cc: Zhao Yakui <yakui.zhao@intel.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Andi Kleen <andi@firstfloor.org>
    LKML-Reference: <1290668693-27068-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    Hitoshi Mitake
     

13 Aug, 2010

1 commit

  • This commit:

    de5d9bf: Move list types from to .

    Moved the list head data types out of list.h, breaking the build.
    Add them to the perf types.h as well.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Frederic Weisbecker
    Cc: Paul Mackerras
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

07 Aug, 2010

1 commit


18 May, 2010

1 commit

  • To avoid problems like the one fixed by Stephane Eranian in 3de29ca, now
    we'll got this instead:

    bench/sched-messaging.c:259: error: negative width in bit-field ‘’
    bench/sched-messaging.c:261: error: negative width in bit-field ‘’

    Which is rather cryptic, but is how BUILD_BUG_ON_ZERO works, so kernel
    hackers should be already used to this.

    With it in place found some problems, fixed by changing the affected
    variables to sensible types or changed some OPT_INTEGER to OPT_UINTEGER.

    Next csets will go thru converting each of the remaining OPT_ so that
    review can be made easier by grouping changes per type per patch.

    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 May, 2010

1 commit

  • We need to refactor code to be explicitely shared by the kernel and at
    least the tools/ userspace programs, so, till we do that, copy the bare
    minimum bitmap/bitops code needed by tools/perf.

    Reported-by: "H. Peter Anvin"
    Cc: Frédéric Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

22 Apr, 2010

1 commit

  • The perf userspace tool included some architecture specific code to map
    registers from the DWARF register number into the names used by the regs
    and stack access API.

    This moves the architecture specific code out into a separate
    arch/x86 directory along with the infrastructure required to use it.

    Signed-off-by: Ian Munsie
    Acked-by: Masami Hiramatsu
    Signed-off-by: Paul Mackerras

    Ian Munsie
     

26 Mar, 2010

1 commit


12 Mar, 2010

1 commit


04 Feb, 2010

1 commit