Stream: t-compiler/wg-self-profile

Topic: description of the data format


nikomatsakis (May 07 2019 at 19:56, on Zulip):

@Wesley Wiser is there any where (either code or docs) to describe the format of the events? I'm curious whether I could "port" my perf-focus tool to this setup

Wesley Wiser (May 07 2019 at 20:03, on Zulip):

Are you looking for the raw on-disk format or the internal api used by the tools?

Wesley Wiser (May 07 2019 at 20:04, on Zulip):

What I'd recommend is is using using measureme as a dependency which is how the tools we have currently work

Wesley Wiser (May 07 2019 at 20:05, on Zulip):

The main thing you want is measureme::ProfilingData::iter()

Wesley Wiser (May 07 2019 at 20:06, on Zulip):

There's a very basic example of using it here: https://github.com/rust-lang/measureme/blob/master/mmview/src/main.rs

Wesley Wiser (May 07 2019 at 20:08, on Zulip):

What kind of input does your perf-focus tool need?

nikomatsakis (May 07 2019 at 20:09, on Zulip):

well the existing tool expects a stream of samples

nikomatsakis (May 07 2019 at 20:09, on Zulip):

but I would probably just rewrite it

Wesley Wiser (May 07 2019 at 20:09, on Zulip):

There's also this tool https://github.com/rust-lang/measureme/tree/master/stack_collapse

nikomatsakis (May 07 2019 at 20:09, on Zulip):

i'll take a look at measureme

Wesley Wiser (May 07 2019 at 20:09, on Zulip):

Which outputs a file of "stack" samples

Wesley Wiser (May 07 2019 at 20:10, on Zulip):

That might be a good starting point for your tool

Wesley Wiser (May 07 2019 at 20:10, on Zulip):

Or perhaps you could reuse the output as is

nikomatsakis (May 07 2019 at 20:11, on Zulip):

ah, perhaps

nikomatsakis (May 07 2019 at 20:11, on Zulip):

still, I wouldn't mind rewriting it

Wesley Wiser (May 07 2019 at 20:12, on Zulip):

You're probably going to end up writing something similar to this function https://github.com/rust-lang/measureme/blob/e0d7945a5280b363a09a068c26c6c5bf21247ad2/stack_collapse/src/stack_collapse.rs#L6

Wesley Wiser (May 07 2019 at 20:12, on Zulip):

So it's a starting point

nikomatsakis (May 07 2019 at 20:14, on Zulip):

this is really cool y'all :)

Wesley Wiser (May 07 2019 at 20:14, on Zulip):

Let us know if you need anything

nikomatsakis (May 07 2019 at 20:16, on Zulip):

One more question @Wesley Wiser -- is it easy to integrate this into the perf.rust-lang.org benchmarks? i.e., those have some kind of options for different profiling modes, have we added self-profiler yet?

Wesley Wiser (May 07 2019 at 20:17, on Zulip):

That's the next thing we're working on

Wesley Wiser (May 07 2019 at 20:17, on Zulip):

We have a meeting tomorrow morning to talk about that and our next steps

nikomatsakis (May 07 2019 at 20:17, on Zulip):

Ah, ok, great.

Wesley Wiser (May 07 2019 at 20:17, on Zulip):

The main question is can we always turn this on for perf.rlo or do we need a special mode

nikomatsakis (May 07 2019 at 20:18, on Zulip):

yeah

nikomatsakis (May 07 2019 at 20:19, on Zulip):

see my other topic :)

nikomatsakis (May 07 2019 at 20:19, on Zulip):

so in theory I can drag-n-drop these files onto the google chrome profiler or something?

Wesley Wiser (May 07 2019 at 20:20, on Zulip):

https://github.com/rust-lang/measureme/tree/master/crox#crox

Wesley Wiser (May 07 2019 at 20:23, on Zulip):

This website also claims to support the chrome format if you don't want to launch chrome :slight_smile: https://www.speedscope.app/

Last update: Nov 15 2019 at 21:05UTC