Open sfriedmapixar opened 8 years ago
I should also mention that this trace was from the 1.6.8 cut.
Ooh, I can believe that we forgot to count a couple things. I'll get on that, should be easy.
LLVM's internal data structures are going to be very hard to account for, but we should be able to get all the OSL-side stuff.
Are you only concerned that we aren't counting properly, or are you also suspecting that we may be leaking or allocating more than we need?
So far it just seems like not counting -- it doesn't look like any leaking, but I haven't dug in deep enough to see if there are any good places to trim fat.
Using valgrind's massif profiling tool, I've found several large blocks of memory that aren't accounted for, where the unaccounted memory is dwarfing the accounted. The biggest is that the ShadingContext memory isn't accounted for, including all the constant pools. The vectors that point to the values for parameters and such are accounted in things like paramvals, but the actual values in the pools that those point to aren't accounted. The shader objects and their execution space also aren't accounted for. The final big source of missing memory is stuff that LLVM is using, but I can understand not counting that as it's much harder.
Here's what OSL reports.
And here is a cleaned up version of the valgrind info for things I'm pretty sure aren't counted anywhere.