android_kernel_motorola_sm6225/tools/perf
David Ahern 1afe1d1484 perf kvm: Add live mode
perf kvm stat currently requires back to back record and report commands
to see stats. e.g,.

  perf kvm stat record -p $pid -- sleep 1
  perf kvm stat report

This is inconvenvient for on box monitoring of a VM. This patch
introduces a 'live' mode that in effect combines the record plus report
into one command. e.g., to monitor a single VM:

  perf kvm stat live -p $pid

or all VMs:

  perf kvm stat live

Same stats options for the record+report path work with the live mode.
Display rate defaults to 1 second and can be changed using the -d
option.

v4:
- address comments from Xiao -- verify_vcpu check should not look at
  processors on line for the host, prune configurable options.
- set attr->{mmap,comm,task} to 0 - don't need task events so trim events
  we have to deal with
- better control of time for queue event flushing to reduce frequency of
  "Timestamp below last timeslice flush" failures.

v3:
updated to use existing tracepoint parsing code

v2:
removed ABSTIME arg from timerfd_settime as mentioned by Namhyung
only call perf_kvm__handle_stdin when poll returns activity.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1375753297-69645-3-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-08-07 17:35:38 -03:00
..
arch perf tools: Fix compile of util/tsc.c 2013-08-07 17:35:24 -03:00
bench perf bench: Fix memcpy benchmark for large sizes 2013-07-22 12:41:56 -03:00
config perf tools: Use default include path notation for libtraceevent headers 2013-07-12 13:45:54 -03:00
Documentation perf stat: Add support for --initial-delay option 2013-08-07 17:35:29 -03:00
python perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf script: Fix broken include in Context.xs 2013-07-10 13:47:00 -03:00
tests perf tests: Add kcore to the object code reading test 2013-08-07 17:35:34 -03:00
ui perf annotate browser: Fix typo 2013-08-07 17:35:37 -03:00
util perf session: Export queue_event function 2013-08-07 17:35:37 -03:00
.gitignore perf tools: Ignore compiled python binaries 2012-09-07 12:10:58 -03:00
bash_completion perf tools: Complete tracepoint event names 2012-10-04 12:44:52 -03:00
builtin-annotate.c perf tools: Add support for weight v7 (modified) 2013-04-01 12:19:43 -03:00
builtin-bench.c perf tools: Make numa benchmark optional 2013-01-30 10:36:21 -03:00
builtin-buildid-cache.c perf buildid-cache: Add --update option 2013-02-14 14:59:27 -03:00
builtin-buildid-list.c perf symbols: Generalize filter in __fprintf_buildid methods 2012-12-09 08:46:07 -03:00
builtin-diff.c perf diff: Add generic order option for compute sorting 2013-07-12 13:54:16 -03:00
builtin-evlist.c perf evlist: Pass the event_group info via perf_attr_details 2013-02-06 18:09:28 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
builtin-inject.c perf symbols: Load kernel maps before using 2013-08-07 17:35:31 -03:00
builtin-kmem.c perf tools: struct thread has a tid not a pid 2013-07-12 13:53:50 -03:00
builtin-kvm.c perf kvm: Add live mode 2013-08-07 17:35:38 -03:00
builtin-list.c perf list: List kernel supplied event aliases 2013-07-12 13:53:53 -03:00
builtin-lock.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-mem.c perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
builtin-probe.c perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
builtin-record.c perf tools: Remove event types framework completely 2013-07-15 16:28:22 -03:00
builtin-report.c perf tools: Support callchain sorting based on addresses 2013-07-22 12:42:18 -03:00
builtin-sched.c perf tools: struct thread has a tid not a pid 2013-07-12 13:53:50 -03:00
builtin-script.c perf symbols: Load kernel maps before using 2013-08-07 17:35:31 -03:00
builtin-stat.c perf stat: Flush output after each line in interval mode 2013-08-07 17:35:29 -03:00
builtin-timechart.c perf timechart: Remove event types framework only user 2013-07-15 16:14:47 -03:00
builtin-top.c perf annotate: Allow disassembly using /proc/kcore 2013-08-07 17:35:34 -03:00
builtin-trace.c perf trace: Beautify 'connect' result 2013-08-07 17:35:25 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile perf tests: Add test for reading object code 2013-08-07 17:35:30 -03:00
MANIFEST perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf.c perf tools: Convert needless static variable to local 2013-04-01 12:22:48 -03:00
perf.h perf tools: Add support for weight v7 (modified) 2013-04-01 12:19:43 -03:00