Skip to content

Possibly use a known profiling format for timings ? #43804

Closed
@lqd

Description

@lqd

With the new -Z trans-time-graph from #43506, soon to be joined by -Z profile-queries from #43345, and their impact on time-passes, would it make sense to output such timings in an existing profiling format instead of ad-hoc ones ?

A couple formats come to mind:

  • the one used by the Gecko profiler and its frontend
  • or Chrome's tracing format + frontend

They both seem to support multiple processes/threads, and the frontend tools are pretty powerful in filtering, sorting, etc.

Chrome's format looks easy to generate, and Aras P had a couple good articles about how they use it at Unity:

Gecko's and perf-html looks more complex/complete and has a seriously impressive polished UI (but might have some Firefox related concepts, ie JS or C++ contexts one can see in the UI). To see how it looks, here's an example of a big trace from gecko+stylo (I think, I saw this in the servo irc chan)

I think both frontends could be used on perf.rlo. I know Chrome's trace viewer can be compiled to a single (huge) html file one can use outside of Chrome to trace json timing files. And I think perf-html is client-side only as well.

(As an aside, could it also be interesting to output to such formats with a more fine-grained profiling data successor to time-passes — and not just for the 2 HTML outputs mentioned above ? I think this would be extremely useful to see and track hotspots on perf.rlo, which IIRC will probably switch to only showing totals without passes data)

cc @michaelwoerister, @eddyb, @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions