20 Apr, 2014

3 commits

  • In the current version, when using perf record, if something goes
    wrong in tools/perf/builtin-record.c:375
    session = perf_session__new(file, false, NULL);

    The error message:
    "Not enough memory for reading per file header"

    is issued. This error message seems to be outdated and is not very
    helpful. This patch proposes to replace this error message by
    "Perf session creation failed"

    I believe this issue has been brought to lkml:
    https://lkml.org/lkml/2014/2/24/458
    although this patch only tackles a (small) part of the issue.

    Additionnaly, this patch improves error reporting in
    tools/perf/util/data.c open_file_write.

    Currently, if the call to open fails, the user is unaware of it.
    This patch logs the error, before returning the error code to
    the caller.

    Reported-by: Will Deacon
    Signed-off-by: Adrien BAK
    Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
    [ Reorganize the changelog into paragraphs ]
    [ Added empty line after fd declaration in open_file_write ]
    Signed-off-by: Jiri Olsa

    Adrien BAK
     
  • pert-report doesn't resolve function names in VDSO:

    $ perf report --stdio -g flat,0.0,15,callee --sort pid
    ...
    8.76%
    0x7fff6b1fe861
    __gettimeofday
    ACE_OS::gettimeofday()
    ...

    In this case symbol values should be adjusted the same way as for executables,
    relocatable objects and prelinked libraries.

    After fix:

    $ perf report --stdio -g flat,0.0,15,callee --sort pid
    ...
    8.76%
    __vdso_gettimeofday
    __gettimeofday
    ACE_OS::gettimeofday()

    Signed-off-by: Vladimir Nikulichev
    Tested-by: Namhyung Kim
    Reviewed-by: Adrian Hunter
    Link: http://lkml.kernel.org/r/969812.163009436-sendEmail@nvs
    Signed-off-by: Jiri Olsa

    Vladimir Nikulichev
     
  • Every event in the perf-kvm has a 'stats' structure, which contains
    max/min/average/etc times of handling this event.
    The problem is that the 'perf-kvm stat report' command always shows
    that 'min time' is 0us for every event. Example:

    # perf kvm stat report

    Analyze events for all VCPUs:

    VM-EXIT Samples Samples% Time% Min Time Max Time Avg time
    [..]
    0xB2 MSCH 12 0.07% 0.00% 0us 8us 7.31us ( +- 2.11% )
    0xB2 CHSC 12 0.07% 0.00% 0us 18us 9.39us ( +- 9.49% )
    0xB2 STPX 8 0.05% 0.00% 0us 2us 1.88us ( +- 7.18% )
    0xB2 STSI 7 0.04% 0.00% 0us 44us 16.49us ( +- 38.20% )
    [..]

    This happens because the 'stats' structure is not initialized and
    stats->min equals to 0. Lets initialize the structure for every
    event after its allocation using init_stats() function. This initializes
    stats->min to -1 and makes 'Min time' statistics counting work:

    # perf kvm stat report

    Analyze events for all VCPUs:

    VM-EXIT Samples Samples% Time% Min Time Max Time Avg time
    [..]
    0xB2 MSCH 12 0.07% 0.00% 6us 8us 7.31us ( +- 2.11% )
    0xB2 CHSC 12 0.07% 0.00% 7us 18us 9.39us ( +- 9.49% )
    0xB2 STPX 8 0.05% 0.00% 1us 2us 1.88us ( +- 7.18% )
    0xB2 STSI 7 0.04% 0.00% 1us 44us 16.49us ( +- 38.20% )
    [..]

    Signed-off-by: Alexander Yarygin
    Signed-off-by: Christian Borntraeger
    Reviewed-by: David Ahern
    Link: http://lkml.kernel.org/r/1397053319-2130-3-git-send-email-borntraeger@de.ibm.com
    [ Fixing the perf examples changelog output ]
    Signed-off-by: Jiri Olsa

    Alexander Yarygin
     

15 Apr, 2014

2 commits


14 Apr, 2014

