This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).
- From: Nathan Sidwell <nathan at acm dot org>
- To: Martin Liška <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, peter dot klotz99 at gmail dot com
- Date: Mon, 15 Aug 2016 06:47:15 -0400
- Subject: Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).
- Authentication-results: sourceware.org; auth=none
- References: <10daaa06-0aeb-8e79-b763-cabf15f26a7c@suse.cz>
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' },
don't seem to match? Why 'e'?
nathan