22 Jul, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    math-emu: correct test for downshifting fraction in _FP_FROM_INT()
    perf: Add DWARF register lookup for sparc
    MAINTAINERS: Add SBUS driver path to sparc entry.
    drivers/sbus: Remove unnecessary casts of private_data
    sparc: remove homegrown L1_CACHE_ALIGN macro
    sparc64: fix the build error due to smp_kgdb_capture_client()
    sparc64: Fix maybe_change_configuration() PCR setting.
    arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference
    sparc64: Update defconfig.
    sunsu: Fix use after free in su_remove().
    sunserial: Don't call add_preferred_console() when console= is specified.
    sparc32: Kill none_mask, it's bogus.

    Linus Torvalds
     

15 Jul, 2010

1 commit


08 Jul, 2010

2 commits

  • Hists have their hits increased by the event period. And this
    period based counting is the foundation of all the stats in
    perf report.

    But callchains still use the raw number of hits, without taking
    the period into account. So when we compute the percentage,
    absolute based percentages are totally broken, and relative ones
    too in the first parent level. Because we pass the number of events
    muliplied by their period as the total number of hits to the
    callchain filtering, while callchains expect this number to be
    the number of raw hits.

    perf report -g graph was simply not working, showing no graph unless
    the min percent was zero. And even there the percentage of the
    branches was always 0. And may be fractal filtering was broken on
    the first branch level too.

    flat also was broken, but it was hidden because of other breakages.

    Anyway fix this by counting using periods on callchains.

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

    Frederic Weisbecker
     
  • Initialize the callchain radix tree root correctly.

    When we walk through the parents, we must stop after the root, but
    since it wasn't well initialized, its parent pointer was random.

    Also the number of hits was random because uninitialized, hence it
    was part of the callchain while the root doesn't contain anything.

    This fixes segfaults and percentages followed by empty callchains
    while running:

    perf report -g flat

    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: 2.6.31.x-2.6.34.x

    Frederic Weisbecker
     

05 Jul, 2010

2 commits

  • This gets rid of the default version fallback for Perf and
    changes it so that it returns the version of the kernel from
    it's Makefile (if sources were not from git, ie. if it was
    downloaded from a tarball)

    Signed-off-by: Thavidu Ranatunga
    Acked-by: Ian Munsie
    Acked-by: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Thavidu Ranatunga
     
  • Changes the Perf --version string such that it shows the kernel
    version as suggested by Ingo as follows:

    That way the perf that comes with v2.6.34 will be:

    perf version v2.6.34

    while interim versions will have the version of the interim
    kernel - for example:

    perf version v2.6.35-rc4-70-g39ef13a

    This functionality was already in the perf version generator
    file except that it was looking for a .git in the perf directory
    instead of the kernel directory.

    Signed-off-by: Thavidu Ranatunga
    Acked-by: Ian Munsie
    Acked-by: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Thavidu Ranatunga
     

02 Jul, 2010

1 commit


18 Jun, 2010

1 commit

  • At exit, perf record will kill the process it was profiling by sending a
    SIGTERM to child_pid (if it had been initialised), but in certain situations
    child_pid may be 0 and perf would mistakenly kill more processes than intended.

    child_pid is set to the return of fork() to either 0 or the pid of the child.
    Ordinarily this would not present an issue as the child calls execvp to spawn
    the process to be profiled and would therefore never run it's sig_atexit and
    never attempt to kill pid 0.

    However, if a nonexistant binary had been passed in to perf record the call to
    execvp would fail and child_pid would be left set to 0. The child would then
    exit and it's atexit handler, finding that child_pid was initialised to 0,
    would call kill(0, SIGTERM), resulting in every process within it's process
    group being killed.

    In the case that perf was being run directly from the shell this typically
    would not be an issue as the shell isolates the process. However, if perf was
    being called from another program it could kill unexpected processes, which may
    even include X.

    This patch changes the logic of the test for whether child_pid was initialised
    to only consider positive pids as valid, thereby never attempting to kill pid
    0.

    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Ian Munsie
    Signed-off-by: Arnaldo Carvalho de Melo

    Ian Munsie
     

