1. 12 May, 2010 2 commits
    • Ingo Molnar's avatar
    • Arnaldo Carvalho de Melo's avatar
      perf report: Librarize the annotation code and use it in the newt browser · ef7b93a1
      Arnaldo Carvalho de Melo authored
      Now we don't anymore use popen to run 'perf annotate' for the selected
      symbol, instead we collect per address samplings when processing samples
      in 'perf report' if we're using the newt browser, then we use this data
      directly to do annotation.
      
      Done this way we can actually traverse the objdump_line objects
      directly, matching the addresses to the collected samples and colouring
      them appropriately using lower level slang routines.
      
      The new ui_browser class will be reused for the main, callchain aware,
      histogram browser, when it will be made generic and don't assume that
      the objects are always instances of the objdump_line class maintained
      using list_heads.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ef7b93a1
  2. 11 May, 2010 8 commits
  3. 10 May, 2010 18 commits
  4. 09 May, 2010 12 commits
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Consider unresolved DSOs in the dso__col_widt calculation · 3ceb0d44
      Arnaldo Carvalho de Melo authored
      By using BITS_PER_LONG / 4, that is the number of chars that will be
      used in such cases as the DSO "name".
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ceb0d44
    • Hitoshi Mitake's avatar
      perf lock: Drop "-a" option from cmd_record() default arguments set · 76ba7e84
      Hitoshi Mitake authored
      This patch drops "-a" from the default arguments passed to
      perf record by perf lock.
      
      If a user wants to do a system wide record of lock events,
              perf lock record -a <program> <argument> ...
      is enough for this purpose.
      
      This can reduce the size of the perf.data file.
      
      % sudo ./perf lock record whoami
      root
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.439 MB perf.data (~19170 samples) ]
      % sudo ./perf lock record -a whoami   # with -a option
      root
      [ perf record: Woken up 0 times to write data ]
      [ perf record: Captured and wrote 48.962 MB perf.data (~2139197 samples) ]
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      LKML-Reference: Message-Id: <1273306229-5216-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      76ba7e84
    • Arnaldo Carvalho de Melo's avatar
      perf hist: Simplify the insertion of new hist_entry instances · 28e2a106
      Arnaldo Carvalho de Melo authored
      And with that fix at least one bug:
      
      The first hit for an entry, the one that calls malloc to create a new
      instance in __perf_session__add_hist_entry, wasn't adding the count to
      the per cpumode (PERF_RECORD_MISC_USER, etc) total variable.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      28e2a106
    • Arnaldo Carvalho de Melo's avatar
      perf report: Fix leak of resolved callchains array on error path · 39d1e1b1
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      39d1e1b1
    • Arnaldo Carvalho de Melo's avatar
      perf callchain: Move validate_callchain to callchain lib · 139633c6
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      139633c6
    • Tom Zanussi's avatar
      perf/live-mode: Handle payload-less events · 794e43b5
      Tom Zanussi authored
      Some events, such as the PERF_RECORD_FINISHED_ROUND event consist of
      only an event header and no data.  In this case, a 0-length payload
      will be read, and the 0 return value will be wrongly interpreted as an
      'unexpected end of event stream'.
      
      This patch allows for proper handling of data-less events by skipping
      0-length reads.
      Signed-off-by: default avatarTom Zanussi <tzanussi@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      LKML-Reference: <1273038527.6383.51.camel@tropicana>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      794e43b5
    • Frederic Weisbecker's avatar
      tracing: Factorize lock events in a lock class · 2c193c73
      Frederic Weisbecker authored
      lock_acquired, lock_contended and lock_release now share the
      same prototype and format. Let's factorize them into a lock
      event class.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      2c193c73
    • Frederic Weisbecker's avatar
      tracing: Drop the nested field from lock_release event · 93135439
      Frederic Weisbecker authored
      Drop the nested field as we don't use it. Every nested state can
      be computed from a state machine on post processing already.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      93135439
    • Frederic Weisbecker's avatar
      tracing: Drop lock_acquired waittime field · 883a2a31
      Frederic Weisbecker authored
      Drop the waittime field from the lock_acquired event, we can
      calculate it by substracting the lock_acquired event timestamp
      with the matching lock_acquire one.
      
      It is not needed and takes useless space in the traces.
      Signed-off-by: default avatarFrederic 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: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      883a2a31
    • Frederic Weisbecker's avatar
      perf lock: Always check min AND max wait time · 90c0e5fc
      Frederic Weisbecker authored
      When a lock is acquired after beeing contended, we update the
      wait time statistics for the given lock.
      But if the min wait time is updated, we don't check the max wait
      time. This is wrong because the first time we update the wait time,
      we want to update both min and max wait time.
      
      Before:
      	Name   acquired  contended total wait (ns)   max wait (ns)   min wait (ns)
      	key          8          1           21656           0           21656
      
      After:
      	Name   acquired  contended total wait (ns)   max wait (ns)   min wait (ns)
      	key          8          1           21656           21656           21656
      Signed-off-by: default avatarFrederic 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: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      90c0e5fc
    • Frederic Weisbecker's avatar
      perf: Fix perf lock bad rate · 5efe08cf
      Frederic Weisbecker authored
      Fix the cast made to get the bad rate. It is made in the result
      instead of the operands. We need the operands to be cast in double,
      otherwise the result will always be zero.
      Signed-off-by: default avatarFrederic 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: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      5efe08cf
    • Frederic Weisbecker's avatar
      perf: Humanize lock flags in perf lock · 84c7a217
      Frederic Weisbecker authored
      Use an enum instead of plain constants for lock flags.
      Signed-off-by: default avatarFrederic 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: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      84c7a217