On 11/19/18 4:52 PM, Qing Zhao wrote:
> 
>> On Nov 19, 2018, at 2:11 AM, Martin Liška <mli...@suse.cz 
>> <mailto:mli...@suse.cz>> wrote:
>>
>> On 11/16/18 5:04 PM, Qing Zhao wrote:
>>>
>>>> On Nov 16, 2018, at 9:26 AM, Martin Liška <mli...@suse.cz 
>>>> <mailto:mli...@suse.cz> <mailto:mli...@suse.cz>> wrote:
>>>>
>>>> On 11/16/18 2:36 AM, Qing Zhao wrote:
>>>>> Hi,
>>>>>
>>>>> this is the new version of the patch.
>>>>>
>>>>> I have bootstrapped it on both aarch64 and x86,  no regression.
>>>>>
>>>>> please take a look.
>>>>
>>>> Thanks for the updated version of the patch.
>>>> I have last small nits I see:
>>>>
>>>> - gcc/common.opt: when running --help=common, the line is too long
>>>
>>> the following is the output for ./gcc —help=common:
>>>   -flive-patching             Same as -flive-patching=.  Use the latter 
>>> option
>>>                               instead.
>>>   -flive-patching=[inline-only-static|inline-clone] Control IPA 
>>> optimizations
>>>                               to provide a safe compilation for 
>>> live-patching.
>>>                               At the same time, provides multiple-level 
>>> control
>>>                               on the enabled IPA optimizations.
>>>  
>>> Not sure what’s you mean of “the line is too long”? could you please 
>>> specify the above which line?
>>
>> You are probably using a console that has quite small column limit, so that 
>> you see it automatically
>> wrapped.
>>
>> I see:
>>
>> ...
>>  -flimit-function-alignment  This option lacks documentation.
>>  -flive-patching             Same as -flive-patching=.  Use the latter 
>> option instead.
>>  -flive-patching=[inline-only-static|inline-clone] Control IPA optimizations 
>> to provide a safe compilation for live-patching. At the same time, provides 
>> multiple-level control on the enabled IPA optimizations.
>>
>> ^--- the long line
> 
> Okay, I see.
> 
> From the documentation: 
> https://gcc.gnu.org/onlinedocs/gcc-4.3.4/gccint/Option-file-format.html#Option-file-format
> 
> "
> An option definition record. �These records have the following fields:
> • the name of the option, with the leading “-” removed
> • a space-separated list of option properties (see Option properties)
> • the help text to use for --help (omitted if the second field contains the 
> Undocumented property).
> ….
> The help text is automatically line-wrapped before being displayed. Normally 
> the name of the option is printed on the left-hand side of the output and the 
> help text is printed on the right. However, if the help text contains a tab 
> character, the text to the left of the tab is used instead of the option's 
> name and the text to the right of the tab forms the help text. This allows 
> you to elaborate on what type of argument the option takes.       
> “
> 
> Looks like that by design, the help text will be automatically line-wrapped 
> before being displayed to fit on the current console. So, I think that the 
> long line should be fine? (the only way to
> make the help text shorter line is to cut the help text). 

Hi.

I see, then it's all fine.

> 
> I also see some other options have even longer help text:
> 
>   -fcf-protection=[full|branch|return|none] Instrument functions with checks 
> to verify jump/call/return control-flow transfer instructions have valid 
> targets.
>   -fisolate-erroneous-paths-attribute Detect paths that trigger erroneous or 
> undefined behavior due to a null value being used in a way forbidden by a 
> returns_nonnull or nonnull
>                               attribute.  Isolate those paths from the main 
> control flow and turn the statement with erroneous or undefined behavior into 
> a trap.
>   -fisolate-erroneous-paths-dereference Detect paths that trigger erroneous 
> or undefined behavior due to dereferencing a null pointer.  Isolate those 
> paths from the main control flow
>                               and turn the statement with erroneous or 
> undefined behavior into a trap.
> 

Good.

>> ...
>>
>>>
>>>> - gcc/doc/invoke.texi - 2 spaces in between sentences + better gol
>>>> - gcc/opts.c - do not mix spaces + tabs
>>>
>>> I have used contrib/check_GNU_style.sh to check the patch, I did see one 
>>> place that complains about 2 spaces in between sentences, fixed it.
>>
>> I see it:
>>
>> === ERROR type #3: dot, space, space, new sentence (3 error(s)) ===
>> gcc/common.opt:2190:62:optimizations to provide a safe compilation for 
>> live-patching.█At the same
>> gcc/doc/invoke.texi:9291:14:optimizations.█For example, inlining a function 
>> into its caller, cloning
>> gcc/doc/invoke.texi:9297:37:impacted functions for each function.█In order 
>> to control the number of
> 
> fixed.
> 
>>
>>> but I didn’t see spaces + tabs mix issue with the script. could you please 
>>> specify?
>>
>> This is a new check that I've just installed:
>>
>> === ERROR type #1: a space should not precede a tab (1 error(s)) ===
>> gcc/opts.c:2350:0:    ████████control_optimizations_for_live_patching (opts, 
>> opts_set,
> 
> Okay, I see, fixed. 
> 
> thanks.
> 
> Qing
>>
>> Martin
>>
>>>
>>> thanks.
>>>
>>> Qing
>>> *
>>> *
> 

So please send final version of the patch.

Martin

Reply via email to