RFR 8234697: Generate sun.security.util.math.intpoly classes during build

Weijun Wang weijun.wang at oracle.com
Thu Nov 28 01:37:19 UTC 2019



> On Nov 27, 2019, at 9:44 PM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
> 
> On 2019-11-26 16:39, Weijun Wang wrote:
>> 
>>> On Nov 27, 2019, at 12:14 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>>> 
>>> On 2019-11-25 16:42, Weijun Wang wrote:
>>>>> On Nov 26, 2019, at 12:36 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>>>>> 
>>>>> Build change looks good.
>>>> Thanks.
>>>> 
>>>> One question: I see the output to stdout from FieldGen.java shown in build. Is it possible to hide it but still store the output in the log file?
>>> No, we are not able to support different log levels to the main log file and console. What you can do is add $(LOG_INFO) or $(LOG_DEBUG) last on the command line. That macro resolves to "> /dev/null" when we don't want the output printed. How much output and how interesting is it to see? You can also wrap the whole command in a call to ExecuteWithLog to have it being logged to an individual file, which gets repeated at the end of the build in case it fails.
>>> 
>>> I think you should be able to combine the two with something like this:
>>> 
>>> $(call ExecuteWithLog, ...) $(LOG_DEBUG)
>>> 
>>> That should print everything to the special log file as well as letting it pass to stdout when LOG=debug, but I haven't tested it.
>> The log shows on the console with LOG=debug but whatever LOG level I choose, the output is always collected in the log file. This is exactly what I am looking for.
> 
> Note that it will not show up in build.log, but in a special log file just for this command,

Yes, that's what I meant.

> along with a .cmdline file for this command. The location of these files need to be provided to ExecuteWithLog in the first argument, as a basename for the files. In this case it would make sense to store them next to the touch file of the rule.

Yes, that's what I copied from CLDR_GEN_DONE, the argument, and the touch. It does not have "$(LOG_DEBUG)" at the end of the call but it has no output anyway. The special log file is empty.

Thanks,
Max

> 
> /Erik
> 
>> Thanks,
>> Max
>> 
>>> /Erik
>>> 
>>>> I copied everything from CLDR_GEN_DONE but that one does not log anything actually.
>>>> 
>>>> I can remove all output too, not really important.
>>>> 
>>>> Thanks,
>>>> Max
>>>> 
>>>>> /Erik
>>>>> 
>>>>> On 2019-11-22 18:59, Weijun Wang wrote:
>>>>>> Please review the change at
>>>>>> 
>>>>>>    http://cr.openjdk.java.net/~weijun/8234697/webrev.00/
>>>>>> 
>>>>>> The new lines in Gensrc-java.base.gmk mimics the one for CLDR_GEN_DONE at the beginning of the same file.
>>>>>> 
>>>>>> I changed the BigInteger parameter in the FieldParams constructor (the one not reading terms) to its HEX string form and is now using the inverse. This makes sure the strings appeared here are exactly the same as the one used in CurveDB.java. The generated source code is identical to before.
>>>>>> 
>>>>>> Other smaller changes made to FieldGen.jsh:
>>>>>> 
>>>>>> 1. Package name
>>>>>> 2. No more jshell, but now Java
>>>>>> 3. Input/output paths as args for main()
>>>>>> 4. White spaces, wrapping and indentation
>>>>>> 
>>>>>> Thanks,
>>>>>> Max




More information about the build-dev mailing list