17 Jun, 2010

1 commit

  • Move them to a session->dead_threads list just like we do with maps that
    are replaced, because we may have hist_entries pointing to them.

    This fixes a bug when inserting maps for a new thread that reused the
    TID, mixing maps for two different threads, causing an endless loop.

    The code for insering maps should be made more robust but for .35 this
    is the minimalistic patch.

    Reported-by: Ingo Molnar
    Cc: David S. Miller
    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
     

10 Jun, 2010

1 commit

  • When processing events we want to give visual feedback to the user when
    using the newt browser, so there are ui_progress calls in
    __perf_session__process_events, but those should check if newt is being
    used.

    Reported-by: Srikar Dronamraju
    Tested-by: Srikar Dronamraju
    Cc: Ananth N Mavinakayanahalli
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu ,
    Cc: Peter Zijlstra
    Cc: Srikar Dronamraju
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

04 Jun, 2010

1 commit

  • We need to set the long name to the name specified via, for instance,
    'perf annotate --vmlinux /path/to/vmlinux', if not it will remain as
    '[kernel.kallsyms]' and that will make annotate fail when passing this
    as the vmlinux name in the call to objdump.

    The way this is setup grew unwieldly and dso__load_vmlinux is the
    function that should allocate space for the long name, with callers not
    assuming that filenames should be allocated somehow by then (strdup,
    dso__build_id_filename, etc).

    For now this is the minimalistic patch, a proper fix for .36 will be
    made.

    Reported-by: Stephane Eranian
    Tested-by: Stephane Eranian
    Cc: David S. Miller
    Cc: Frédéric 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
     

02 Jun, 2010

2 commits

  • …/linux-2.6 into perf/urgent

    Ingo Molnar
     
  • When we use plain 'perf buildid-list' we use only what is in the buildid
    table in the perf.data header. And those have absolute pathnames because
    at 'perf record' time we used __perf_session__process_events and that
    doesn't sets up the path shortening code in map__new() that happens if
    symbol_conf.full_paths is false, the default.

    On the other hand, when we use 'perf buildid-list --with-hits' we
    process all the events using perf_session__process_events, adding
    entries to the global DSO list _after_ removing the current directory
    from the DSO name, for presentation purposes.

    Because of that we end up having two entries in the DSO list when
    recording events for binaries using relative pathnames.

    Fix it minimally by setting symbol_conf.full_paths to true when marking
    the DSOs with hits in 'perf buildid-list --with-hits', as used by 'perf
    archive'

    Right fix longer term is to shorten the path only at presentation time.
    Will be done for 2.6.36.

    Reported-by: Stephane Eranian
    Tested-by: Stephane Eranian
    Cc: David S. Miller
    Cc: Frédéric 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
     

01 Jun, 2010

