11 Dec, 2013

16 commits

  • Remove a full barrier from the ring-buffer write path by relying on
    a control dependency to order a LOAD -> STORE scenario.

    Cc: "Paul E. McKenney"
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-8alv40z6ikk57jzbaobnxrjl@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • …/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    * Add an option in 'perf script' to print the source line number, from Adrian Hunter

    * Add --header/--header-only options to 'script' and 'report', the default is not
    tho show the header info, but as this has been the default for some time,
    leave a single line explaining how to obtain that information, from Jiri Olsa.

    * Fix symoff printing in callchains in 'perf script', from Adrian Hunter.

    * Assorted mmap_pages handling fixes, from Adrian Hunter.

    * Fix summary percentage when processing files in 'perf trace', from David Ahern.

    * Handle old kernels where the "raw_syscalls" tracepoints were called plan "syscalls",
    in 'perf trace', from David Ahern.

    * Several man pages typo fixes from Dongsheng Yang.

    * Add '-v' option to 'perf kvm', from Dongsheng Yang.

    * Make perf kvm diff support --guestmount, from Dongsheng Yang.

    * Get rid of several die() calls in libtraceevent, from Namhyung Kim.

    * Use basename() in a more robust way, to avoid problems related to different
    system library implementations for that function, from Stephane Eranian.

    * Remove open coded management of short_name_allocated member, from Adrian Hunter

    * Several cleanups in the "dso" methods, constifying some parameters and
    renaming some fields to clarify its purpose. (Arnaldo Carvalho de Melo.)

    * Add per-feature check flags, fixing libunwind related build problems on some
    architectures, from Jean Pihet.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Use the per-feature check flags for the unwinding feature in order to
    correctly compile the test-all, libunwind and libunwind-debug-frame
    feature checks.

    Tested on x86_64, ARMv7 and ARMv8 with and without LIBUNWIND_DIR set in
    'make -C tools/perf'

    Signed-off-by: Jean Pihet
    Acked-by: Ingo Molnar
    Acked-by: Jiri Olsa
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Will Deacon
    Cc: linaro-kernel@lists.linaro.org
    Cc: patches@linaro.org
    Link: http://lkml.kernel.org/r/1386678244-13535-3-git-send-email-jean.pihet@linaro.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jean Pihet
     
  • Add CFLAGS and LDFLAGS for each feature to be checked. This allows to
    pass flags and parameters to the feature checks compilation. Also
    simplifies the feature check makefile, to come in a subsequent patch.

    Signed-off-by: Jean Pihet
    Acked-by: Ingo Molnar
    Acked-by: Jiri Olsa
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Will Deacon
    Cc: linaro-kernel@lists.linaro.org
    Cc: patches@linaro.org
    Link: http://lkml.kernel.org/r/1386678244-13535-2-git-send-email-jean.pihet@linaro.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jean Pihet
     
  • The basename() implementation varies a lot between systems.

    The Linux man page says: "basename may modify the content of the path,
    so it may be desirable to pass a copy when calling the function".

    On some other systems, the returned address may come from an internal
    buffer which can be reused in subsequent calls, thus the results should
    also be copied.

    The dso__set_basename() function was not doing this causing problems
    on some systems with wrong library names being shown by perf report,
    such as on Android systems.

    This patch fixes the problem.
    The patch is relative to tip.git.

    In v2, we clean up the comments based on Ingo's feedback.

    Reported-by: Ben Cheng
    Signed-off-by: Stephane Eranian
    Acked-by: Ingo Molnar
    Cc: Ben Cheng
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20131205182642.GA14614@quad
    [ v3: Fixed up wrt allocated flag now being set in dso__set_short_name ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • The 'file' is more commonly associated with a file descriptor of
    some sort, rename it to 'filename' as this is the more common idiom
    for a file name argument.

    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-0ehaawv5xc83w6ag03c5hi10@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Those methods are not supposed to change the data structures they
    manipulate, so make that clearer by using the const qualifier in the
    function signature and in some variables.

    Suggested-by: Ingo Molnar
    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-j7oyakex7zy3r82h33rdw25x@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To help in debugging use after free bugs.

    Reported-by: Ingo Molnar
    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-3ckwsob2g1q23s77nuhexrq7@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Same reason as for dso->short_name, it may point to a const string, and
    in most places it is treated as const, i.e. it is just accessed for
    using its contents as a key or to show it on reports.

    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-nf7mxf33zt5qw207pbxxryot@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Instead of expecting callers to set this member accodingly so that later
    at dso destruction it can, if needed, be correctly free()d, make it a
    requirement by passing it as a parameter to dso__set_long_name.

    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-na7t1tqim22vuqkt4zq5n4ri@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • This is a preparatory patch to do with dso__set_long_name what was done
    with the short name variant.

    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-mb7eqhkyejq1qcf3p22wz2x7@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Instead of expecting callers to set this member accodingly so that later
    at dso destruction it can, if needed, be correctly free()d, make it a
    requirement by passing it as a parameter to dso__set_short_name.

    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Dongsheng Yang
    Cc: Frederic Weisbecker
    CC: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Steven Rostedt
    Signed-off-by: Adrian Hunter
    Link: http://lkml.kernel.org/r/52A707A2.5020802@intel.com
    [ Renamed the 'allocated' parameter to clearly indicate to which variable it refers to. ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Use dso__set_short_name instead, as it will release any previously,
    possibly allocated, short name.

    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-1v39elw7v6nxczpntpp7ljwr@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So we now have:

    dso->short_name
    dso->short_name_len
    dso->short_name_allocated

    Ditto for the 'long variants. To more quickly grasp what they refer to.

    Suggested-by: Ingo Molnar
    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-nu228f8vlp9w0lr7c0q77dqi@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Currently the perf.data header is always displayed for stdio output,
    which is no always useful.

    Disabling header information by default and adding following options to
    control header output:

    --header - display header information
    --header-only - display header information only w/o further
    processing

    Signed-off-by: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-0ehaawv5xc83w6ag03c5hi10@git.kernel.org
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386583370-1699-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Currently the perf.data header is always displayed for stdio output,
    which is no always useful.

    Disabling header information by default and adding following options to
    control header output:

    --header - display header information (old default)
    --header-only - display header information only w/o further
    processing, forces stdio output

    Signed-off-by: Jiri Olsa
    Acked-by: David Ahern
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386583370-1699-2-git-send-email-jolsa@redhat.com
    [ Added single line explaining talking about the new --header* options,
    to address David Ahern comment; better man page entry for the new options,
    from Namhyung Kim ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

10 Dec, 2013

16 commits

  • Change the function signature to return error code and not call die()
    anymore.

    Signed-off-by: Namhyung Kim
    Reviewed-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386567251-22751-13-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Signed-off-by: Namhyung Kim
    Reviewed-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386567251-22751-12-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Signed-off-by: Namhyung Kim
    Reviewed-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386567251-22751-9-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Make it return error value since its only caller find_event() now can
    handle allocation error properly.

    Signed-off-by: Namhyung Kim
    Reviewed-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386567251-22751-8-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • It returns NULL when allocation fails so the users should check the
    return value from now on.

    Signed-off-by: Namhyung Kim
    Reviewed-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386567251-22751-4-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • In manpage of perf-kvm, --guestmount is supported by diff command, but
    it does not work well.

    This patch change the extend the checking in buildid-diff from
    guestkallsyms or guestmodules to perf_guest. Then this checking can
    cover the all cases perf kvm is used for.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/72857ed89642e0633f5e88f7e7abbc9645359e8e.1386368672.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • The code in builtin-kvm.c to generate filename for perf-kvm is useful to
    other command such as builtin-diff.

    This patch move the related code form builtin-kvm.c to util/util.c and
    wrap them in a function named get_filename_for_perf_kvm.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/5e09a5c47e8a495e888cbdc65a6fafb2c950f529.1386368672.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • A typo in comment of builtin-annotate.c about 'that'.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/46cb069a4ce21141057a07c0b50baa9968e3228c.1386629050.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • Two 'runs' here breaks the sentence in Description of 'perf archive'
    command.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/78a15a9f4f500b6074a1e25917d6e8251f894628.1386629050.git.yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • When we use perf kvm record-report, there is a bug in report subcommand.

    Example:
    # perf kvm stat record -a sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.678 MB perf.data.guest (~29641 samples) ]
    # perf kvm stat report
    failed to open perf.data: No such file or directory (try 'perf record' first)
    Initializing perf session failed

    This bug was introduced by f5fc14124.

    + struct perf_data_file file = {
    + .path = input_name,
    + .mode = PERF_DATA_MODE_READ,
    + };

    kvm->tool = eops;
    - kvm->session = perf_session__new(kvm->file_name, O_RDONLY, 0, false,
    - &kvm->tool);
    + kvm->session = perf_session__new(&file, false, &kvm->tool);

    It changed the path from kvm->file_name to input_name, this patch change the path back to
    'kvm->file_name', then it works well.

    Verification:
    # perf kvm stat record -a sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.807 MB perf.data.guest (~35264 samples) ]
    # perf kvm stat report

    Analyze events for all VCPUs:

    VM-EXIT Samples Samples% Time% Min Time Max Time Avg time

    EPT_VIOLATION 200 32.79% 1.25% 0us 12064us 62.35us ( +- 96.74% )
    EPT_MISCONFIG 134 21.97% 0.21% 0us 35us 15.25us ( +- 4.14% )
    EXCEPTION_NMI 96 15.74% 0.02% 0us 11us 1.95us ( +- 9.81% )
    APIC_ACCESS 79 12.95% 0.02% 0us 13us 2.94us ( +- 11.20% )
    HLT 65 10.66% 98.47% 0us 16706us 15084.86us ( +- 1.89% )
    IO_INSTRUCTION 27 4.43% 0.02% 0us 29us 6.42us ( +- 15.53% )
    EXTERNAL_INTERRUPT 5 0.82% 0.01% 0us 77us 23.65us ( +- 57.90% )
    TPR_BELOW_THRESHOLD 4 0.66% 0.00% 0us 1us 1.22us ( +- 4.36% )

    Total Samples:610, Total events handled time:995745.54us.

    Signed-off-by: Dongsheng Yang
    Link: http://lkml.kernel.org/r/1386632823-17539-1-git-send-email-yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • As there is no -v option for perf kvm, the all debug message for perf
    kvm will nerver be printed out to user.

    Example:
    # perf kvm --guestmount /tmp/guestmount/ record -a
    Not enough memory for reading perf file header

    It is confusing message for newbies such as me. With this patch applied,
    we can use -v option to get the detail.

    Example:
    # perf kvm --guestmount /tmp/guestmount/ record -a -v
    Can't access file /tmp/guestmount//15069/proc/kallsyms
    Not enough memory for reading perf file header

    Signed-off-by: Dongsheng Yang
    Cc: David Ahern
    Link: http://lkml.kernel.org/r/1386609311-23889-1-git-send-email-yangds.fnst@cn.fujitsu.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Dongsheng Yang
     
  • 'next_pow2()' only works for 'unsigned int' but the argument is
    'unsigned long'. Checking for values less than (1 << 31) ensures that
    'next_pow2()' is not passed a value out of range but lets anything else
    go through unvalidated.

    As a result mmap_pages of zero is used e.g.

    perf record -v -m2147483649 uname
    mmap size 0B
    failed to mmap with 22 (Invalid argument)

    Fixed:

    perf record -m2147483649 uname
    rounding mmap pages size to 17592186044416 bytes (4294967296 pages)
    Invalid argument for --mmap_pages/-m

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386595120-22978-4-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • 'SIZE_MAX / page_size' is an upper limit for the maximum number of mmap
    pages, not a lower limit. Change the condition accordingly.

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386595120-22978-3-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386595120-22978-2-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • 'mmap_pages' is 'unsigned int' not 'int' e.g.

    perf record -m2147483648 uname
    Permission error mapping pages.
    Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
    or try again with a smaller value of -m/--mmap_pages.
    (current value: -2147483648)

    Fixed:

    perf record -m2147483648 uname
    Permission error mapping pages.
    Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
    or try again with a smaller value of -m/--mmap_pages.
    (current value: 2147483648)

    Signed-off-by: Adrian Hunter
    Acked-by: Jiri Olsa
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386595120-22978-5-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • Add field 'srcline' that displays the source file name and line number
    associated with the sample ip. The information displayed is the same as
    from addr2line.

    $ perf script -f comm,tid,pid,time,ip,sym,dso,symoff,srcline
    grep 10701/10701 2497321.421013: ffffffff81043ffa native_write_msr_safe+0xa ([kernel.kallsyms])
    /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/arch/x86/include/asm/msr.h:95
    grep 10701/10701 2497321.421984: ffffffff8165b6b3 _raw_spin_lock+0x13 ([kernel.kallsyms])
    /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/arch/x86/include/asm/spinlock.h:54
    grep 10701/10701 2497321.421990: ffffffff810b64b3 tick_sched_timer+0x53 ([kernel.kallsyms])
    /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/kernel/time/tick-sched.c:840
    grep 10701/10701 2497321.421992: ffffffff8106f63f run_timer_softirq+0x2f ([kernel.kallsyms])
    /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/kernel/timer.c:1372

    Signed-off-by: Adrian Hunter
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386315778-11633-3-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

09 Dec, 2013

1 commit

  • The address being used to calculate the offset was the memory address
    but the address needed is the address mapped to the dso. i.e. the 'addr'
    member of 'struct addr_location'

    Signed-off-by: Adrian Hunter
    Acked-by: David Ahern
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1386315778-11633-2-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

06 Dec, 2013

1 commit

  • When Jiri Olsa was writing a function callback for
    scsi_trace_parse_cdb(), he thought that the traceevent library had a
    bug in it because he was getting this error:

    Error: expected ')' but read ','
    Error: expected ')' but read ','
    Error: expected ')' but read ','
    Error: expected ')' but read ','

    But in truth, he didn't have the write number of arguments for the
    function callback, and the error was the library detecting the
    discrepancy. A better error message would have prevented the confusion:

    Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_timeout has more
    Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_start has more
    Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_error has more
    Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_done has more

    Or

    Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_timeout only uses 3
    Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_start only uses 3
    Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_error only uses 3
    Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_done only uses 3

    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/n/tip-a4c34w62vl0diitvxb7bt3er@git.kernel.org
    Signed-off-by: Jiri Olsa
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt
     

05 Dec, 2013

6 commits

  • Getting a divide by 0 when events are processed from a file:

    perf trace -i perf.data -s
    ...
    dnsmasq (1684), 10 events, inf%, 0.000 msec

    The problem is that the event count is not incremented as events are
    processed. With this patch:

    perf trace -i perf.data -s
    ...
    dnsmasq (1684), 10 events, 8.9%, 0.000 msec

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1386211302-31303-4-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • Older kernels (e.g., RHEL6) do system call tracing via
    syscalls:sys_{enter,exit} rather than raw_syscalls. Update perf-trace to
    detect lack of raw_syscalls support and try syscalls.

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1386211302-31303-2-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • The traceevents-plugins install targets needs a proper dependency,
    otherwise it might be executed prematurely and in parallel to an
    actual build.

    Signed-off-by: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: David Ahern
    Link: http://lkml.kernel.org/n/tip-rvlbzena4ovzgqiPm6teBofz@git.kernel.org
    Signed-off-by: Ingo Molnar

    Jiri Olsa
     
  • …/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    * Backport libtraceevent plugin support from trace-cmd repository, with
    plugins for jbd2, hrtimer, kmem, kvm, mac80211, sched_switch, function,
    xen, scsi, cfg80211. From Jiri Olsa.

    * Retain bfd reference to lookup source line numbers, greatly optimizing, among
    other use cases, 'perf report -s srcline', from Adrian Hunter.

    * Do not disable source line lookup just because of one failure, from Adrian Hunter.

    * Fix random fd closing with no libelf, from Adrian Hunter.

    * Do not call perf_event__preprocess_sample() twice in 'perf script',
    from Adrian Hunter.

    * Several 'perf kvm' man page corrections, from Dongsheng Yang.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Adding is_writable_pte print helper function, so the
    kvmmmu:fast_page_fault print format gets resolved properly.

    The diff of 'perf script' output generated by old and new code:
    (data was generated by 'perf record -e 'kvm:*,kvmmmu:*' -a')

    --- script.kvm.old
    +++ script.kvm.new
    - qemu-system-x86 3290 [002] 10708.755312: kvmmmu:fast_page_fault: [FAILED TO PARSE] vcpu_id=0 gva=4094486080 error_code=3 sptep=0xffff88019f1e3670 old_spte=336391285 new_spte=336391287 retry=1
    + qemu-system-x86 3290 [002] 10708.755312: kvmmmu:fast_page_fault: vcpu 0 gva f40ce640 error_code P|W sptep 0xffff88019f1e3670 old 0x140cec75 new 140cec77 spurious 0 fixed 1

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

    Jiri Olsa
     
  • Removing malloc_or_die calls from plugin_function.c, replacing them and
    factoring the code with standard realloc and error path.

    Suggested-by: Namhyung Kim
    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1386076182-14484-27-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa