RFR: 8151600: Syntax for -Xlog complicates shell scripts

Ioi Lam ioi.lam at oracle.com
Wed Aug 31 10:22:47 UTC 2016



On 8/31/16 2:07 AM, Claes Redestad wrote:
> Hi,
>
> On 2016-08-30 21:22, Robbin Ehn wrote:
>> Hi Coleen, thanks for having a look at this,
>>
>> On 08/30/2016 04:48 PM, Coleen Phillimore wrote:
>>>
>>> Honestly, I think I can live with "*" rather than "+" and definitely
>>> better than "%" (the latter seems a bit meaningless).
>>
>> I'm not removing asterisk, only adding a more shell friendly wildcard.
>
> Too bad! I think asterisk implies something different intuitively than
> what it actually does.
>
> Example: -Xlog:class* means exactly "the union of all tag sets
> containing the tag class", say: class, class+load, class+init
>
> I had to read the JEP long and hard to realize it doesn't mean, say,
> partial matches or similar expressions.
>
> IMHO we would more succinctly express the intent with a new meta-tag
> any:
>
> -Xlog:class+any
> -Xlog:gc+any
>
> Optionally leave * as an alias for +any, since it's likely entrenched
> already, but if there are compatibility issues with including * as
> a control character in command lines maybe now is the (last possible)
> time to consider dropping this?
>

I vote for dropping * in favor of +any.

Let's not make the same mistake as MS in picking the "\" for directory 
sepatator :-). Yes, it can be escaped, but everybody hates you.

- Ioi
> /Claes
>
>>
>> E.g.
>> rbt --jvm-args "-Xlog:gc*"
>> should always have the intended effect regardless test type.
>>
>> /Robbin
>>
>>>
>>> Coleen
>>>
>>> On 8/30/16 10:04 AM, Robbin Ehn wrote:
>>>> Hi Dmitry,
>>>>
>>>> On 08/30/2016 03:56 PM, Dmitry Samersoff wrote:
>>>>> Robbin,
>>>>>
>>>>> As far as I understand + is used as a delimiter
>>>>> e.g. -Xlog:class+load
>>>>>
>>>>> It might be better to use % for wildcard.
>>>>
>>>> Yes it might, I thought trailing plus was best.
>>>>
>>>> E.g.
>>>> "-Xlog:class+load*" would in this case be "-Xlog:class+load+"
>>>>
>>>> But if people prefer e.g. "-Xlog:class+load%" then we can go with 
>>>> that.
>>>>
>>>> Thanks for input!
>>>>
>>>> /Robbin
>>>>
>>>>>
>>>>> -Dmitry
>>>>>
>>>>> On 2016-08-30 15:29, Robbin Ehn wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> The current syntax for -Xlog uses '*' for wildcard matching of tags.
>>>>>> In shell scripts where * is unintended expanded causes problems.
>>>>>> This patch adds the possibility to use trailing '+' instead.
>>>>>>
>>>>>> E.g.
>>>>>> "-Xlog:gc+" is thus equivalent to "-Xlog:gc*"
>>>>>>
>>>>>> Tested with modified gtest test.
>>>>>>
>>>>>> Webrev: http://cr.openjdk.java.net/~rehn/8151600/hotspot.01/webrev/
>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8151600
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> /Robbin
>>>>>
>>>>>
>>>



More information about the hotspot-dev mailing list