jonhoo / inferno

A Rust port of FlameGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multicore collapsing

jonhoo opened this issue · comments

In theory we should be able to slice the input to the collapse scripts into multiple pieces, collapse each piece independently (on different cores) and then merge the results. That would likely lead to significant speedups on multi-core machines, and would likely be worth investigating.

After a long time away from Rust (and programming in general), I looked into this a bit today.

I was able to double throughput in the benchmarks for collapse-perf on my machine (from approx. 160 MiB /s to approx. 315 MiB/s) by tweaking the architecture to allow for multiple threads.

For some reason I can't pass the collapse_perf_cycles_instructions tests, though; so will need to polish what I have over the next couple of days and figure out why that set of tests is failing (while all the others seem fine).

Here's a link to the branch I've been working from: multicore-collapsing branch

This is probably a better link to the diff for those who are curious: master...bcmyers:multicore-collapsing

This has now landed in #128!