Feature #1363
closedadd vmregs[] variable to DTrace
100%
Description
When using DTrace to understand KVM performance, it's very useful to be able to pull out VM registers from the current VMCS. Like uregs[], this is a DTrace-defined associative array, with indices specified by the constants specified by the architecture. This allows for DTrace one-liners like:
# dtrace -n kvm-guest-exit'{@[pid, vmregs[VMX_GUEST_RIP]] = count()}' -n tick-1sec'{printf("%10s %20s %s\n", "PID", "GUEST RIP", "COUNT"); printa("%10d %20x %@d\n", @); clear(@); }' -q PID GUEST RIP COUNT 5026 fee61bc4 0 5026 fffffffffb8ba740 0 4668 ffffffff8100a72d 1 5026 fe931ace 1 5026 fffffffffb84d9c1 1 5026 fffffffffb84d9cd 1 5026 fffffffffb84da03 1 5026 fffffffffb84da0f 1 5026 fffffffffb84db0c 1 5026 fffffffffb84db18 1 5026 fffffffffb84db73 1 5026 fffffffffb84db7f 1 4668 ffffffff81031afa 2 4668 ffffffff81031b0a 2 4668 ffffffff81031b1f 2 4668 ffffffff814c753f 2 5026 fffffffff794c158 2 5026 fffffffff794d0e6 2 5026 fffffffff794d15a 2 5026 fffffffff794d168 2 5026 fffffffffb84dae2 2 5026 fffffffffb84daee 2 5026 fffffffffb84da49 3 5026 fffffffffb84da55 3 5026 fffffffffb84da6b 3 5026 fffffffffb84da77 3 5026 fffffffffb84da8e 3 5026 fffffffffb84da9a 3 5026 fffffffffb84dab1 3 5026 fffffffffb84dabd 3 4668 ffffffff81037f0a 12 4668 ffffffff8103163b 26 5026 fffffffff794c074 119 5026 fffffffffb84072d 121 5026 fffffffff794d10a 137 ^C
Updated by Garrett D'Amore about 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
changeset: 13431:e7ec489c7cf5
tag: tip
user: Bryan Cantrill <bryan@joyent.com>
date: Sat Aug 13 02:06:39 2011 -0700
description:
1362 add kvmstat for monitoring of KVM statistics
1363 add vmregs[] variable to DTrace
1364 need disassembler support for VMX instructions
1365 mdb needs 16-bit disassembler support
Reviewed by: Brendan Gregg <brendan.gregg@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>