11 commits

  • Conflicts:
    tools/perf/bench/numa.c

    Pull perf fixes from Jiri Olsa.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • perf stat did initialize the stats structure used to compute
    stddev etc. incorrectly. It merely zeroes it. But one member
    (min) needs to be set to a non zero value. This causes min
    to be not computed at all. Call init_stats() correctly.

    It doesn't matter for stat currently because it doesn't use
    min, but it's still better to do it correctly.

    The other users of statistics are already correct.

    Signed-off-by: Andi Kleen
    Acked-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/1395768699-16060-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Jiri Olsa

    Andi Kleen
     
  • Currently,

    $ perf bench numa mem

    errors out with usage information. To make this more user-friendly, let
    us provide a minimum set of default values required for a test
    run. As an added bonus,

    $ perf bench all

    now goes all the way to completion.

    Signed-off-by: Ramkumar Ramachandra
    Cc: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395964219-22173-2-git-send-email-artagnon@gmail.com
    Signed-off-by: Jiri Olsa

    Ramkumar Ramachandra
     
  • At the end of

    $ perf bench all

    the program segfaults because it attempts to dereference a NULL
    pointer. Fix this fault.

    Signed-off-by: Ramkumar Ramachandra
    Cc: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395964219-22173-4-git-send-email-artagnon@gmail.com
    Signed-off-by: Jiri Olsa

    Ramkumar Ramachandra
     
  • Signed-off-by: Ramkumar Ramachandra
    Cc: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395964219-22173-3-git-send-email-artagnon@gmail.com
    Signed-off-by: Jiri Olsa

    Ramkumar Ramachandra
     
  • The dwarf_getcfi() only checks .debug_frame section for CFI, but as
    most binaries only have .eh_frame it'd return NULL and it makes
    some variables inaccessible.

    Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
    add probe to more variables.

    Signed-off-by: Namhyung Kim
    Acked-by: Masami Hiramatsu
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/1396854348-9296-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     
  • As Namhyung reported(https://lkml.org/lkml/2014/4/1/89),
    current perf-probe -L option doesn't handle errors in line-range
    searching correctly. It causes a SEGV if an error occured in the
    line-range searching.

    ----
    $ perf probe -x ./perf -v -L map__load
    Open Debuginfo file: /home/namhyung/project/linux/tools/perf/perf
    fname: util/map.c, lineno:153
    New line range: 153 to 2147483647
    path: (null)
    Segmentation fault (core dumped)
    ----

    This is because line_range_inline_cb() ignores errors
    from find_line_range_by_line() which means that lr->path is
    already freed on the error path in find_line_range_by_line().
    As a result, get_real_path() accesses the lr->path and it
    causes a NULL pointer exception.

    This fixes line_range_inline_cb() to handle the error correctly,
    and report it to the caller.

    Anyway, this just fixes a possible SEGV bug, Namhyung's patch
    is also required.

    Reported-by: Namhyung Kim
    Signed-off-by: Masami Hiramatsu
    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20140402054831.19080.27006.stgit@ltc230.yrl.intra.hitachi.co.jp
    Signed-off-by: Jiri Olsa

    Masami Hiramatsu
     
  • The commit 5a62257a3ddd1 ("perf probe: Replace line_list with
    intlist") replaced line_list to intlist but it has a problem that if a
    same line was added again, it'd return -EEXIST rather than 1.

    Since line_range_walk_cb() only checks the result being negative, it
    resulted in failure or segfault sometimes.

    Signed-off-by: Namhyung Kim
    Acked-by: Masami Hiramatsu
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/1396327677-3657-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     
  • The Makefile logic sets FEATURE_CHECKS_CFLAGS-libdw-dwarf-unwind and
    FEATURE_CHECKS_LDFLAGS-libdw-dwarf-unwind only if LIBDW_DIR is
    defined. This means that under a normal setup,

    $ make NO_LIBUNWIND=1

    won't automatically pick up libdw. Fix this.

    Signed-off-by: Ramkumar Ramachandra
    Acked-by: Jean Pihet
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395873845-466-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Jiri Olsa

    Ramkumar Ramachandra
     
  • I.e. do the same as when NO_LIBELF is explicitely passed in the 'make'
    command line, fixing this:

    Auto-detecting system features:
    ... dwarf: [ OFF ]
    ... glibc: [ on ]
    ... gtk2: [ OFF ]
    ... libaudit: [ OFF ]
    ... libbfd: [ OFF ]
    ... libelf: [ OFF ]
    ... libunwind: [ OFF ]
    ... libdw-dwarf-unwind: [ OFF ]
    ... DWARF post unwind library: libdw

    CC /tmp/build/perf/util/symbol-minimal.o
    CC /tmp/build/perf/util/unwind-libdw.o
    arch/x86/util/unwind-libdw.c:1:30: fatal error: elfutils/libdwfl.h: No such file or directory
    compilation terminated.
    CC /tmp/build/perf/tests/keep-tracking.o
    util/unwind-libdw.c:2:28: fatal error: elfutils/libdw.h: No such file or directory
    compilation terminated.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-e39j1yxanltjx4t0msse63ax@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa

    Arnaldo Carvalho de Melo
     
  • On perf top, the -s option is used for --sort, but the man page
    contains invalid documentation of -s option for --sym-annotate.

    Signed-off-by: Namhyung Kim
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1395193578-27098-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     

06 Apr, 2014

1 commit

  • Pull arch/tile updates from Chris Metcalf:
    "These fix a few stray build issues seen in linux-next, and also add
    the minimal required support for perf to tilegx"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: remove unused variable 'devcap'
    tile: Fix vDSO compilation issue with allyesconfig
    perf tools: Allow building for tile
    tile/perf: Support perf_events on tilegx and tilepro
    tile: Enable NMIs on return from handle_nmi() without errors
    tile: Add support for handling PMC hardware
    tile: don't use __get_cpu_var() with structure-typed arguments
    tile: avoid overflow in ns2cycles

    Linus Torvalds
     

01 Apr, 2014

1 commit

  • Pull perf changes from Ingo Molnar:
    "Main changes:

    Kernel side changes:

    - Add SNB/IVB/HSW client uncore memory controller support (Stephane
    Eranian)

    - Fix various x86/P4 PMU driver bugs (Don Zickus)

    Tooling, user visible changes:

    - Add several futex 'perf bench' microbenchmarks (Davidlohr Bueso)

    - Speed up thread map generation (Don Zickus)

    - Introduce 'perf kvm --list-cmds' command line option for use by
    scripts (Ramkumar Ramachandra)

    - Print the evsel name in the annotate stdio output, prep to fix
    support outputting annotation for multiple events, not just for the
    first one (Arnaldo Carvalho de Melo)

    - Allow setting preferred callchain method in .perfconfig (Jiri Olsa)

    - Show in what binaries/modules 'perf probe's are set (Masami
    Hiramatsu)

    - Support distro-style debuginfo for uprobe in 'perf probe' (Masami
    Hiramatsu)

    Tooling, internal changes and fixes:

    - Use tid in mmap/mmap2 events to find maps (Don Zickus)

    - Record the reason for filtering an address_location (Namhyung Kim)

    - Apply all filters to an addr_location (Namhyung Kim)

    - Merge al->filtered with hist_entry->filtered in report/hists
    (Namhyung Kim)

    - Fix memory leak when synthesizing thread records (Namhyung Kim)

    - Use ui__has_annotation() in 'report' (Namhyung Kim)

    - hists browser refactorings to reuse code accross UIs (Namhyung Kim)

    - Add support for the new DWARF unwinder library in elfutils (Jiri
    Olsa)

    - Fix build race in the generation of bison files (Jiri Olsa)

    - Further streamline the feature detection display, trimming it a bit
    to show just the libraries detected, using VF=1 gets a more verbose
    output, showing the less interesting feature checks as well (Jiri
    Olsa).

    - Check compatible symtab type before loading dso (Namhyung Kim)

    - Check return value of filename__read_debuglink() (Stephane Eranian)

    - Move some hashing and fs related code from tools/perf/util/ to
    tools/lib/ so that it can be used by more tools/ living utilities
    (Borislav Petkov)

    - Prepare DWARF unwinding code for using an elfutils alternative
    unwinding library (Jiri Olsa)

    - Fix DWARF unwind max_stack processing (Jiri Olsa)

    - Add dwarf unwind 'perf test' entry (Jiri Olsa)

    - 'perf probe' improvements including memory leak fixes, sharing the
    intlist class with other tools, uprobes/kprobes code sharing and
    use of ref_reloc_sym (Masami Hiramatsu)

    - Shorten sample symbol resolving by adding cpumode to struct
    addr_location (Arnaldo Carvalho de Melo)

    - Fix synthesizing mmaps for threads (Don Zickus)

    - Fix invalid output on event group stdio report (Namhyung Kim)

    - Fixup header alignment in 'perf sched latency' output (Ramkumar
    Ramachandra)

    - Fix off-by-one error in 'perf timechart record' argv handling
    (Ramkumar Ramachandra)

    Tooling, cleanups:

    - Remove unused thread__find_map function (Jiri Olsa)

    - Remove unused simple_strtoul() function (Ramkumar Ramachandra)

    Tooling, documentation updates:

    - Update function names in debug messages (Ramkumar Ramachandra)

    - Update some code references in design.txt (Ramkumar Ramachandra)

    - Clarify load-latency information in the 'perf mem' docs (Andi
    Kleen)

    - Clarify x86 register naming in 'perf probe' docs (Andi Kleen)"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (96 commits)
    perf tools: Remove unused simple_strtoul() function
    perf tools: Update some code references in design.txt
    perf evsel: Update function names in debug messages
    perf tools: Remove thread__find_map function
    perf annotate: Print the evsel name in the stdio output
    perf report: Use ui__has_annotation()
    perf tools: Fix memory leak when synthesizing thread records
    perf tools: Use tid in mmap/mmap2 events to find maps
    perf report: Merge al->filtered with hist_entry->filtered
    perf symbols: Apply all filters to an addr_location
    perf symbols: Record the reason for filtering an address_location
    perf sched: Fixup header alignment in 'latency' output
    perf timechart: Fix off-by-one error in 'record' argv handling
    perf machine: Factor machine__find_thread to take tid argument
    perf tools: Speed up thread map generation
    perf kvm: introduce --list-cmds for use by scripts
    perf ui hists: Pass evsel to hpp->header/width functions explicitly
    perf symbols: Introduce thread__find_cpumode_addr_location
    perf session: Change header.misc dump from decimal to hex
    perf ui/tui: Reuse generic __hpp__fmt() code
    ...

    Linus Torvalds
     

19 Mar, 2014

13 commits

  • Moreover, the corresponding function in include/linux/kernel.h is marked
    obsolete.

    Signed-off-by: Ramkumar Ramachandra
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395176715-4465-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     
  • Update the names of some functions and enums in design.txt. The document
    still has some stale information, but the motivation behind this patch
    is to allow a developer to quickly grep and learn about the associated
    structures.

    Signed-off-by: Ramkumar Ramachandra
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395169804-1293-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     
  • perf_event_open() was renamed to sys_perf_event_open(); update the debug
    messages to reflect this.

    Signed-off-by: Ramkumar Ramachandra
    Cc: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395169842-1399-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     
  • Because it's not used any more.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1395154016-26709-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • So that when showing multiple events annotations, we can figure out
    which is which:

    # perf record -a -e instructions,cycles sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.826 MB perf.data (~36078 samples) ]
    # perf evlist
    instructions
    cycles
    # perf annotate intel_idle 2> /dev/null | head -1
    Percent | Source code & Disassembly of vmlinux for instructions
    #

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-n1r51l329434js84qtb2c6l9@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Since we introduced the ui__has_annotation() for that, don't open code
    it.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1395124359-11744-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Checking default guest machine should be done before allocating event
    structures otherwise it'll leak memory.

    Signed-off-by: Namhyung Kim
    Cc: Don Zickus
    Cc: Jiri Olsa
    Cc: Joe Mario
    Link: http://lkml.kernel.org/r/87ob15tx6a.fsf@sejong.aot.lge.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Now that we can properly synthesize threads system-wide, make sure the
    mmap and mmap2 events use tids instead of pids to locate their maps.

    Signed-off-by: Don Zickus
    Cc: Jiri Olsa
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1393429527-167840-3-git-send-email-dzickus@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Don Zickus
     
  • I.e. don't drop al->filtered entries, create the hist_entries and use
    its ->filtered bitmap, that is kept with the same semantics for its
    bitmap, leaving the filtering to be done at the hist_entry level, i.e.
    in the UIs.

    This will allow zooming in/out the filters.

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-xeyhkepu7plw716lrtb0zlnu@git.kernel.org
    [ yanked this out of a previous patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Instead of bailing out as soon as we find a filter that applies, go on
    checking all of them so that we can zoom in/out filters.

    We also need to make sure we only update al->filtered after
    thread__find_addr_map(), because there is where al->filtered gets
    initialized to zero.

    This will increase the cost of processing when all we don't need this
    toggling, but will provide flexibility for the TUI and GTK+ interfaces,
    that will incur in creating the hist_entries just once.

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-fhv9lhzdjxgp9w3w3668lsfw@git.kernel.org
    [ yanked this out of a previous patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • By turning the addr_location->filtered member from a boolean to a u8
    bitmap, reusing (and extending) the hist_filter enum for that.

    This patch doesn't change the logic at all, as it keeps the meaning of
    al->filtered !0 to mean that the entry _was_ filtered, so no change in
    how this value is interpreted needs to be done at this point.

    This will be soon used in upcoming patches.

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-89hmfgtr9t22sky1lyg7nw7l@git.kernel.org
    [ yanked this out of a previous patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Before:

    ---------------------------------------------------------------------------------------------------------------
    Task | Runtime ms | Switches | Average delay ms | Maximum delay ms | Maximum delay at |
    ---------------------------------------------------------------------------------------------------------------
    ... | | | | |
    git:24540 | 336.622 ms | 10 | avg: 0.032 ms | max: 0.062 ms | max at: 115610.111046 s
    git:24541 | 0.457 ms | 1 | avg: 0.000 ms | max: 0.000 ms | max at: 0.000000 s
    -----------------------------------------------------------------------------------------
    TOTAL: | 396.542 ms | 353 |
    ---------------------------------------------------

    After:

    -----------------------------------------------------------------------------------------------------------------
    Task | Runtime ms | Switches | Average delay ms | Maximum delay ms | Maximum delay at |
    -----------------------------------------------------------------------------------------------------------------
    ... | | | | |
    git:24540 | 336.622 ms | 10 | avg: 0.032 ms | max: 0.062 ms | max at: 115610.111046 s
    git:24541 | 0.457 ms | 1 | avg: 0.000 ms | max: 0.000 ms | max at: 0.000000 s
    -----------------------------------------------------------------------------------------------------------------
    TOTAL: | 396.542 ms | 353 |
    ---------------------------------------------------

    Signed-off-by: Ramkumar Ramachandra
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1395065901-25740-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     
  • Since 367b315 (perf timechart: Add support for -P and -T in timechart
    recording, 2013-11-01), the 'perf timechart record' command stopped
    working:

    $ perf timechart record -- git status
    Workload failed: No such file or directory

    This happens because of an off-by-one error while preparing the argv for
    cmd_record(): it attempts to execute the command 'status' and complains
    that it doesn't exist. Fix this error.

    Signed-off-by: Ramkumar Ramachandra
    Acked-by: Stanislav Fomichev
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Stanislav Fomichev
    Link: http://lkml.kernel.org/r/1394985965-2332-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     

15 Mar, 2014

9 commits

  • Forcing the code to always search thread by pid/tid pair.

    The PID value will be needed in future to determine the process thread
    leader for map groups sharing.

    Signed-off-by: Jiri Olsa
    Acked-by: Adrian Hunter
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1394805606-25883-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • When trying to capture perf data on a system running spejbb2013, perf
    hung for about 15 minutes. This is because it took that long to gather
    about 10,000 thread maps and process them.

    I don't think a user wants to wait that long.

    Instead, recognize that thread maps are roughly equivalent to pid maps
    and just quickly copy those instead.

    To do this, I synthesize 'fork' events, this eventually calls
    thread__fork() and copies the maps over.

    The overhead goes from 15 minutes down to about a few seconds.

    --
    V2: based on Jiri's comments, moved malloc up a level
    and made sure the memory was freed

    Signed-off-by: Don Zickus
    Acked-by: Jiri Olsa
    Cc: Jiri Olsa
    Cc: Joe Mario
    Link: http://lkml.kernel.org/r/1394808224-113774-1-git-send-email-dzickus@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Don Zickus
     
  • Introduce

    $ perf kvm --list-cmds

    to dump a raw list of commands for use by the completion script. In
    order to do this, introduce parse_options_subcommand() for handling
    subcommands as a special case in the parse-options machinery.

    Signed-off-by: Ramkumar Ramachandra
    Acked-by: David Ahern
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Link: http://lkml.kernel.org/r/1393896396-10427-1-git-send-email-artagnon@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ramkumar Ramachandra
     
  • Those functions need evsel to investigate event group and it's passed
    via hpp->ptr. However as it can be missed easily so it's better to
    pass it via an argument IMHO.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1394437440-11609-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Its one level up thread__find_addr_location, where it will look in
    different domains for a sample: user, kernel, hypervisor, etc.

    Will soon be used by a patchkit by Andi Kleen.

    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-so6nxkh7xj48bc5kq4jpj991@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • When printing the raw dump of a data file, the header.misc is
    printed as a decimal. Unfortunately, that field is a bit mask, so
    it is hard to interpret as a decimal.

    Print in hex, so the user can easily see what bits are set and more
    importantly what type of info it is conveying.

    V2: add 0x in front per Jiri Olsa

    Signed-off-by: Don Zickus
    Cc: Jiri Olsa
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1393386227-149412-3-git-send-email-dzickus@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Don Zickus
     
  • The __hpp__color_fmt used in the TUI code can be replace by the generic
    code with small change in print_fn callback. And it also needs to move
    callback function to the generic __hpp__fmt().

    No functional changes intended.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1393809254-4480-5-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Instead of the pointer to buffer and its size so that it can also get
    private argument passed along with hpp.

    This is a preparation of further change.

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1393809254-4480-4-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • The __hpp__color_fmt used in the gtk code can be replace by the generic
    code with small change in print_fn callback.

    This is a preparation to upcoming changes and no functional changes
    intended.

    Signed-off-by: Namhyung Kim
    Acked-by: Pekka Enberg
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1393809254-4480-3-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim