Diagnostic command fixes
karen.kinnear at oracle.com
Tue Feb 14 10:51:46 PST 2012
Just fix the copyright then.
responses inline ...
On Feb 14, 2012, at 1:27 PM, Frederic Parain wrote:
> On 14/02/2012 18:55, Karen Kinnear wrote:
>> Thank you Nils :-)
>> I had a question on the DCmdArgument<NanoTimeArgument> - I think I am
>> not reading
>> this correctly:
>> Couple of questions please:
>> I haven't seen the specification at this level of detail, but I thought
>> that if
>> you entered a digit value with no units that you got ns by default -
>> i.e. we need to
>> be able to parse units, but they are not required.
> This is code matches the behavior of the JRockit parser, if the
> specification has changed to consider digit value with no units as
> ns, then we can remove this logic. Personally, I'd prefer this new
This was my misunderstanding then. I also looked to see how hotspot
handles time value defaults, since my goal is to have dcmd parsing be
a logical extension of how hotspot handles things today.
Right now the command-line arguments do NOT have a default unit -
in fact many of the names explicitly include Millis.
So I would leave this alone as requiring units.
>> 2) What does this comment mean:
>> // WARNING StringArrayArgument can only be used as an option, it cannot be
>> // used as an argument with the DCmdParser
>> ... DCmdArgument<StringArrayArgument*>
>> -- what can't you do with it more specifically please? Do you mean you can't
>> pass it as an argument to parse_value?
> With the DCmdParser, "options" are defined with a "key=value" syntax and
> can be specified in any order. "arguments" don't have key, just a value
> and are identified by their position on the command line (options are
> ignored when positions are computed). There's actually no way to specify
> that an argument can be passed at multiple positions.
> StringArrayArgument is an argument type defined to accept multiple
> strings. As it is not possible to specify the multiple position for
> an argument, StringArrayArgument can only used as an "option", each
> string being preceded by the same key.
Thank you - I remember when you explained this to me when you
first added the distinction between options and arguments.
> Frederic Parain - Oracle
> Grenoble Engineering Center - France
> Phone: +33 4 76 18 81 17
> Email: Frederic.Parain at oracle.com
More information about the hotspot-runtime-dev