RFC: "in kb" typo in UL JEP?
Aleksey Shipilev
shade at redhat.com
Wed Oct 17 15:43:40 UTC 2018
Okay, anyone from Oracle wants to confirm? Changing the text in 5... 4...
-Aleksey
On 10/17/2018 09:32 AM, Thomas Stüfe wrote:
> This seems very reasonable. I noticed this myself in the past.
>
> ..Thomas
> On Tue, Oct 16, 2018 at 5:25 PM Aleksey Shipilev <shade at redhat.com> wrote:
>>
>> Hi,
>>
>> Somebody asked on #openjdk @ OFTC this:
>>
>> (05:08:54 PM) tpunder: Anybody know anything about the JEP 158 (Unified JVM Logging) "filesize"
>> argument? JEP 158 says that value is in KB and uses "filesize=1024" as an example for 1MB gc log
>> file sizes. However on both Linux and OS X "filesize=1024" gives me gc log files that are 1024 bytes
>> in length.
>> (05:11:46 PM) shade: I think JEP grammar is incorrect, and UL accepts the usual suffixes (K, M, G),
>> and no-suffix is bytes
>> (05:13:41 PM) Maldivia_: tpunder: java -Xlog:help gives this as an example:
>> -Xlog:gc=trace:file=gctrace.txt:uptimemillis,pids:filecount=5,filesize=1m
>> (05:14:30 PM) tpunder: Yes, filesize=1M does work. Just wondering why the JEP says it should be KB.
>> (05:15:42 PM) shade: it think it was drafted before implementation and tests
>> (05:15:56 PM) shade: so, mistake (or rather, optimistic typo) in grammar comment
>> (05:16:01 PM) tpunder: I specifically ran into a problem upgrading Apache Solr to Java 11 because
>> the launch scripts were setup to use filesize=20000 (they meant wanted 20M) based on the JEP
>> documentation. Manually patching the launch script to filesize=20M works.
>>
>> Indeed, JEP page (http://openjdk.java.net/jeps/158) says:
>>
>> output-option := filecount=<file count>
>> filesize=<file size in kb>
>> parameter=value
>>
>> ...while the parsing code does it via the usual Arguments::atojulong, which would treat non-suffix
>> space as bytes:
>>
>> logFileOutput.cpp:
>>
>> } else if (strcmp(FileSizeOptionKey, key) == 0) {
>> julong value;
>> success = Arguments::atojulong(value_str, &value);
>>
>>
>> May I drop "in kb" from the JEP text? Asking here, because all people responsible for that JEP
>> apparently left. I think I have enough permissions to edit the underlying bug
>> (https://bugs.openjdk.java.net/browse/JDK-8046148), so that changes propagate automatically, but I
>> would like someone to confirm this change is the right thing to do.
>>
>> -Aleksey
>>
More information about the hotspot-dev
mailing list