6 commits

  • trace_unhandled() callback does not allow to access event fields, this patch
    resolves the problem.

    It can also been used as a more pythonic and flexible way for script writters
    to demux event types

    This will for example greatly simplify pytimechart event demux.

    Acked-by: Frederic Weisbecker
    Acked-by: Tom Zanussi
    Cc: Ingo Molnar ,
    Cc: Frederic Weisbecker
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Pierre Tardy
    Signed-off-by: Arnaldo Carvalho de Melo

    Pierre Tardy
     
  • hist_entry__annotate() runs objdump with -S option so the output may contain
    lines of any format. If a line starts with a colon strtoull() returns 0 and
    calculated offset will be negative. This causes perf annotate segfaults.

    Make sure that strtoull() has parsed at least one digit.

    Cc: David S. Miller
    Cc: Frédéric Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Konstantin Stepanyuk
    Signed-off-by: Arnaldo Carvalho de Melo

    Konstantin Stepanyuk
     
  • When forking the child to be traced, we should check the correct
    return value from fork() and not a local variable which is otherwise
    unused.

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

    Borislav Petkov
     
  • event__process_task() doesn't propagate the comm copy on clone,
    but only on process fork. So we loose all the tid:comm resolution
    for tasks that aren't a main process thread.

    Progragate the per thread granularity to event__process_task for
    pid resolution.

    This fixes various unresolved pids in perf sched, especially when
    we trace multithread processes. The problem is quickly reproducible
    with the messaging benchmark using the multithread mode "-t" :

    perf sched record perf bench sched messaging -t

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

    Frederic Weisbecker
     
  • perf sched uses event__process_comm(), which means it can resolve
    comms from:

    - tasks that have exec'ed (kernel comm events)
    - tasks that were running when perf record started the actual
    recording (synthetized comm events)

    But perf sched can't resolve the pids of tasks that were created
    after the recording started.

    To solve this, we need to inherit the comms on fork events using
    event__process_task().

    This fixes various unresolved pids in perf sched, easily visible
    with:
    perf sched record perf bench sched messaging

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

    Frederic Weisbecker
     
  • When we synthetize the existing running tasks though procfs,
    we walk through every threads of a process, queuing one comm
    events per tid.

    But then on report time, event__process_comm() only creates and
    sets the comm on a per process granularity. This is the right
    thing for comm events that came from the kernel, as they are
    only created on exec. Sub-threads then inherit their comm
    from fork events. But that doesn't work with our synthetized
    comm events taken from procfs informations as the per thread
    granularity is done on comm events directly there.

    Hence we need event__process_comm() to work with the tid rather
    than the pid. It won't change anything for comm events coming
    from the kernel but this will fix the synthetized ones.

    Before:

    $ ./perf report -D | grep COMM | grep firefox

    0x2c7b8 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c7d0 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c7e8 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c800 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c818 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c830 [0x18]: PERF_RECORD_COMM: firefox:5297

    After:
    $ ./perf report -D | grep COMM | grep firefox

    0x2c7b8 [0x18]: PERF_RECORD_COMM: firefox:5297
    0x2c7d0 [0x18]: PERF_RECORD_COMM: firefox:5299
    0x2c7e8 [0x18]: PERF_RECORD_COMM: firefox:5300
    0x2c800 [0x18]: PERF_RECORD_COMM: firefox:5308
    0x2c818 [0x18]: PERF_RECORD_COMM: firefox:5309
    0x2c830 [0x18]: PERF_RECORD_COMM: firefox:5312

    This fixes various unresolved pid on perf sched.

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

    Frederic Weisbecker
     

31 May, 2010

1 commit


28 May, 2010

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (61 commits)
    tracing: Add __used annotation to event variable
    perf, trace: Fix !x86 build bug
    perf report: Support multiple events on the TUI
    perf annotate: Fix up usage of the build id cache
    x86/mmiotrace: Remove redundant instruction prefix checks
    perf annotate: Add TUI interface
    perf tui: Remove annotate from popup menu after failure
    perf report: Don't start the TUI if -D is used
    perf: Fix getline undeclared
    perf: Optimize perf_tp_event_match()
    perf: Remove more code from the fastpath
    perf: Optimize the !vmalloc backed buffer
    perf: Optimize perf_output_copy()
    perf: Fix wakeup storm for RO mmap()s
    perf-record: Share per-cpu buffers
    perf-record: Remove -M
    perf: Ensure that IOC_OUTPUT isn't used to create multi-writer buffers
    perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events
    perf, trace: Optimize tracepoints by removing IRQ-disable from perf/tracepoint interaction
    perf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig
    ...

    Linus Torvalds
     

27 May, 2010

