RFR: 8141211: Convert TraceExceptions to Unified Logging

Daniel D. Daugherty daniel.daugherty at oracle.com
Tue Dec 8 19:56:38 UTC 2015


If we have existing code that does similar things and Parfait doesn't
complain, then I'm good with it as it is.

Dan


On 12/8/15 12:53 PM, Rachel Protacio wrote:
> It looks like the existing lookup_special_flag() does the same thing 
> with regular strcmp(). Moreover, my code only compares constant 
> strings, so if I were to try to use strncmp or strncpy by passing in 
> strlen(<the hardcoded string>), it would be redundant to the 
> implementation of strcmp and strcpy. So I'll leave it as is?
> Thanks,
> Rachel
>
> On 12/8/2015 2:02 PM, Daniel D. Daugherty wrote:
>> The use of strcmp() and strcpy() caught my eye. I suspect that
>> Parfait will not be happy about using the non-length versions
>> of these functions.
>>
>> Dan
>>
>> On 12/8/15 11:40 AM, Rachel Protacio wrote:
>>> Oh actually that was my fault! I cleaned up the code a bit and left 
>>> that sitting around. Thanks for catching that - I'll remove it.
>>> Rachel
>>>
>>> On 12/8/2015 1:35 PM, harold seigel wrote:
>>>> Hi Max,
>>>>
>>>> Is "int j = 0;" needed in lookup_logging_aliases() ?
>>>>
>>>> *+ bool Arguments::lookup_logging_aliases(const char* arg, char* 
>>>> buffer) {*
>>>> *+ int j = 0;*
>>>> *+ for (size_t i = 0; aliased_jvm_logging_flags[i].alias_name != 
>>>> NULL; i++) {*
>>>> *+ const AliasedFlag& flag_status = aliased_jvm_logging_flags[i];*
>>>> *+ if (strcmp(flag_status.alias_name, arg) == 0) {*
>>>> *+ strcpy(buffer, flag_status.real_name);*
>>>> *+ return true;*
>>>> *+ }*
>>>> *+ }*
>>>> *+ return false;*
>>>> *+ } *
>>>>
>>>> Thanks, Harold
>>>>
>>>>
>>>>
>>>> On 12/8/2015 10:42 AM, Rachel Protacio wrote:
>>>>> Hello,
>>>>>
>>>>> Please review my conversion of -XX:+TraceExceptions to 
>>>>> -Xlog:exceptions=info. The existing (product) flag is aliased to 
>>>>> the logging flag at the info level.
>>>>>
>>>>> If you have any questions on the alias table (in the arguments.cpp 
>>>>> and .hpp files), Max will chime in as he is the one who 
>>>>> implemented that portion.
>>>>>
>>>>> Open webrev: http://cr.openjdk.java.net/~rprotacio/8141211/
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8141211
>>>>>
>>>>> Testing: jtreg, JPRT, jck vm tests, refworkload performance tests, 
>>>>> rbt quick & non-colo tests
>>>>>
>>>>> Thank you!
>>>>> Rachel
>>>>
>>>
>>>
>>
>



More information about the hotspot-runtime-dev mailing list