* Re: [google 4.7] fdo build for linux kernel (issue 6968046)
@ 2012-12-20 1:04 davidxl
2012-12-20 1:22 ` Rong Xu
0 siblings, 1 reply; 5+ messages in thread
From: davidxl @ 2012-12-20 1:04 UTC (permalink / raw)
To: xur; +Cc: gcc-patches, reply
The change in gcov-io.h is from a different patch.
David
https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c
File gcc/gcov-io.c (right):
https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c#newcode688
gcc/gcov-io.c:688:
Have you compared this with this impl:
while (x)
{
c++;
x&=(x-1)
}
return c;
https://codereview.appspot.com/6968046/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [google 4.7] fdo build for linux kernel (issue 6968046)
2012-12-20 1:04 [google 4.7] fdo build for linux kernel (issue 6968046) davidxl
@ 2012-12-20 1:22 ` Rong Xu
2012-12-20 19:30 ` Rong Xu
0 siblings, 1 reply; 5+ messages in thread
From: Rong Xu @ 2012-12-20 1:22 UTC (permalink / raw)
To: xur, davidxl, gcc-patches, reply
On Wed, Dec 19, 2012 at 5:04 PM, <davidxl@google.com> wrote:
> The change in gcov-io.h is from a different patch.
sorry. here is the patch for gcov-io.h:
Index: gcov-io.h
===================================================================
--- gcov-io.h (revision 194562)
+++ gcov-io.h (working copy)
@@ -781,8 +781,8 @@
unused) */
unsigned n_functions; /* number of functions */
- const struct gcov_fn_info *const *functions; /* pointer to pointers
- to function information */
+ const struct gcov_fn_info **functions; /* pointer to pointers
+ to function information */
};
/* Information about a single imported module. */
@@ -988,8 +988,7 @@
GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
GCOV_LINKAGE gcov_unsigned_t gcov_string_length (const char *)
ATTRIBUTE_HIDDEN;
-GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *,
- struct gcov_summary *);
+GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *);
#else
/* Available outside libgcov */
GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
>
> David
>
>
> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c
> File gcc/gcov-io.c (right):
>
> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c#newcode688
> gcc/gcov-io.c:688:
> Have you compared this with this impl:
>
> while (x)
> {
> c++;
> x&=(x-1)
> }
> return c;
>
I did not try this pimplier version. I can do a test on the dump speed
and report back.
> https://codereview.appspot.com/6968046/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [google 4.7] fdo build for linux kernel (issue 6968046)
2012-12-20 1:22 ` Rong Xu
@ 2012-12-20 19:30 ` Rong Xu
2012-12-20 19:55 ` Xinliang David Li
0 siblings, 1 reply; 5+ messages in thread
From: Rong Xu @ 2012-12-20 19:30 UTC (permalink / raw)
To: xur, davidxl, gcc-patches, reply
On Wed, Dec 19, 2012 at 5:22 PM, Rong Xu <xur@google.com> wrote:
> On Wed, Dec 19, 2012 at 5:04 PM, <davidxl@google.com> wrote:
>> The change in gcov-io.h is from a different patch.
>
> sorry. here is the patch for gcov-io.h:
>
> Index: gcov-io.h
> ===================================================================
> --- gcov-io.h (revision 194562)
> +++ gcov-io.h (working copy)
> @@ -781,8 +781,8 @@
> unused) */
>
> unsigned n_functions; /* number of functions */
> - const struct gcov_fn_info *const *functions; /* pointer to pointers
> - to function information */
> + const struct gcov_fn_info **functions; /* pointer to pointers
> + to function information */
> };
>
> /* Information about a single imported module. */
> @@ -988,8 +988,7 @@
> GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
> GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
> GCOV_LINKAGE gcov_unsigned_t gcov_string_length (const char *)
> ATTRIBUTE_HIDDEN;
> -GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *,
> - struct gcov_summary *);
> +GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *);
> #else
> /* Available outside libgcov */
> GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
>
>>
>> David
>>
>>
>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c
>> File gcc/gcov-io.c (right):
>>
>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c#newcode688
>> gcc/gcov-io.c:688:
>> Have you compared this with this impl:
>>
>> while (x)
>> {
>> c++;
>> x&=(x-1)
>> }
>> return c;
>>
>
> I did not try this pimplier version. I can do a test on the dump speed
> and report back.
This simpler version is about 2% slow in dumping the profiles (average
of 10 dumps). But this is not a big deal.
I'll use this this version.
-Rong
>
>> https://codereview.appspot.com/6968046/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [google 4.7] fdo build for linux kernel (issue 6968046)
2012-12-20 19:30 ` Rong Xu
@ 2012-12-20 19:55 ` Xinliang David Li
2012-12-20 22:01 ` Rong Xu
0 siblings, 1 reply; 5+ messages in thread
From: Xinliang David Li @ 2012-12-20 19:55 UTC (permalink / raw)
To: Rong Xu; +Cc: GCC Patches, reply
It depends on the value distribution .
David
On Thu, Dec 20, 2012 at 11:30 AM, Rong Xu <xur@google.com> wrote:
> On Wed, Dec 19, 2012 at 5:22 PM, Rong Xu <xur@google.com> wrote:
>> On Wed, Dec 19, 2012 at 5:04 PM, <davidxl@google.com> wrote:
>>> The change in gcov-io.h is from a different patch.
>>
>> sorry. here is the patch for gcov-io.h:
>>
>> Index: gcov-io.h
>> ===================================================================
>> --- gcov-io.h (revision 194562)
>> +++ gcov-io.h (working copy)
>> @@ -781,8 +781,8 @@
>> unused) */
>>
>> unsigned n_functions; /* number of functions */
>> - const struct gcov_fn_info *const *functions; /* pointer to pointers
>> - to function information */
>> + const struct gcov_fn_info **functions; /* pointer to pointers
>> + to function information */
>> };
>>
>> /* Information about a single imported module. */
>> @@ -988,8 +988,7 @@
>> GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
>> GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
>> GCOV_LINKAGE gcov_unsigned_t gcov_string_length (const char *)
>> ATTRIBUTE_HIDDEN;
>> -GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *,
>> - struct gcov_summary *);
>> +GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *);
>> #else
>> /* Available outside libgcov */
>> GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
>>
>>>
>>> David
>>>
>>>
>>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c
>>> File gcc/gcov-io.c (right):
>>>
>>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c#newcode688
>>> gcc/gcov-io.c:688:
>>> Have you compared this with this impl:
>>>
>>> while (x)
>>> {
>>> c++;
>>> x&=(x-1)
>>> }
>>> return c;
>>>
>>
>> I did not try this pimplier version. I can do a test on the dump speed
>> and report back.
>
> This simpler version is about 2% slow in dumping the profiles (average
> of 10 dumps). But this is not a big deal.
> I'll use this this version.
>
> -Rong
>
>>
>>> https://codereview.appspot.com/6968046/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [google 4.7] fdo build for linux kernel (issue 6968046)
2012-12-20 19:55 ` Xinliang David Li
@ 2012-12-20 22:01 ` Rong Xu
0 siblings, 0 replies; 5+ messages in thread
From: Rong Xu @ 2012-12-20 22:01 UTC (permalink / raw)
To: Xinliang David Li; +Cc: GCC Patches, reply
that's right. but there is no way to predict the pattern.
what I meant was as far as it does not introduce major slow-down in
dumping profile, I'd like to use the simpler version.
what do you think?
-Rong
On Thu, Dec 20, 2012 at 11:54 AM, Xinliang David Li <davidxl@google.com> wrote:
> It depends on the value distribution .
>
> David
>
> On Thu, Dec 20, 2012 at 11:30 AM, Rong Xu <xur@google.com> wrote:
>> On Wed, Dec 19, 2012 at 5:22 PM, Rong Xu <xur@google.com> wrote:
>>> On Wed, Dec 19, 2012 at 5:04 PM, <davidxl@google.com> wrote:
>>>> The change in gcov-io.h is from a different patch.
>>>
>>> sorry. here is the patch for gcov-io.h:
>>>
>>> Index: gcov-io.h
>>> ===================================================================
>>> --- gcov-io.h (revision 194562)
>>> +++ gcov-io.h (working copy)
>>> @@ -781,8 +781,8 @@
>>> unused) */
>>>
>>> unsigned n_functions; /* number of functions */
>>> - const struct gcov_fn_info *const *functions; /* pointer to pointers
>>> - to function information */
>>> + const struct gcov_fn_info **functions; /* pointer to pointers
>>> + to function information */
>>> };
>>>
>>> /* Information about a single imported module. */
>>> @@ -988,8 +988,7 @@
>>> GCOV_LINKAGE void gcov_seek (gcov_position_t /*position*/) ATTRIBUTE_HIDDEN;
>>> GCOV_LINKAGE void gcov_truncate (void) ATTRIBUTE_HIDDEN;
>>> GCOV_LINKAGE gcov_unsigned_t gcov_string_length (const char *)
>>> ATTRIBUTE_HIDDEN;
>>> -GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *,
>>> - struct gcov_summary *);
>>> +GCOV_LINKAGE unsigned gcov_gcda_file_size (struct gcov_info *);
>>> #else
>>> /* Available outside libgcov */
>>> GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
>>>
>>>>
>>>> David
>>>>
>>>>
>>>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c
>>>> File gcc/gcov-io.c (right):
>>>>
>>>> https://codereview.appspot.com/6968046/diff/1/gcc/gcov-io.c#newcode688
>>>> gcc/gcov-io.c:688:
>>>> Have you compared this with this impl:
>>>>
>>>> while (x)
>>>> {
>>>> c++;
>>>> x&=(x-1)
>>>> }
>>>> return c;
>>>>
>>>
>>> I did not try this pimplier version. I can do a test on the dump speed
>>> and report back.
>>
>> This simpler version is about 2% slow in dumping the profiles (average
>> of 10 dumps). But this is not a big deal.
>> I'll use this this version.
>>
>> -Rong
>>
>>>
>>>> https://codereview.appspot.com/6968046/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-20 22:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-20 1:04 [google 4.7] fdo build for linux kernel (issue 6968046) davidxl
2012-12-20 1:22 ` Rong Xu
2012-12-20 19:30 ` Rong Xu
2012-12-20 19:55 ` Xinliang David Li
2012-12-20 22:01 ` Rong Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).