|Anonymous | Login | Signup for a new account||2018-04-22 12:55 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007514||OCaml||compiler driver||public||2017-04-04 18:25||2017-04-14 17:01|
|Target Version||Fixed in Version|
|Summary||0007514: -dtimings should also report memory consumption|
|Description||Some of our users are investigating compilation issues where a blowup happen in memory usage of the compiler, rather than time. The -dtimings option is useful to help users extract information on the problematic pass for people trying to fix time blowup issues, having memory consumption information would help similarly debug memory issues.|
After briefly looking at the Gc module documentation ( https://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html [^] ), I believe that the following information would be useful and could be always reported for each -dtimings output line:
- the live_words value at the times the timer was started and stopped
- the maximum top_heap_words value reached while the timer was active
One could consider having a more verbose output available, enabled by an extra flags (-dtimings-gc-stats?), which would collect (Gc.print_stat) calls on start/stop for each timer, but that can be left for later.
|Additional Information||(The reason why we want those measurements to be convenient for users to perform is that they have their problematic codebase at hand, and it may be difficult for them to extract an easy-to-build repro-case, and it may be difficult for compiler developers to build their codebase.)|
|Tags||No tags attached.|
In an email, Sébastien Hinderer wrote:
> Well, if -dtimings starts to report memory-related infomration,
> then I'd say that "timings" stops to be an appropriate name. So
> since -dtimings is, AFAIK, not part of any official release
> yet, perhaps it is still a good moment to rename it to
> something more generic like -dstatistics? Or, if that's not
> desired, perhaps memory-related info would diserve its
> own -dmemory or whatever option?
I think that -dperfstats or something may indeed be a good idea. I would rather not have two separate -dtimings and -dmemory option, because I think it makes sense to have a single combined hierarchical printing of pass-per-pass information than two separate things being displayed. (But having more advanced options to ask for more specialized/verbose outputs would be reasonable.)
|In fact I re-checked: -dtimings was released in 4.03 (it is GPR#306, although it would be easier to find if the Changes entry explicitly mentioned the option name), so it's harder to change the name now.|
I think it is ok to change the name of the option. It is a tool for compiler development, if anybody relied on it, they deserve to get their build broken. Especially given that the printing format changed, it would be better to break it in a clearly visible way.
As for the reported information, I think that the most important one is minor-words and major-words. Live words is too unreliable to if one does not trigger a complete collection (and we certainly don't want to do that by default).
|2017-04-04 18:25||gasche||New Issue|
|2017-04-04 18:29||gasche||Additional Information Updated||View Revisions|
|2017-04-04 20:53||gasche||Note Added: 0017718|
|2017-04-04 21:29||gasche||Note Added: 0017719|
|2017-04-05 14:57||chambart||Note Added: 0017721|
|2017-04-14 17:01||doligez||Status||new => acknowledged|
|Copyright © 2000 - 2011 MantisBT Group|