1. 13 May, 2010 5 commits
    • Kirill Smelkov's avatar
      perf trace scripts: Fix typos in perf-trace-python.txt · 5d2be7cb
      Kirill Smelkov authored
      option option   -> option
      special special -> special
      Signed-off-by: default avatarKirill Smelkov <kirr@mns.spb.ru>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <1273747165-17242-1-git-send-email-kirr@mns.spb.ru>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5d2be7cb
    • Stephane Eranian's avatar
      perf tools: change event inheritance logic in stat and record · 2e6cdf99
      Stephane Eranian authored
      By default, event inheritance across fork and pthread_create was on but the -i
      option of stat and record, which enabled inheritance, led to believe it was off
      by default.
      
      This patch fixes this logic by inverting the meaning of the -i option.  By
      default inheritance is on whether you attach to a process (-p), a thread (-t)
      or start a process. If you pass -i, then you turn off inheritance. Turning off
      inheritance if you don't need it, helps limit perf resource usage as well.
      
      The patch also fixes perf stat -t xxxx and perf record -t xxxx which did not
      start the counters.
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4bea9d2f.d60ce30a.0b5b.08e1@mx.google.com>
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2e6cdf99
    • Frederic Weisbecker's avatar
      perf hist: Fix missing getline declaration · 8a0ecfb8
      Frederic Weisbecker authored
      hist.c needs to include util.h so that it gets stdio.h
      inclusion with __GNU_SOURCE defined.
      
      Fixes:
      	util/hist.c: In function ‘hist_entry__parse_objdump_line’:
      	util/hist.c:931: erreur: implicit declaration of function ‘getline’
      	util/hist.c:931: erreur: nested extern declaration of ‘getline’
      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>
      LKML-Reference: <1273772836-11533-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8a0ecfb8
    • Frederic Weisbecker's avatar
      perf hist: Fix hists__browse no-newt case · 8769e1c7
      Frederic Weisbecker authored
      Fix mistake in a parameter type of the no-newt hists__browse()
      version.
      
      Fixes:
      	builtin-report.c: In function ‘__cmd_report’:
      	builtin-report.c:314: erreur: incompatible type for argument 1 of ‘hists__browse’
      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>
      LKML-Reference: <1273771378-8577-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8769e1c7
    • Cyrill Gorcunov's avatar
      x86, perf: P4 PMU -- use hash for p4_get_escr_idx() · 72001990
      Cyrill Gorcunov authored
      Linear search over all p4 MSRs should be fine if only
      we would not use it in events scheduling routine which
      is pretty time critical. Lets use hashes. It should speed
      scheduling up significantly.
      
      v2: Steven proposed to use more gentle approach than issue
          BUG on error, so we use WARN_ONCE now
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      LKML-Reference: <20100512174242.GA5190@lenovo>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      72001990
  2. 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
  3. 11 May, 2010 8 commits
  4. 10 May, 2010 18 commits
  5. 09 May, 2010 7 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