gclog improvements

Rainer Jung rainer.jung at kippdata.de
Tue Oct 14 21:22:04 UTC 2008

Tony Printezis schrieb:
> Rainer,
> Rainer Jung wrote:
>> Tony Printezis schrieb:   
>>> We don't have any immediate plans for doing this. Regarding the log file
>>> getting overwritten, typically customers launch the JVM from a script
>>> and it's easy to create a unique GC log file name from a script (append
>>> the start time, pid, or something like that). So, that's an easy issue
>>> to solve...
>> Yes, but I do now see a lot of customers running their midrange server
>> apps on Windows.
> I'm _so_ sorry. :-)
>>  Those are of course services started by Java service
>> wrappers, which are not themselves easily scriptable. Especially
>> automatic restarts triggered by built-in watchdogs do not have any
>> scripting mechanism.
> I'm happy to say I don't know much about the intricacies of scripting
> under Windows.

You could make it work platform independant by supporting formatting
characters for pid (at least). There is already code for it in
src/share/vm/utilities/ostream.cpp: make_log_name() replaces the first
star in a string with the pid. It could be easily included in
ostream_init_log() in the same file. Of course people already using a
'*' in their log file names would experience incompatible behaviour, but
that character is not very common in file names - even on Windows ;)

More future proof (in the sense of extensible) would be to use %X for
some letter X.



More information about the hotspot-gc-dev mailing list