aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/usage.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-23perf tools: Simplify die() mechanismArnaldo Carvalho de Melo1-7/+1
This should die altogether, but for now lets remove a bit of this stuff, as it is not used at all. Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-10-19perf test: Suppress libtraceevent warningsNamhyung Kim1-0/+5
Currently libtraceevent emits warning on unsupported event formats. However it'd be better to see them only -v option is given. To do that, it needs to override the warning() function which is used in the libtracevent. Thus add set_warning_routine() same as set_die_routine() and check the verbose flag in our warning routine. Before: # perf test 5 5: parse events tests : Warning: [kvmmmu:kvm_mmu_get_page] bad op token { Warning: [kvmmmu:kvm_mmu_sync_page] bad op token { Warning: [kvmmmu:kvm_mmu_unsync_page] bad op token { Warning: [kvmmmu:kvm_mmu_prepare_zap_page] bad op token { Warning: [kvmmmu:fast_page_fault] function is_writable_pte not defined ... Ok After: # perf test 5 5: parse events tests : Ok Signed-off-by: Namhyung Kim <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-05-07perf target: Introduce perf_target__parse_uid()Namhyung Kim1-31/+0
Add and use the modern perf_target__parse_uid() and get rid of the old parse_target_uid(). Signed-off-by: Namhyung Kim <[email protected]> Reviewed-by: David Ahern <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-05-02perf target: Split out perf_target handling codeNamhyung Kim1-34/+0
For further work on perf_target, it'd be better off splitting the code into a separate file. Signed-off-by: Namhyung Kim <[email protected]> Reviewed-by: David Ahern <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ committer note: Fixed perl build by using stdbool and types.h in target.h ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-05-02perf tools: Check more combinations of PID/TID, UID and CPU switchesNamhyung Kim1-0/+14
There were some combinations of these switches that are not so appropriate IMHO. Since there are implicit priorities between them and they worked well anyway, but it ends up opening useless duplicated events. For example, 'perf stat -t <pid> -a' will open multiple events for the thread instead of one. Add explicit checks and warn user in perf_target__validate(). Signed-off-by: Namhyung Kim <[email protected]> Reviewed-by: David Ahern <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-05-02perf tools: Introduce perf_target__validate() helperNamhyung Kim1-8/+21
The perf_target__validate function is used to check given PID/TID/UID/CPU target options and warn if some combination is impossible. Also this can make some arguments of parse_target_uid() function useless as it is checked before the call via our new helper. Signed-off-by: Namhyung Kim <[email protected]> Reviewed-by: David Ahern <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-02-13perf tools: Allow multiple threads or processes in record, stat, topDavid Ahern1-3/+3
Allow a user to collect events for multiple threads or processes using a comma separated list. e.g., collect data on a VM and its vhost thread: perf top -p 21483,21485 perf stat -p 21483,21485 -ddd perf record -p 21483,21485 or monitoring vcpu threads perf top -t 21488,21489 perf stat -t 21488,21489 -ddd perf record -t 21488,21489 Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Ahern <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-01-24perf tools: Introduce per user viewArnaldo Carvalho de Melo1-0/+39
The new --uid command line option will show only the tasks for a given user, using the proc interface to figure out the existing tasks. Kernel work is needed to close races at startup, but this should already be useful in many use cases. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2011-12-20perf tools: Remove stale git headlines from top commentNamhyung Kim1-1/+4
These files are part of PERF not GIT although they're come from there :) Cc: Ingo Molnar <[email protected]> Cc: Johannes Schindelin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2009-06-07perf top: Fall back to cpu-clock-tick hrtimer sampling if no cycle counter ↵Ingo Molnar1-5/+5
available On architectures/CPUs without PMU support but with perfcounters enabled 'perf top' currently fails because it cannot create a cycle based hw-perfcounter. Fall back to the cpu-clock-tick sw-perfcounter in this case, which is hrtimer based and will always work (as long as perfcounters is enabled). Cc: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2009-06-06perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/Ingo Molnar1-0/+80
Several people have suggested that 'perf' has become a full-fledged tool that should be moved out of Documentation/. Move it to the (new) tools/ directory. Cc: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>