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]
Message-ID: <20200717154421.4e3aee99@oasis.local.home>
Date:   Fri, 17 Jul 2020 15:44:21 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Changbin Du <changbin.du@...il.com>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 03/17] perf ftrace: add option -t/--tid to filter by
 thread id

On Fri, 17 Jul 2020 16:34:55 -0300
Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

Thinking a bit more, I have to ask. Does perf use the kernel when
getting all the children of an existing task, or is that done only in
userspace?

That is, is there a perf syscall that says "start tracing this task and
all its existing children"?

Or is it done by perf user space looking at the /proc filesystem (like
ps does).

I'm asking because if perf has a syscall to do that, then I probably
should add a way to do that with ftrace as well. But that's really
trivial, because all it would take is grabbing the task_list lock and
iterating over all the children. Getting new children was the
non-trivial part, which was what I focused on (with the fork options).

If perf does it with proc files, then we don't need to change anything
as that could still be used with ftrace.

> Changbin, you can take from here :-)
> 
> And to reiterate, for me the value of 'perf ftrace' is to allow people
> used to perf to be able to switch to ftrace quickly, just changing:
> 
>    perf record/top/stat/trace/report/script/etc --pid 1234
> 
> by:
> 
>    perf ftrace --pid 1234
> 
> And have the tracefs ftrace knobs set up to have what is expected in
> terms of targets to trace as the other perf tools.
> 
> And not just --pid and --tid, but --cgroup, --cpu, etc.
> 
> i.e., 'perf ftrace' being _a_ front-end aplication to ftrace.
> 
> :-)


I have no problem with this, and I'm quite excited about it. I would
like it to use libtracefs, as it looks to be exactly what we are
working on. And this is now a high priority to get out, and I don't
expect another year (or two) in doing so ;-)

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