1. 23 7月, 2010 1 次提交
    • A
      perf annotate: Fix handling of goto labels that are valid hex numbers · 70a7cb3b
      Arnaldo Carvalho de Melo 提交于
      When parsing the objdump disassembly output we can have goto labels that
      are valid hex numbers and thus get confused with lines with machine
      code.
      
      Handle the common case of a label that has nothing after it and other
      cases where there is just source code by validating the resulting "ip".
      
      It is still possible that we find goto labels that are in the function
      address range, but only if they are located before the real address we
      should be OK.
      
      A change in the objdump output to have a clear marker separating
      addresses from the disassembly would come handy, but we would still have
      to deal with older versions.
      Reported-by: NGleb Natapov <gleb@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <20100722170541.GF17631@ghostprotocols.net>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      70a7cb3b
  2. 17 7月, 2010 1 次提交
    • G
      perf symbols: Fix directory descriptor leaking · 74534341
      Gui Jianfeng 提交于
      When I ran "perf kvm ... top", I encountered the following error output.
      
        Error: perfcounter syscall returned with -1 (Too many open files)
      
        Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
      
      Looking into perf, I found perf opens too many directories at
      initialization time, but forgets to close them. Here is the fix.
      
      LKML-Reference: <4C230362.5080704@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      74534341
  3. 16 7月, 2010 1 次提交
    • F
      perf: Fix various display bugs with parent filtering · 58c34390
      Frederic Weisbecker 提交于
      Hists that have been filtered, because they don't have callchains
      matching the parent filter, won't be printed. As such,
      hist_entry__snprintf() returns 0 for them, but we don't control
      this value and we always print the buffer, which might be
      untouched and then only made of random stack garbage.
      
      Not only does it paint the screen with barf, it also prints
      the callchains for these hists, even though they have been filtered,
      since the hist has been filtered as well.
      
      We need to check the return value of hist_entry__snprintf() and
      ignore the hist if it is 0, which means it didn't get any callchain
      matching the parent filter. This fixes the barf and the undesired
      callchains.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      58c34390
  4. 08 7月, 2010 2 次提交
    • F
      perf: Sync callchains with period based hits · 108553e1
      Frederic Weisbecker 提交于
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      108553e1
    • F
      perf: Resurrect flat callchains · 97aa1052
      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: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: 2.6.31.x-2.6.34.x <stable@kernel.org>
      97aa1052
  5. 05 7月, 2010 2 次提交
  6. 02 7月, 2010 1 次提交
  7. 17 6月, 2010 1 次提交
    • A
      perf session: Remove threads from tree on PERF_RECORD_EXIT · 720a3aeb
      Arnaldo Carvalho de Melo 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      720a3aeb
  8. 10 6月, 2010 1 次提交
  9. 04 6月, 2010 1 次提交
    • A
      perf symbols: Set the DSO long name when using symbol_conf.vmlinux_name · e7dadc00
      Arnaldo Carvalho de Melo 提交于
      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: NStephane Eranian <eranian@google.com>
      Tested-by: NStephane Eranian <eranian@google.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20100604003900.GD10469@ghostprotocols.net>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e7dadc00
  10. 01 6月, 2010 4 次提交
    • P
      perf scripts python: Give field dict to unhandled callback · c0251485
      Pierre Tardy 提交于
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>,
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <1275340329-2397-1-git-send-email-tardyp@gmail.com>
      Signed-off-by: NPierre Tardy <tardyp@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c0251485
    • K
      perf hist: fix objdump output parsing · 75d9ef17
      Konstantin Stepanyuk 提交于
      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 <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NKonstantin Stepanyuk <konstantin.stepanyuk@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      75d9ef17
    • F
      perf: Do the comm inheritance per thread in event__process_task · dd833d71
      Frederic Weisbecker 提交于
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      dd833d71
    • F
      perf: Process comm events by tid · 13eb04fd
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      13eb04fd
  11. 27 5月, 2010 3 次提交
    • A
      perf tui: Fix last use_browser problem related to .perfconfig · c4fe52a8
      Arnaldo Carvalho de Melo 提交于
      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: NFrédéric Weisbecker <fweisbec@gmail.com>
      Tested-by: NFrédéric Weisbecker <fweisbec@gmail.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c4fe52a8
    • A
      perf symbols: Add the build id cache to the vmlinux path · 5ad90e4e
      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: NStephane Eranian <eranian@google.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5ad90e4e
    • A
      perf tui: Reset use_browser if stdout is not a tty · 62e3436b
      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 <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      62e3436b
  12. 24 5月, 2010 2 次提交
    • A
      perf report: Support multiple events on the TUI · d67f088e
      Arnaldo Carvalho de Melo 提交于
      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 <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d67f088e
    • A
      perf annotate: Fix up usage of the build id cache · 44bf4606
      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: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      44bf4606
  13. 22 5月, 2010 2 次提交
    • A
      perf annotate: Add TUI interface · 46e3e055
      Arnaldo Carvalho de Melo 提交于
      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 <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      46e3e055
    • A
      perf tui: Remove annotate from popup menu after failure · 6e78c9fd
      Arnaldo Carvalho de Melo 提交于
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6e78c9fd
  14. 21 5月, 2010 2 次提交
    • F
      perf: Fix getline undeclared · 598357eb
      Frederic Weisbecker 提交于
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1274438919-5104-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      598357eb
    • A
      perf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig · 5d06e691
      Arnaldo Carvalho de Melo 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Discussed-with: Stephane Eranian <eranian@google.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5d06e691
  15. 20 5月, 2010 6 次提交
    • A
      perf annotate: Use build-ids to find the right DSO · b36f19d5
      Arnaldo Carvalho de Melo 提交于
      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: NStephane Eranian <eranian@google.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b36f19d5
    • A
      perf TUI: Make 'space' be an alias to 'PgDn' · 17930b40
      Arnaldo Carvalho de Melo 提交于
      Just like if one is using the stdio based pager, or more/less, for that
      matter.
      Suggested-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      17930b40
    • F
      perf: Fix unaligned accesses while fetching trace values · 85cb68b2
      Frederic Weisbecker 提交于
      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: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      85cb68b2
    • T
      perf: Use read() instead of lseek() in trace_event_read.c:skip() · cbb5cf7f
      Tom Zanussi 提交于
      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 d00a47cc 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: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1273032130.6383.28.camel@tropicana>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      cbb5cf7f
    • A
      perf session: Make read_build_id routines look at the host_machine too · f869097e
      Arnaldo Carvalho de Melo 提交于
      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: NTom Zanussi <tzanussi@gmail.com>
      Reported-by: NStephane Eranian <eranian@google.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f869097e
    • A
      perf symbols: Don't try to read the build-id twice · f6e1467d
      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 <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f6e1467d
  16. 19 5月, 2010 3 次提交
    • A
      perf tools: remove xstrndup, xmalloc, xzalloc · 151f85a4
      Arnaldo Carvalho de Melo 提交于
      All the functions that call this can handle the equivalent, non
      panic'ing wrapped routines.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      151f85a4
    • A
      perf probe: Fix some error exit paths · b448c4b6
      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 <fweisbec@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b448c4b6
    • A
      perf tools: Remove some unused functions · a41794cd
      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 <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a41794cd
  17. 18 5月, 2010 7 次提交