3 commits

  • When we moved to using ~/.perfconfig to set the value of use_browser,
    it changed from a boolean to an int so that the convention used for
    use_pager was followed.

    That convention is:

    -1: unspecified, that is what use_{browser,pager} is initialized
    0: Don't use the browser (should be TUI), because was explicitely
    set to 0/off/false on ~/.perfconfig [tui] cmd =, or because
    we're redirecting the stdout to a file or piping it to some
    other command (!isatty()).
    1: Use the TUI

    Some code was not properly audited and continued testing it as a
    boolean, this seems to be the last one.

    Reported-by: Frédéric Weisbecker
    Tested-by: Frédéric Weisbecker
    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
     
  • So that if the kernel DSO has a build id because record inserted it in
    the perf.data build id table in the header, or a BUILD_ID event was
    inserted in the stream, we first look at the build id cache
    ($HOME/.debug/).

    If we find it there, try to use it, allowing offline annotation in
    addition to 'perf report'.

    Reported-by: Stephane Eranian
    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
     
  • The newt initialization routines weren't being called because the output
    was a file (perf annotate > /tmp/bla) but use_browser was still 1,
    because ~/.perfconfig had it as 'on', so, later on newt routines
    segfaulted.

    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
     

24 May, 2010

2 commits

  • The hists__tty_browse_tree function was created with the loop to print
    all events, and its equivalent, hists__tui_browse_tree, was created in a
    similar fashion, where it is possible to switch among the multiple
    events, if present, using TAB to go the next event, and shift+TAB
    (UNTAB) to go to the previous.

    The report TUI now shows as the window title the name of the event and a
    leak was fixed wrt pstacks.

    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
     
  • It was assuming that the cache was always available and also wasn't
    checking if the file found in the build id cache was just a kallsyms
    file, that is not supported by objdump for disassembly.

    Reported-by: Ingo Molnar
    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
     

22 May, 2010

3 commits

  • When annotating multiple entries, for instance, when running simply as:

    $ perf annotate

    the right and left keys, as well as TAB can be used to cycle thru the
    multiple symbols being annotated.

    If one doesn't like TUI annotate, disable it by editing ~/.perfconfig
    and adding:

    [tui]

    annotate = off

    Just like it is possible for report.

    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
     
  • 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
     
  • One day we'll have support for the "dump raw trace in ASCII" in the TUI
    frontend, but till then, use the tty code.

    Reported-by: Peter Zijlstra
    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
     

21 May, 2010

