lkml.org 
[lkml]   [2019]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip: perf/core] perf trace: Introduce --filter for tracepoint events
Em Thu, Oct 17, 2019 at 09:12:05AM +0200, Borislav Petkov escreveu:
> On Tue, Oct 15, 2019 at 05:31:43AM -0000, tip-bot2 for Arnaldo Carvalho de Melo wrote:
> > The following commit has been merged into the perf/core branch of tip:

> > Commit-ID: d4097f1937f2242d0aa0a7c654d2159a6895e5c8
> > Gitweb: https://git.kernel.org/tip/d4097f1937f2242d0aa0a7c654d2159a6895e5c8
> > Author: Arnaldo Carvalho de Melo <acme@redhat.com>
> > AuthorDate: Tue, 08 Oct 2019 07:33:08 -03:00
> > Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
> > CommitterDate: Wed, 09 Oct 2019 11:23:52 -03:00

> > perf trace: Introduce --filter for tracepoint events

> > Similar to what is in 'perf record', works just like there:

> > # perf trace -e msr:*
> > 328.297 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.302 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.306 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.317 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.322 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.327 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.331 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.336 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888)
> > 328.340 :0/0 ^Cmsr:write_msr(msr: FS_BASE, val: 140240388381888)

> I wonder if you guys can force this val:'s format to be always hex?
> Because MSR values are a lot more "natural" in hex...

Sure, I'll get there, for now its just setting scnprintf/strtoul helpers
based on tracepoint argument name and/or type.

But just like for syscalls, we'll get to have a way to specify that
'val', specifically for msr:write_msr, or sometimes, for the tracepoint
system part ('msr' in this case) should be formatted in some way.

For syscalls there is even provision for some args to be formmated based
on the value present in another arg, think ioctls, all this is being
refitted to support tracepoints other than the syscall ones.

The 'msr' one was the super low hanging fruit, we look just at its name,
no checks on what tracepoint it is, and we were investigating some stuff
at Red Hat and Marcelo said it was a PITA to be doing the lookups in
msr-index.h everytime he needed for look for those in traces, so came
first. :-)

- Arnaldo

\
 
 \ /
  Last update: 2019-10-17 15:14    [W:0.946 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site