Open dalon-work opened 4 years ago
Are you compiling with -g
? Anyway, a repro case would be useful - thanks!
I am compiling with -g
. In fact, I was really confused when I wasn't getting any useful output at first, then realized I'd forgotten that step.
A repro case won't be easy, as this is proprietary code I'm working with. We do rely heavily on inlining to provide good performance. I wonder if the debug info is messed up somehow because of it?
I'll see if I can create a minimal working example.
Speaking of which, coz is also picking up on an inlined operator -= function as needing to be sped up, but this function is completely inlined. My guess is the dwarf information is still listing this as a function on the lines where it is used, but that isn't all that helpful. Do you know if there is a way to fix this issue?
I'm really impressed by this tool. Thank you!
Dalon
Coz can end up pointing out a line as important for performance that can't obviously be sped up at a micro-level; it doesn't know how easy it is to optimize code, just where code should be optimized. The paper has a number of examples like this that we encountered (and both Charlie & I have talked about this in various talks), which may be helpful at least as an illustration of how you can approach performance optimization in such cases.
I look forward to the minimal working example!
I am able to reproduce a similar issue with Rust. I have a few inlined functions in the files that have reports at line 0; however one in particular, moves.rs
, has only one inlined function never used anywhere else in the code. I do not have a minimal example to show you there, but the source code for the project that I have been profiling with coz
is open-source:
Code: https://github.com/adri326/5dchess-tools (the coz
branch has the coz library imported: https://github.com/adri326/5dchess-tools/tree/coz); it is a set of tree search algorithms for the game "5D Chess with Multiverse Timetravel"
Profile: After ~6h of running an iterative deepening depth-first search over and over, coz
came up with the following chart: profile.coz.zip
Point of interest: the inlined function in moves.rs is never used, yet coz
has an entry for moves.rs:0
Note that I did take care to add debug = 1
to my Cargo.toml
and that coz seemed to be happy with it.
I am very new to this amazing tool; these results are a little underwhelming, although they do give me a few insights on what I should optimize next.
I've probably done something wrong, but when I look at the profiles, some of the profiles list a filename.cc:0 as the title. Do you know how to address this? It's not very helpful :-)
Thanks.
Dalon