I haven't read the entire discussion yet but here'S what I think.
There's stats about the heap and there's stats about the gc. Memory dump should be collecting the former so I think option 2 should suffice. By doing a gc witout sweep we are scanning the heap.for information. I also think freelist stats don't have to be right after a sweep to be useful.
If it is the case that all the stats can be taken after the marking, then I agree it's better to force a GC at each memory dump.
This means that we are not implementing option a.
Please note that the frequency of the dump will not depend on the number of GCs. If there's an internal where there were multiple GCs happen, then these stats would be lost. This can be dealt with in future.
For now, taking stats after collectGarbageWithoutSweeping sounds good. Thanks for the help Kentaro.
Thanks
Siddhartha.
Please note that the frequency of the dump will not depend on the number of GCs. If there's an internal where there were multiple GCs happen, then these stats would be lost. This can be dealt with in future.
For now, taking stats after collectGarbageWithoutSweeping sounds good. Thanks for the help Kentaro.
I think (a) is more important to understand the actual memory usage of a renderer process. (b) is important to diagnose how helpful Oilpan's GC is to change the memory usage. We might want to make (a) enabled by default and (b) optional.
> By doing a gc witout sweep we are scanning the heap.for information. I also think freelist stats don't >have to be right after a sweep to be useful.
Keishi: so, let me check if my understanding is correct here. Does this mean that if we dump freelists during the forced-non-sweeping-GC that is going to produce still relevant data and is worth getting started with that as well?