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

7 commits

  • 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
     
  • Just like if one is using the stdio based pager, or more/less, for that
    matter.

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

    Arnaldo Carvalho de Melo
     
  • …eric/random-tracing into perf/core

    Ingo Molnar
     
  • Accessing trace values of an 8 size may end up in a segfault
    on archs that can't deal with misaligned access, which is the
    case for sparc 64. This is because PERF_SAMPLE_RAW are aligned
    to 4 and not to 8.

    Fix this on the macros that get the values of 8 size.

    This fixes segfaults on perf tools in sparc 64.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    Cc: Masami Hiramatsu
    Cc: David Miller

    Frederic Weisbecker
     
  • This is a small fix for a problem affecting live-mode, introduced
    recently:

    root@tropicana:~# perf trace rwtop
    perf trace started with Perl
    script /root/libexec/perf-core/scripts/perl/rwtop.pl

    Fatal: did not read header event

    commit d00a47cce569a3e660a8c9de5d57af28d6a9f0f7 added a skip()
    function to skip over e.g. header_page, but this doesn't work for
    live mode. This patch re-implements skip() to use read() instead of
    lseek() to fix that.

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

    Tom Zanussi
     
  • The changes made to support host and guest machines in a session, that
    started when the 'perf kvm' tool was introduced ended up introducing a
    bug where the host_machine was not having its DSOs traversed for
    build-id processing.

    Fix it by moving some methods to the right classes and considering the
    host_machine when processing build-ids.

    Reported-by: Tom Zanussi
    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
     
  • In __dsos__read_build_ids if the dso already had its build-id read,
    don't try again.

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

    Arnaldo Carvalho de Melo
     

19 May, 2010

4 commits

  • All the functions that call this can handle the equivalent, non
    panic'ing wrapped routines.

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

    Arnaldo Carvalho de Melo
     
  • Functions that were calling xzalloc also returned -1 when, for other
    reasons, it could fail, and the calleds are coping with failures, so
    stop using die() and xzalloc().

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

    Arnaldo Carvalho de Melo
     
  • That could leave filedescriptors open and leak memory. Also stop using
    xmalloc, use malloc and handle results just like other error cases in
    the same routine that used it.

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

    Arnaldo Carvalho de Melo
     
  • Without the bloated cplus_demangle from binutils, i.e building with:

    $ make NO_DEMANGLE=1 O=~acme/git/build/perf -j3 -C tools/perf/ install

    Before:

    text data bss dec hex filename
    471851 29280 4025056 4526187 45106b /home/acme/bin/perf

    After:

    [acme@doppio linux-2.6-tip]$ size ~/bin/perf
    text data bss dec hex filename
    446886 29232 4008576 4484694 446e56 /home/acme/bin/perf

    So its a 5.3% size reduction in code, but the interesting part is in the git
    diff --stat output:

    19 files changed, 20 insertions(+), 1909 deletions(-)

    If we ever need some of the things we got from git but weren't using, we just
    have to go to the git repo and get fresh, uptodate source code bits.

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

    Arnaldo Carvalho de Melo