[PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

Martin Liška mliska@suse.cz
Mon Aug 15 11:43:00 GMT 2016


On 08/15/2016 12:47 PM, Nathan Sidwell wrote:
> On 08/09/16 10:32, Martin Liška wrote:
>> Hello.
>>
>> Following enhancement for gcov solves issues when we cannot create a file due to a filesystem
>> path length limit. Selected approach utilizes existing md5sum functions.
>>
>> Patch survives make check -k RUNTESTFLAGS="gcov.exp" on x86_64-linux-gnu.
>>
>> Ready for trunk?
>> Thanks,
>> Martin
>>
> 
> +     [@option{-e}|@option{--hash-names}]
> '--hash-filenames' would be better.  Let's not confuse the user with thinking may be  the function names are hashed. (or perhaps '--hash-paths'?  The world's a little unclear on whether 'filename->last bit of file path, or the whole thing')
> 
> 
> +/* For situations when a long name can potentially hit filesystem path limit,
> +   let's calculate md5sum of the patch and create file x.gcov##md5sum.gcov.  */
> +
> +static int flag_hash_names = 0;
> +
> s/patch/path.
> Which  bit of 'x.gcov##md5sum.gcov' is the hash?  is it 'x' or sommethihg else? Perhaps this more detailed comment should be near where the filename is generated.  And this flag just labelled as someting like 'hash long pathnames'
> 
> +  fnotice (file, "  -e, --hash-names                Use hash of file path in "
> .. and ..
> +  { "long-file-names",      no_argument,       NULL, 'e' },

Hi Nathan.

All nits are applied in the second version of patch.

> 
> don't seem to match?  Why 'e'?

I've renamed it to -x, well, a lot of letters are already occupied.

Martin

> 
> nathan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gcov-add-new-option-hash-filenames-PR-gcov-profile-3-v2.patch
Type: text/x-patch
Size: 4996 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160815/e76e5b24/attachment.bin>


More information about the Gcc-patches mailing list