This is a simple CPU profiler for WebRender. It can write out the resutls in Trace Event Format.
Read more about the usage and associated tools at https://aras-p.info/blog/2017/01/23/Chrome-Tracing-as-Profiler-Frontend/
Call register_thread_with_profiler
for each thread.
Call write_profile
when you need to save the results.
With Chrome: go to chrome://tracing
and click on "Load".
Standalone: check out and compile catapult, then call trace2html
.