Listing of source locations for cost centres in `profile.summary`
closes #2337
Adds source information output to the file profile.summary.
The source section is separated with a header, the start looks like this:
entire file: summary.txt
This increases the size of summary file by a lot. In my example, using this program I wrote for Advent of Code Day 09, which is 80 lines in length. This patch increased the size of the summary file by more than a factor of two!
Please consider the above implementation a proposal. I would be happy to discuss and/or experiment with different formats before settling on anything, if anyone has different ideas of what it should look like.
By the way, how do I use ormolu? It seems to produce something that resembles a git patch format. But I am failing to apply it correctly, so far.
ormolu -i FILE reformats the given file in place. See also STYLE.md for how to automatically run the formatter on all source files.
This looks pretty promising, although it's too late in the day for me to read code. I'm OK with making the summary file larger, but we could also put the location information in a different file. What do you think would be best?
This looks pretty promising, although it's too late in the day for me to read code. I'm OK with making the summary file larger, but we could also put the location information in a different file. What do you think would be best?
I would prefer having it in the same file, but I might try again with some of your benchmarks, something bigger. Sharing the file would help manual inspection a lot. In my workflow, I simply search for the word under my cursor after identifying an interesting name and it jumps to the next occurence, which is the source listing.
Do not worry about the failing tests; they are the GPU cluster being flaky.
I agree with keeping everything in the same summary file for now. Long-term, I hope we can include much more information per cost centre (grid size etc), and then we might even want a file per cost centre, but that is not meaningful today.
I hadn't even noticed that your example is for the multicore backend. Cool that it works too.
I hadn't even noticed that your example is for the multicore backend. Cool that it works too.
Very cool that futhark supports so many targets. Multicore is the only one I can (currently) run that produces profiling information.
Final thing, could you add an entry to the CHANGELOG under Added? Feel free to credit yourself under whatever name you prefer.