[cfe-dev] Some DTrace probes for measuring per-file time.

Alexei Starovoitov alexei.starovoitov at gmail.com
Tue Apr 7 18:45:15 PDT 2015


On Mon, Apr 6, 2015 at 5:39 PM, Sean Silva <chisophugis at gmail.com> wrote:
> Attached you'll fine a patch for clang which adds some USDT probes, along
> with a DTrace script for measuring total time spent in each header file
> using those probes (there are also "phony" files which track a handful of
> other things). This script measures time on CPU (DTrace's vtimestamp), so
> time blocked on IO (which is hidden by the parallelism of the build) does
> not come into play.

thanks for the dtrace script. It's an important use case for our
upcoming bpf+tracing infrastructure in the linux kernel.
Looks like we're still missing vtimestamp equivalent (which should
be easy to add) and strings that are not well supported yet.
The rest of required features to make your script working is there.

linux also doesn't have usdt support yet, though few patches
were proposed. Looks like in this case if clang is compiled with
debug info, regular uprobes will work just fine.
I'm not worried about locking problem. I think uprobe
architecture doesn't have it, but will double check.
Thanks for all the pointers!



More information about the cfe-dev mailing list