1. 23 1月, 2011 3 次提交
    • A
      perf evsel: Introduce mmap support · 70082dd9
      Arnaldo Carvalho de Melo 提交于
      Out of the code in 'perf top'. Record is next in line.
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      70082dd9
    • A
      perf evsel: Allow specifying if the inherit bit should be set · 9d04f178
      Arnaldo Carvalho de Melo 提交于
      As this is a per-cpu attribute, we can't set it up in advance and use it
      for all the calls.
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      9d04f178
    • A
      perf evsel: Support event groups · f08199d3
      Arnaldo Carvalho de Melo 提交于
      The perf_evsel__open now have an extra boolean argument specifying if
      event grouping is desired.
      
      The first file descriptor created on a CPU becomes the group leader.
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      f08199d3
  2. 11 1月, 2011 1 次提交
    • A
      perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1) · 0252208e
      Arnaldo Carvalho de Melo 提交于
      And a test for it:
      
      [acme@felicio linux]$ perf test
       1: vmlinux symtab matches kallsyms: Ok
       2: detect open syscall event: Ok
       3: detect open syscall event on all cpus: Ok
      [acme@felicio linux]$
      
      Translating C the test does:
      
      1. generates different number of open syscalls on each CPU
         by using sched_setaffinity
      2. Verifies that the expected number of events is generated
         on each CPU
      
      It works as expected.
      
      LKML-Reference: <new-submission>
      Cc: Frederic 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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0252208e
  3. 07 1月, 2011 1 次提交
    • L
      perf tools: Pass whole attr to event selectors · 23a2f3ab
      Lin Ming 提交于
      Since commit 69aad6f1(perf tools: Introduce event selectors), only
      perf_event_attr::type and ::config are passed to event selector, which
      makes perf tool not work correctly.
      
      For example, PEBS does not work because perf_event_attr::precise_ip is
      not passed to the syscall.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <1294369869.20563.19.camel@minggr.sh.intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23a2f3ab
  4. 04 1月, 2011 5 次提交
    • A
      perf evsel: Auto allocate resources needed for some methods · 4eed11d5
      Arnaldo Carvalho de Melo 提交于
      While writing the first user of the routines created from the ad-hoc
      routines in the existing builtins I noticed that the resulting set of
      calls was too long, reduce it by doing some best effort allocations.
      
      Tools that need to operate on multiple threads and cpus should pre-allocate
      enough resources by explicitely calling the perf_evsel__alloc_{fd,counters}
      methods.
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      4eed11d5
    • A
      perf evsel: Use {cpu,thread}_map to shorten list of parameters · 86bd5e86
      Arnaldo Carvalho de Melo 提交于
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      86bd5e86
    • A
      perf evsel: Introduce per cpu and per thread open helpers · 48290609
      Arnaldo Carvalho de Melo 提交于
      Abstracting away the loops needed to create the various event fd handlers.
      
      The users have to pass a confiruged perf->evsel.attr field, which is already
      usable after perf_evsel__new (constructor) time, using defaults.
      
      Comes out of the ad-hoc routines in builtin-stat, that now uses it.
      
      Fixed a small silly bug where we were die()ing before killing our
      children, dysfunctional family this one 8-)
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      48290609
    • A
      perf evsel: Steal the counter reading routines from stat · c52b12ed
      Arnaldo Carvalho de Melo 提交于
      Making them hopefully generic enough to be used in 'perf test',
      well see.
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      c52b12ed
    • A
      perf tools: Introduce event selectors · 69aad6f1
      Arnaldo Carvalho de Melo 提交于
      Out of ad-hoc code and global arrays with hard coded sizes.
      
      This is the first step on having a library that will be first
      used on regression tests in the 'perf test' tool.
      
      [acme@felicio linux]$ size /tmp/perf.before
         text	   data	    bss	    dec	    hex	filename
      1273776	  97384	5104416	6475576	 62cf38	/tmp/perf.before
      [acme@felicio linux]$ size /tmp/perf.new
         text	   data	    bss	    dec	    hex	filename
      1275422	  97416	1392416	2765254	 2a31c6	/tmp/perf.new
      
      Cc: Frederic 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      69aad6f1