[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC/PATCHSET 0/5] perf ftrace: Implement function latency histogram (v1)
Em Wed, Dec 01, 2021 at 09:21:52AM -0800, Namhyung Kim escreveu:
> On Wed, Dec 1, 2021 at 3:59 AM Arnaldo Carvalho de Melo <> wrote:
> > Em Tue, Nov 30, 2021 at 04:36:49PM -0800, Stephane Eranian escreveu:
> > > I am not too fond of the flat option because as we had more bpf tools
> > > like function latency, then we keep extending the list of commands
> > > each with a small span which is different
> > > from what we have right now.

> > I think we should focus on the tool end result, not on how it is
> > implemented, i.e. in this specific "function latency" tool ftrace is
> > used with BPF, but we could perhaps have used some other mechanism.

> Agreed, but I think function latency belongs to function tracing
> conceptually. So I added it as a subcommand in perf ftrace
> not just because of the implementation.

Fair enough, I think we can go as-is then, whoever finds this overly
long can do:

alias flat="perf ftrace latency"

And go:

flat -p `pidof firefox`


> > I think all these tools should have as much as possible a common set of
> > options, like the targets (cpu, cgroup, pid, tid, etc) so that one can
> > go from different views for those targets by just changing the name of
> > the tool.

> Currently, perf ftrace shares the target options with both subcommands.
> Please see common_options in cmd_ftrace().

Sure, but I was alluding to all perf tools, not just 'perf ftrace'
subcommands, i.e. one can go from:

perf ftrace trace --pid `pidof firefox`


perf trace --pid `pidof firefox`


perf stat --pid `pidof firefox`


perf top --pid `pidof firefox`

and get different views of that workload.

Have you thought about userspace function latencies? What tech would you
use for that, since ftrace doesn't cover those?

Would be nice that a single tool could be used to obtain userspace and
kernel space function latencies, just like 'perf probe' can be used for
kernel and userspace, choosing, behind the scenes, kprobes or uprobes.

- Arnaldo

 \ /
  Last update: 2021-12-03 14:44    [W:0.094 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site