UL: logging before initialization?
Thomas Stüfe
thomas.stuefe at gmail.com
Thu Mar 10 16:25:04 UTC 2016
Hi all,
I wanted to use UL to log some information from early OS initialization but
found that we initialize logging quite late. It is initialized way after
os::init() runs.
I also see that warnings and errors are printed unconditionally even
before, only log calls for levels <= info are quietly swallowed.
Would there be a way to move UL initialization and parsing of -Xlog
Arguments to an earlier point to be able to use logging in os::init()?
Or, if that is not possible, would there be a way to delay printing of
early logging calls to after logging initialization and then print them out
in one go? I think this would be not trivial though: one would have to
collect all logging output in memory somewhere - because we do not yet know
which tags are switched on - and then, once -Xlog is parsed, filter it by
tag before printing it out.
What do you think, would that be a worthwhile change? I am a bit unhappy
about how logging calls are quietly swallowed, so for any code which runs
at VM initialization, one always has to keep in mind that UL may not yet be
initialized.
Kind Regards, Thomas
More information about the hotspot-runtime-dev
mailing list