1. 02 12月, 2010 4 次提交
  2. 01 12月, 2010 13 次提交
  3. 27 11月, 2010 5 次提交
    • A
      perf tools: Fix lost and unknown events handling · 068ffaa8
      Arnaldo Carvalho de Melo 提交于
      Fix it by explaining what can be happening and giving the number of processed
      and lost events.
      
      Also holler if unknown events were found, that can be due to processing a
      perf.data file collected using a newer tool where newer events got added on
      reporting using an older perf tool, that or a bug, so ask for a report to be
      made.
      
      Works on both --tui and --stdio.
      Suggested-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      068ffaa8
    • S
      perf trace: Handle DT_UNKNOWN on filesystems that don't support d_type · 008f29d3
      Shawn Bohrer 提交于
      Some filesystems like xfs and reiserfs will return DT_UNKNOWN for the
      d_type.  Handle this case by calling stat() to determine the type.
      
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1290355779-3276-1-git-send-email-sbohrer@rgmadvisors.com>
      Signed-off-by: NShawn Bohrer <sbohrer@rgmadvisors.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      008f29d3
    • I
      perf symbols: Correct final kernel map guesses · 9d1faba5
      Ian Munsie 提交于
      If a 32bit userspace perf is running on a 64bit kernel, the end of the final
      map in the kernel would incorrectly be set to 2^32-1 rather than 2^64-1.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1290658375-10342-1-git-send-email-imunsie@au1.ibm.com>
      Signed-off-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9d1faba5
    • A
      perf events: Default to using event__process_lost · 37982ba0
      Arnaldo Carvalho de Melo 提交于
      Tool developers have to fill in a 'perf_event_ops' method table to
      specify how to handle each event, so far the ones that were not
      explicitely especified would get a stub that would just discard the
      event.
      
      Change that so that tool developers can get the lost event details and
      the total number of such events at the end of 'perf report -D' output.
      Suggested-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Frederic 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: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      37982ba0
    • A
      perf record: Add option to disable collecting build-ids · baa2f6ce
      Arnaldo Carvalho de Melo 提交于
      Collecting build-ids for long running sessions may take a long time
      because it needs to traverse the whole just collected perf.data stream
      of events, marking the DSOs that had hits and then looking for the
      .note.gnu.build-id ELF section.
      
      For things like the 'trace' tool that records and right away consumes
      the data on systems where its unlikely that the DSOs being monitored
      will change while 'trace' runs, it is desirable to remove build id
      collection, so add a -B/--no-buildid option to perf record to allow such
      use case.
      
      Longer term we'll avoid all this if we, at DSO load time, in the kernel,
      take advantage of this slow code path to collect the build-id and stash
      it somewhere, so that we can insert it in the PERF_RECORD_MMAP event.
      Reported-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Frederic 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: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      baa2f6ce
  4. 26 11月, 2010 16 次提交
  5. 24 11月, 2010 1 次提交
    • R
      perf symbols: Remove incorrect open-coded container_of() · 02a9d037
      Rabin Vincent 提交于
      At least on ARM, padding is inserted between rb_node and sym in struct
      symbol_name_rb_node, causing "((void *)sym) - sizeof(struct rb_node)" to
      point inside rb_node rather than to the symbol_name_rb_node.  Fix this
      by converting the code to use container_of().
      
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20101123163106.GA25677@debian>
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      02a9d037
  6. 23 11月, 2010 1 次提交
    • A
      perf record: Handle restrictive permissions in /proc/{kallsyms,modules} · c1a3a4b9
      Arnaldo Carvalho de Melo 提交于
      The 59365d13 commit, even being reverted by 33e0d57f, showed a non robust
      behavior in 'perf record': it really should just warn the user that some
      functionality will not be available.
      
      The new behavior then becomes:
      
      	[acme@felicio linux]$ ls -la /proc/{kallsyms,modules}
      	-r-------- 1 root root 0 Nov 22 12:19 /proc/kallsyms
      	-r-------- 1 root root 0 Nov 22 12:19 /proc/modules
      	[acme@felicio linux]$ perf record ls -R > /dev/null
      	Couldn't record kernel reference relocation symbol
      	Symbol resolution may be skewed if relocation was used (e.g. kexec).
      	Check /proc/kallsyms permission or run as root.
      	[ perf record: Woken up 1 times to write data ]
      	[ perf record: Captured and wrote 0.004 MB perf.data (~161 samples) ]
      	[acme@felicio linux]$ perf report --stdio
      	[kernel.kallsyms] with build id 77b05e00e64e4de1c9347d83879779b540d69f00 not found, continuing without symbols
      	# Events: 98  cycles
      	#
      	# Overhead  Command    Shared Object                Symbol
      	# ........  .......  ...............  ....................
      	#
      	    48.26%       ls  [kernel]         [k] ffffffff8102b92b
      	    22.49%       ls  libc-2.12.90.so  [.] __strlen_sse2
      	     8.35%       ls  libc-2.12.90.so  [.] __GI___strcoll_l
      	     8.17%       ls  ls               [.]            11580
      	     3.35%       ls  libc-2.12.90.so  [.] _IO_new_file_xsputn
      	     3.33%       ls  libc-2.12.90.so  [.] _int_malloc
      	     1.88%       ls  libc-2.12.90.so  [.] _int_free
      	     0.84%       ls  libc-2.12.90.so  [.] malloc_consolidate
      	     0.84%       ls  libc-2.12.90.so  [.] __readdir64
      	     0.83%       ls  ls               [.] strlen@plt
      	     0.83%       ls  libc-2.12.90.so  [.] __GI_fwrite_unlocked
      	     0.83%       ls  libc-2.12.90.so  [.] __memcpy_sse2
      
      	#
      	# (For a higher level overview, try: perf report --sort comm,dso)
      	#
      [acme@felicio linux]$
      
      It still has the build-ids for DSOs in the maps with hits:
      
      [acme@felicio linux]$ perf buildid-list
      77b05e00e64e4de1c9347d83879779b540d69f00 [kernel.kallsyms]
      09c4a431a4a8b648fcfc2c2bdda70f56050ddff1 /bin/ls
      af75ea9ad951d25e0f038901a11b3846dccb29a4 /lib64/libc-2.12.90.so
      [acme@felicio linux]$
      
      That can be used in another machine to resolve kernel symbols.
      
      Cc: Eugene Teo <eugeneteo@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jesper Juhl <jj@chaosbits.net>
      Cc: Marcus Meissner <meissner@suse.de>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c1a3a4b9