10 commits

  • We need to have stdio.h included with _GNU_SOURCEfopr getline,
    which is broken with the inclusion of build-id.h.

    Keep util.h included first in hist.c

    Fixes:
    util/hist.c: Dans la fonction «hist_entry__parse_objdump_line» :
    util/hist.c:938: attention : déclaration implicite de la fonction « «getline» »
    util/hist.c:938: attention : nested extern declaration of «getline»
    make: *** [util/hist.o] Erreur 1

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

    Frederic Weisbecker
     
  • It seems a waste of space to create a buffer per
    event, share it per-cpu.

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

    Peter Zijlstra
     
  • Since it is not allowed to create cross-cpu (or
    cross-task) buffers, this option is no longer valid.

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

    Peter Zijlstra
     
  • Ingo Molnar
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
    USB: remove unused usb_buffer_alloc and usb_buffer_free macros
    usb: musb: update gfp/slab.h includes
    USB: ftdi_sio: fix legacy SIO-device header
    USB: kl5usb105: reimplement using generic framework
    USB: kl5usb105: minor clean ups
    USB: kl5usb105: fix memory leak
    USB: io_ti: use kfifo to implement write buffering
    USB: io_ti: remove unsused private counter
    USB: ti_usb: use kfifo to implement write buffering
    USB: ir-usb: fix incorrect write-buffer length
    USB: aircable: fix incorrect write-buffer length
    USB: safe_serial: straighten out read processing
    USB: safe_serial: reimplement read using generic framework
    USB: safe_serial: reimplement write using generic framework
    usb-storage: always print quirks
    USB: usb-storage: trivial debug improvements
    USB: oti6858: use port write fifo
    USB: oti6858: use kfifo to implement write buffering
    USB: cypress_m8: use kfifo to implement write buffering
    USB: cypress_m8: remove unused drain define
    ...

    Fix up conflicts (due to usb_buffer_alloc/free renaming) in
    drivers/input/tablet/acecad.c
    drivers/input/tablet/kbtab.c
    drivers/input/tablet/wacom_sys.c
    drivers/media/video/gspca/gspca.c
    sound/usb/usbaudio.c

    Linus Torvalds
     
  • Using the same scheme as for git's/perf's pager setup, i.e. if one
    doesn't want to, on a newt enabled perf binary, to disable the TUI for
    'perf report', its just a matter of doing:

    [root@doppio linux-2.6-tip]# printf "[tui]\n\nreport = off\n" >
    /root/.perfconfig
    [root@doppio linux-2.6-tip]# cat /root/.perfconfig
    [tui]

    report = off
    [root@doppio linux-2.6-tip]#

    System wide settings are also possible, by editing /etc/perfconfig, etc,
    i.e. the git machinery for config files applies to perf as well, so when
    in doubt where to put your settings, consult the git documentation, if
    it fails, please let us know.

    Suggested-by: Ingo Molnar
    Discussed-with: Stephane Eranian
    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
     
  • Perf record repeatedly calls gettimeofday() which adds noise to the performance
    measurements. Since gettimeofday() is only used for the error printf, delete
    it.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Russ Anderson
    Signed-off-by: Arnaldo Carvalho de Melo

    Russ Anderson
     
  • The FunctionFS gadget may provide the source/sink interface
    not as the first interface (with id == 0) but some different
    interface hence a code to find the interface number is
    required.

    (Note that you will still configure the gadget to report
    idProduct == 0xa4a4 (an "echo 0xa4a4
    >/sys/module/g_ffs/parameters/usb_product" should suffice) or
    configure host to handle 0x0525:0xa4ac devices using the
    usbtest driver.)

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • The testusb program just issues ioctls to perform the tests
    implemented by the kernel driver. It can generate a variety
    of transfer patterns; you should make sure to test both regular
    streaming and mixes of transfer sizes (including short transfers).

    For more information on how this can be used and on USB testing
    refer to .

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • This adds an example user-space FunctionFS driver which
    implements a source/sink interface used for testing.

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     

20 May, 2010

1 commit

  • We were still using the pathname found on the MMAP event, that could not
    be the one we used when recording, so use the build-id cache for that,
    only falling back to use the pathname in the MMAP event if no build-ids
    are available.

    With this we now also are able to do secure, seamless offline annotation.

    Example:

    [root@doppio linux-2.6-tip]# perf report -g none -v 2> /dev/null | head -10
    8.12% Xorg /usr/lib64/libpixman-1.so.0.14.0 0x0000000000026d02 B [.] pixman_rasterize_edges
    4.68% firefox /usr/lib64/xulrunner-1.9.1/libxul.so 0x00000000005dbdba B [.] 0x000000005dbdba
    3.70% swapper /lib/modules/2.6.34-rc6/build/vmlinux 0xffffffff81022cea ! [k] read_hpet
    2.96% init /lib/modules/2.6.34-rc6/build/vmlinux 0xffffffff81022cea ! [k] read_hpet
    2.73% swapper /lib/modules/2.6.34-rc6/build/vmlinux 0xffffffff8100a738 ! [k] mwait_idle_with_hints
    [root@doppio linux-2.6-tip]# perf annotate -v pixman_rasterize_edges 2>&1 | grep Executing
    Executing: objdump --start-address=0x000000371ce26670 --stop-address=0x000000371ce2709f -dS /root/.debug/.build-id/bd/6ac5199137aaeb279f864717d8d061477466c1|grep -v /root/.debug/.build-id/bd/6ac5199137aaeb279f864717d8d061477466c1|expand
    [root@doppio linux-2.6-tip]# perf buildid-list | grep libpixman-1.so.0.14.0
    bd6ac5199137aaeb279f864717d8d061477466c1 /usr/lib64/libpixman-1.so.0.14.0
    [root@doppio linux-2.6-tip]#

    Reported-by: Stephane Eranian
    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