Skip to content

Possible improvements to --time #928

Open
@davidlattimore

Description

@davidlattimore

These could be two separate issues, but probably shouldn't be done at the same time by different people, so I'll file this as one issue. They don't require deep knowledge of linkers, but they are a bit of work - especially the second one.

Extra counters

Sometimes when checking the performance of a change, we notice a change in measurements other than elapsed wall time. In particular cycle count, instruction count, cache misses or branch misses. We can measure these for the whole runtime of the linker, but it'd be useful to be able to break these down for individual steps in the linker. I think it should be possible to read these counters from somewhere in /proc. Looking at poop to see how it does it is probably a good start.

Performance diff

It'd be nice to be able to see which phases have changed the most for some particular metric. If we've got two different builds of the linker that we want to compare, we could run each several times, possibly alternating between the builds for increased stability. Each run could write out all the performance metrics to a file (possibly JSON but it doesn't have to be). We'd then need a tool to take all those files and produce a summary of where things have changed the most. My instinct is that for each stage, taking the minimum over all runs is likely to be the most stable, but median would be another possible option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions