ok with the following changes (and after testing).
+ * sizeof (char*));
for (unsigned j = 0; j < total_num - num_array[0]; j++)
-module->string_array[j] = xstrdup (gcov_read_string ());
+string_array[j] = xstrdup (gcov_read_string ());
+
Here is the patch set 2 that integrates David's comments. Note that
this uses the combined strlen (i.e. encoding compressed and
uncompressed strlen into one gcov_unsigned_t).
Testing is ongoing.
-Rong
On Tue, Oct 6, 2015 at 11:30 AM, Rong Xu wrote:
> It's 1:3 to 1:4 in the programs I tested. Bu
It's 1:3 to 1:4 in the programs I tested. But it really depends on how
the options are used. I think your idea of using combined strlen works
better.
I just make the code a little clumsy but it does not cause any
performance issue.
On Tue, Oct 6, 2015 at 10:21 AM, Xinliang David Li wrote:
> On Tu
On Tue, Oct 6, 2015 at 9:26 AM, Rong Xu wrote:
> On Mon, Oct 5, 2015 at 5:33 PM, Xinliang David Li wrote:
>>unsigned ggc_memory = gcov_read_unsigned ();
>> + unsigned marker = 0, len = 0, k;
>> + char **string_array, *saved_cc1_strings;
>> +
>>for (unsigned j = 0; j < 7;
On Mon, Oct 5, 2015 at 5:33 PM, Xinliang David Li wrote:
>unsigned ggc_memory = gcov_read_unsigned ();
> + unsigned marker = 0, len = 0, k;
> + char **string_array, *saved_cc1_strings;
> +
>for (unsigned j = 0; j < 7; j++)
>
>
> Do not use hard coded number. Use the enum
unsigned ggc_memory = gcov_read_unsigned ();
+ unsigned marker = 0, len = 0, k;
+ char **string_array, *saved_cc1_strings;
+
for (unsigned j = 0; j < 7; j++)
Do not use hard coded number. Use the enum defined in coverage.c.
+string_array[j] = xstrdup (gcov_read_s
Hi,
This patch is for google branch only.
It encodes and compresses various cc1 option strings in
gcov_module_info to reduce the lipo instrumented object size. The
savings are from string compression and the reduced number of
relocations.
More specifically, we replace the following fields in gco