perf kvm: Add live mode for analyzing events
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | perf evlist: restore some methods removed in an earlier cleanuptools/ tools/ | +57 | 0 replies | |
| 2/12 | perf evlist: move tracepoint processing code to evlist.ctools/ tools/ tools/ +1 more | +43 | 0 replies | |
| 3/12 | perf evlist: add initialzation function for tracepointstools/ tools/ | +30 | 0 replies | |
| 4/12 | perf session: export a few functions for event processingtools/ tools/ | +16 | 0 replies | |
| 5/12 | perf top: move CONSOLE_CLEAR to header filetools/ tools/ | +2 | 0 replies | |
| 6/12 | perf kvm: remove typecast in init_kvm_event_recordtools/ | +2 | 1 reply | |
| 7/12 | perf kvm: handle realloc failurestools/ | +3 | 3 replies | |
| 8/12 | perf kvm: add braces around multi-line statementstools/ | +6 | 1 reply | |
| 9/12 | perf kvm: split out tracepoints from record argstools/ | +19 | 2 replies | |
| 10/12 | perf kvm: total count is a u64, print as sotools/ | +2 | 1 reply | |
| 11/12 | perf kvm: only process events for vcpus of interesttools/ | +16 | 1 reply | |
| 12/12 | perf kvm: add live modetools/ | +623 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/12] perf kvm: Add live mode for analyzing events
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 rather 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
Same stats options for the record+report path work with the live mode. Display rate defaults to 1 and can be changed using the -d option.
The command works fine for low event rates, but as the number of events increases (e.g., building a kernel in a 4-vcpu VM or nested virtualization) the ordered samples code is failing. e.g,
...
Total Samples:76309, Total events handled time:1121314.04us.
Warning: Timestamp below last timeslice flush
Failed to process event
This is on a 16-cpu server. For the kernel build in a 4 vcpu VM I am seeing on the order of 50,000+ events per second and in the case of nested virtualization (at least this one use case) I am seeing on the order of 100,000+ events per second. Not surprising it's having problems keeping up.
I'll continue poking around the ordered samples code, but wanted to kick this out in case someone has ideas or objections to the approach.
David Ahern (12):
perf evlist: restore some methods removed in an earlier cleanup perf evlist: move tracepoint processing code to evlist.c perf evlist: add initialzation function for tracepoints perf session: export a few functions for event processing perf top: move CONSOLE_CLEAR to header file
perf kvm: remove typecast in init_kvm_event_record perf kvm: handle realloc failures
perf kvm: add braces around multi-line statements perf kvm: split out tracepoints from record args
perf kvm: total count is a u64, print as so
perf kvm: only process events for vcpus of interest perf kvm: add live mode
tools/perf/builtin-kvm.c | 717 ++++++++++++++++++++++++++++++++++++++++++--- tools/perf/builtin-top.c | 2 - tools/perf/util/evlist.c | 120 ++++++++ tools/perf/util/evlist.h | 10 + tools/perf/util/header.c | 39 --- tools/perf/util/session.c | 15 +- tools/perf/util/session.h | 9 + tools/perf/util/top.h | 2 + 8 files changed, 819 insertions(+), 95 deletions(-)
Signature · 1 line
1.7.10.1