aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-stat.c
Commit message (Collapse)AuthorAge
* perf_counter tools: Introduce stricter C code checkingIngo Molnar2009-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tighten up our C code requirements: - disallow warnings - disallow declarations-mixed-with-statements - require proper prototypes - require C99 (with gcc extensions) Fix up a ton of problems these measures unearth: - unused functions - needlessly global functions - missing prototypes - code mixed with declarations Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf stat: Convert to Git option parsingIngo Molnar2009-05-26
| | | | | | | | | | | | | | | | | | Remove getopt usage and use Git's much more advanced and more compact command option library. Extend the event parser library with the extensions that were in perf-stat before. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf stat: Remove unused variableIngo Molnar2009-05-26
| | | | | | | | | | | | | | | [ Impact: cleanup ] Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf stat: flip around ':k' and ':u' flagsIngo Molnar2009-05-25
| | | | | | | | | | | | | | | | | | | | | | | | This output: $ perf stat -e 0:1:k -e 0:1:u ./hello Performance counter stats for './hello': 140131 instructions (events) 1906968 instructions (events) Is quite confusing - as :k means "user instructions", :u means "kernel instructions". Flip them around - as the 'exclude' property is not intuitive in the flag naming. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter: Fix userspace buildPeter Zijlstra2009-05-23
| | | | | | | | | | | | | | | | recent userspace (F11) seems to already include the linux/unistd.h bits which means we cannot include the version in the kernel sources due to the header guards being the same. Ensure we include the kernel version first. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <20090523163012.739756497@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf stat: handle Ctrl-CIngo Molnar2009-05-15
| | | | | | | | | | | | | | | | | | | | | Before this change, if a long-running perf stat workload was Ctrl-C-ed, the utility exited without displaying statistics. After the change, the Ctrl-C gets propagated into the workload (and causes its early exit there), but perf stat itself will still continue to run and will display counter results. This is useful to run open-ended workloads, let them run for a while, then Ctrl-C them to get the stats. [ Impact: extend perf stat with new functionality ] Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter tools: remove debug code from builtin-stat.cIngo Molnar2009-05-09
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter: tools: update the tools to support process and inherited countersPeter Zijlstra2009-05-05
| | | | | | | | | | | | | | | | | | | "perf record": - per task counter - inherit switch - nmi switch "perf report": - userspace/kernel filter "perf stat": - userspace/kernel filter Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090505155437.389163017@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perfcounter tools: move common defines ... to local header fileThomas Gleixner2009-05-01
| | | | | | No change, move of duplicated stuff only. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* perf_counter tools: fix x86 syscall numbersIngo Molnar2009-05-01
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter tools: perf stat: make -l default-onIngo Molnar2009-04-30
| | | | | | Turn on scaling display by default - this is less confusing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter tools: fix Documentation/perf_counter build errorPeter Zijlstra2009-04-28
| | | | | | | | | | | | | Mike Galbraith reported: > marge:..Documentation/perf_counter # make > CC builtin-stat.o > In file included from builtin-stat.c:71: > /usr/include/ctype.h:102: error: expected expression before ‘]’ token Remove the ctype.h include. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter tools: move helper library to util/*Ingo Molnar2009-04-27
| | | | | | | Clean up the top level directory a bit by moving all the helper libraries to util/*.[ch]. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* perf_counter tools: separate kerneltop into 'perf top' and 'perf stat'Ingo Molnar2009-04-20
Lets use the Git framework of built-in commands. Signed-off-by: Ingo Molnar <mingo@elte.hu>