lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 May 2010 10:03:02 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Avi Kivity <avi@...hat.com>
Cc:	Stefan Hajnoczi <stefanha@...il.com>,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, Frederic Weisbecker <fweisbec@...il.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>,
	Johannes Berg <johannes.berg@...el.com>,
	Darren Hart <darren@...art.com>
Subject: Re: Perf trace event parse errors for KVM events

On Sun, 2010-05-30 at 11:10 +0300, Avi Kivity wrote:
> On 05/29/2010 04:19 PM, Steven Rostedt wrote:
>     
> > 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.
> 

trace-cmd has plugin support to override how to read the format and
print it out. It now has the ability to write those plugins in python.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