kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: rostedt@goodmis.org
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, Frederic Weisbecker <fweisbec@gmail.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: Perf trace event parse errors for KVM events
Date: Sun, 30 May 2010 11:10:38 +0300	[thread overview]
Message-ID: <4C021D7E.1060705@redhat.com> (raw)
In-Reply-To: <1275139177.22648.610.camel@gandalf.stny.rr.com>

On 05/29/2010 04:19 PM, Steven Rostedt wrote:
> 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.
>    

Right.  The tools can fall back to %x/%s based on the structure 
descriptor if they can't parse the format string.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2010-05-30  8:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 12:34 Perf trace event parse errors for KVM events Stefan Hajnoczi
2010-05-28 16:42 ` Stefan Hajnoczi
2010-05-28 21:27   ` Marcelo Tosatti
2010-05-28 21:45   ` Steven Rostedt
2010-05-29  8:21     ` Stefan Hajnoczi
2010-05-29 11:50     ` Avi Kivity
2010-05-29 13:19       ` Steven Rostedt
2010-05-30  8:10         ` Avi Kivity [this message]
2010-05-30 14:03           ` Steven Rostedt
2010-05-30 14:07             ` Avi Kivity
2010-05-30 15:34               ` Steven Rostedt
2010-06-01  8:39                 ` Avi Kivity
2010-06-01 11:59                   ` Steven Rostedt
2010-06-01 12:39                     ` Avi Kivity
2010-06-03 21:57                       ` Steven Rostedt
2010-06-06  8:08                         ` Avi Kivity
2010-06-06 15:02                           ` Steven Rostedt
2010-06-06 16:21                             ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C021D7E.1060705@redhat.com \
    --to=avi@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).