mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-tip-commits@vger.kernel.org,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Brendan Gregg" <brendan.d.gregg@gmail.com>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Luis Cláudio Gonçalves" <lclaudio@redhat.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [tip: perf/core] perf trace: Introduce --filter for tracepoint events
Date: Thu, 17 Oct 2019 10:13:25 -0300	[thread overview]
Message-ID: <20191017131325.GB3437@redhat.com> (raw)
In-Reply-To: <20191017071205.GA14441@zn.tnic>

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

      reply	other threads:[~2019-10-17 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-95bfe5d4tzy5f66bx49d05rj@git.kernel.org>
2019-10-15  5:31 ` tip-bot2 for Arnaldo Carvalho de Melo
2019-10-17  7:12   ` Borislav Petkov
2019-10-17 13:13     ` Arnaldo Carvalho de Melo [this message]

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=20191017131325.GB3437@redhat.com \
    --to=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@alien8.de \
    --cc=brendan.d.gregg@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=lclaudio@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=namhyung@kernel.org \
    /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

Powered by JetHome