Re: Perf trace event parse errors for KVM events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2010-05-29 at 14:50 +0300, Avi Kivity wrote:
> On 05/29/2010 12:45 AM, Steven Rostedt wrote:
> > On Fri, 2010-05-28 at 17:42 +0100, Stefan Hajnoczi wrote:
> >    
> >> I get parse errors when using Steven Rostedt's trace-cmd tool, too.
> >>
> >> Any ideas what is going on here?  I can provide more info (e.g. trace
> >> files) if necessary.
> >>      
> > Does trace-cmd fail on the same tracepoints? Have you checkout the
> > latest code?.
> >
> > I do know it fails on some of the KVM tracerpoints since the formatting
> > they use is obnoxious.
> >
> >    
> 
> Isn't there a binary trace for this?
> 

The pretty printing from the kernel handles this fine. But there's
pressure to pass the format to userspace in binary and have the tool
parse it. Currently it uses the print fmt to figure out how to parse.

Using one of the examples that Stefan showed:

kvmmmu/kvm_mmu_get_page: print fmt: "%s %s", ({ const char *ret =
p->buffer + p->len; static const char *access_str[] = { "---", "--x",
"w--", "w-x", "-u-", "-ux", "wu-", "wux" }; union kvm_mmu_page_role
role; role.word = REC->role; trace_seq_printf(p, "sp gfn %llx %u%s q%u%s
%s%s" " %snxe root %u %s%c", REC->gfn, role.level, role.cr4_pae ? "
pae" : "", role.quadrant, role.direct ? " direct" : "",
access_str[role.access], role.invalid ? " invalid" : "", role.nxe ? "" :
"!", REC->root_count, REC->unsync ? "unsync" : "sync", 0); ret; }),
REC->created ? "new" : "existing"


You need a full C parser/interpreter to understand the above.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux