public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Google] Fix profiledbootstrap failure
@ 2013-07-30 18:51 Dinar Temirbulatov
  2013-07-30 19:02 ` Teresa Johnson
  0 siblings, 1 reply; 8+ messages in thread
From: Dinar Temirbulatov @ 2013-07-30 18:51 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Hello

This change allows to complete profiledbootstrap on the google gcc-4.8
branch, tested with make bootstrap with no new regressions.  OK for
google 4.8?
                   thanks, Dinar.

[-- Attachment #2: profiledbootstrap-fix.patch --]
[-- Type: application/octet-stream, Size: 631 bytes --]

Index: gcc/coverage.c
===================================================================
--- gcc/coverage.c	(revision 201273)
+++ gcc/coverage.c	(working copy)
@@ -662,17 +662,7 @@
     max_group = (unsigned) -1;
 
   if (!gcov_open (da_file_name, 1))
-    {
-      if (PARAM_VALUE (PARAM_GCOV_DEBUG))
-        {
-          /* Try to find .gcda file in the current working dir.  */
-          da_file_name = lbasename (da_file_name);
-          if (!gcov_open (da_file_name, 1))
-            return;
-        }
-      else
-        return;
-    }
+    return;
 
   if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
     {

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 18:51 [Google] Fix profiledbootstrap failure Dinar Temirbulatov
@ 2013-07-30 19:02 ` Teresa Johnson
  2013-07-30 19:13   ` Xinliang David Li
  0 siblings, 1 reply; 8+ messages in thread
From: Teresa Johnson @ 2013-07-30 19:02 UTC (permalink / raw)
  To: Dinar Temirbulatov; +Cc: GCC Patches, Rong Xu, David Li

cc'ing Rong and David since this came from LIPO support.

The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
by default) without removing the parameter itself. What is the failure
mode you see from this code?

Thanks,
Teresa

On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
<dinar@kugelworks.com> wrote:
> Hello
>
> This change allows to complete profiledbootstrap on the google gcc-4.8
> branch, tested with make bootstrap with no new regressions.  OK for
> google 4.8?
>                    thanks, Dinar.



-- 
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 19:02 ` Teresa Johnson
@ 2013-07-30 19:13   ` Xinliang David Li
  2013-07-30 19:50     ` Rong Xu
  2013-07-30 19:58     ` Dinar Temirbulatov
  0 siblings, 2 replies; 8+ messages in thread
From: Xinliang David Li @ 2013-07-30 19:13 UTC (permalink / raw)
  To: Teresa Johnson; +Cc: Dinar Temirbulatov, GCC Patches, Rong Xu

I need to understand why this affects profile bootstrap -- is this due
to file name conflict?

The fix is wrong -- please do not remove the parameter. If it is a
problem, a better fix is to change the default parameter value to 0.

David


On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
> cc'ing Rong and David since this came from LIPO support.
>
> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
> by default) without removing the parameter itself. What is the failure
> mode you see from this code?
>
> Thanks,
> Teresa
>
> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
> <dinar@kugelworks.com> wrote:
>> Hello
>>
>> This change allows to complete profiledbootstrap on the google gcc-4.8
>> branch, tested with make bootstrap with no new regressions.  OK for
>> google 4.8?
>>                    thanks, Dinar.
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 19:13   ` Xinliang David Li
@ 2013-07-30 19:50     ` Rong Xu
  2013-07-30 20:01       ` Xinliang David Li
  2013-07-30 19:58     ` Dinar Temirbulatov
  1 sibling, 1 reply; 8+ messages in thread
From: Rong Xu @ 2013-07-30 19:50 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Teresa Johnson, Dinar Temirbulatov, GCC Patches

We have seen the issue before. It does fail the profile boostrap as it
reads a wrong gcda file.
I thought it had been fixed. (The fix was as David mentioned, setting
the default value of the parameter to 0).

-Rong

On Tue, Jul 30, 2013 at 12:02 PM, Xinliang David Li <davidxl@google.com> wrote:
> I need to understand why this affects profile bootstrap -- is this due
> to file name conflict?
>
> The fix is wrong -- please do not remove the parameter. If it is a
> problem, a better fix is to change the default parameter value to 0.
>
> David
>
>
> On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
>> cc'ing Rong and David since this came from LIPO support.
>>
>> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
>> by default) without removing the parameter itself. What is the failure
>> mode you see from this code?
>>
>> Thanks,
>> Teresa
>>
>> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
>> <dinar@kugelworks.com> wrote:
>>> Hello
>>>
>>> This change allows to complete profiledbootstrap on the google gcc-4.8
>>> branch, tested with make bootstrap with no new regressions.  OK for
>>> google 4.8?
>>>                    thanks, Dinar.
>>
>>
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 19:13   ` Xinliang David Li
  2013-07-30 19:50     ` Rong Xu
@ 2013-07-30 19:58     ` Dinar Temirbulatov
  1 sibling, 0 replies; 8+ messages in thread
From: Dinar Temirbulatov @ 2013-07-30 19:58 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Teresa Johnson, GCC Patches, Rong Xu

>I need to understand why this affects profile bootstrap -- is this due
>to file name conflict?
Yes, It is simple. During the profiledbootstrap on x86_64 platform for
libiberty the compiler picks an incorrect profile from the current
directory(non-pic version), while compiling pic version, and
profiledbootstrap fails.
Here is log:
if [ x"-fpic" != x ]; then \
          /home/dinar/bugz/x86_64/build-gcc-4_8-svn-orig/./prev-gcc/xgcc
-B/home/dinar/bugz/x86_64/bisect/build-gcc-4_8-svn-orig/./prev-gcc/
-B/tmp/x86_64-unknown-linux-gnu/bin/
-B/tmp/x86_64-unknown-linux-gnu/bin/
-B/tmp/x86_64-unknown-linux-gnu/lib/ -isystem
/tmp/x86_64-unknown-linux-gnu/include -isystem
/tmp/x86_64-unknown-linux-gnu/sys-include    -c -DHAVE_CONFIG_H -g -O2
-fprofile-use  -I. -I../../gcc-4_8-svn-orig/libiberty/../include  -W
-Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic
-fpic ../../gcc-4_8-svn-orig/libiberty/dwarfnames.c -o
pic/dwarfnames.o; \
        else true; fi
yes
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: error: the control
flow of function ‘get_DW_CFA_name’ does not match its profile data
(counter ‘arcs’) [-Werror=coverage-mismatch]

 ^
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: note: use
-Wno-error=coverage-mismatch to tolerate the mismatch but performance
may drop if the function is hot
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c: In function ‘get_DW_ATE_name’:
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: error: the control
flow of function ‘get_DW_ATE_name’ does not match its profile data
(counter ‘arcs’) [-Werror=coverage-mismatch]
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: note: use
-Wno-error=coverage-mismatch to tolerate the mismatch but performance
may drop if the function is hot
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c: In function ‘get_DW_OP_name’:
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: error: the control
flow of function ‘get_DW_OP_name’ does not match its profile data
(counter ‘arcs’) [-Werror=coverage-mismatch]
../../gcc-4_8-svn-orig/libiberty/dwarfnames.c:75:0: note: use
-Wno-error=coverage-mismatch to tolerate the mismatch but performance
may drop if the function is hot
                            thanks, Dinar.

On Tue, Jul 30, 2013 at 11:02 PM, Xinliang David Li <davidxl@google.com> wrote:
> I need to understand why this affects profile bootstrap -- is this due
> to file name conflict?
>
> The fix is wrong -- please do not remove the parameter. If it is a
> problem, a better fix is to change the default parameter value to 0.
>
> David
>
>
> On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
>> cc'ing Rong and David since this came from LIPO support.
>>
>> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
>> by default) without removing the parameter itself. What is the failure
>> mode you see from this code?
>>
>> Thanks,
>> Teresa
>>
>> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
>> <dinar@kugelworks.com> wrote:
>>> Hello
>>>
>>> This change allows to complete profiledbootstrap on the google gcc-4.8
>>> branch, tested with make bootstrap with no new regressions.  OK for
>>> google 4.8?
>>>                    thanks, Dinar.
>>
>>
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 19:50     ` Rong Xu
@ 2013-07-30 20:01       ` Xinliang David Li
  2013-07-30 20:18         ` Rong Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Xinliang David Li @ 2013-07-30 20:01 UTC (permalink / raw)
  To: Rong Xu; +Cc: Teresa Johnson, Dinar Temirbulatov, GCC Patches

Ok. Rong, can you help commit the parameter default setting patch?

thanks,

David

On Tue, Jul 30, 2013 at 12:48 PM, Rong Xu <xur@google.com> wrote:
> We have seen the issue before. It does fail the profile boostrap as it
> reads a wrong gcda file.
> I thought it had been fixed. (The fix was as David mentioned, setting
> the default value of the parameter to 0).
>
> -Rong
>
> On Tue, Jul 30, 2013 at 12:02 PM, Xinliang David Li <davidxl@google.com> wrote:
>> I need to understand why this affects profile bootstrap -- is this due
>> to file name conflict?
>>
>> The fix is wrong -- please do not remove the parameter. If it is a
>> problem, a better fix is to change the default parameter value to 0.
>>
>> David
>>
>>
>> On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
>>> cc'ing Rong and David since this came from LIPO support.
>>>
>>> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
>>> by default) without removing the parameter itself. What is the failure
>>> mode you see from this code?
>>>
>>> Thanks,
>>> Teresa
>>>
>>> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
>>> <dinar@kugelworks.com> wrote:
>>>> Hello
>>>>
>>>> This change allows to complete profiledbootstrap on the google gcc-4.8
>>>> branch, tested with make bootstrap with no new regressions.  OK for
>>>> google 4.8?
>>>>                    thanks, Dinar.
>>>
>>>
>>>
>>> --
>>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 20:01       ` Xinliang David Li
@ 2013-07-30 20:18         ` Rong Xu
  2013-07-31 17:09           ` Dinar Temirbulatov
  0 siblings, 1 reply; 8+ messages in thread
From: Rong Xu @ 2013-07-30 20:18 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Teresa Johnson, Dinar Temirbulatov, GCC Patches

Will do.

The patch was in gcc-4_7 by Dehao.

r194713 | dehao | 2012-12-24 16:49:06 -0800 (Mon, 24 Dec 2012) | 5 lines

Fix the profiled bootstrap:

1. Set the default value of gcov-debug to be 0.
2. Merge profile summaries from different instrumented binaries.

On Tue, Jul 30, 2013 at 12:58 PM, Xinliang David Li <davidxl@google.com> wrote:
> Ok. Rong, can you help commit the parameter default setting patch?
>
> thanks,
>
> David
>
> On Tue, Jul 30, 2013 at 12:48 PM, Rong Xu <xur@google.com> wrote:
>> We have seen the issue before. It does fail the profile boostrap as it
>> reads a wrong gcda file.
>> I thought it had been fixed. (The fix was as David mentioned, setting
>> the default value of the parameter to 0).
>>
>> -Rong
>>
>> On Tue, Jul 30, 2013 at 12:02 PM, Xinliang David Li <davidxl@google.com> wrote:
>>> I need to understand why this affects profile bootstrap -- is this due
>>> to file name conflict?
>>>
>>> The fix is wrong -- please do not remove the parameter. If it is a
>>> problem, a better fix is to change the default parameter value to 0.
>>>
>>> David
>>>
>>>
>>> On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
>>>> cc'ing Rong and David since this came from LIPO support.
>>>>
>>>> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
>>>> by default) without removing the parameter itself. What is the failure
>>>> mode you see from this code?
>>>>
>>>> Thanks,
>>>> Teresa
>>>>
>>>> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
>>>> <dinar@kugelworks.com> wrote:
>>>>> Hello
>>>>>
>>>>> This change allows to complete profiledbootstrap on the google gcc-4.8
>>>>> branch, tested with make bootstrap with no new regressions.  OK for
>>>>> google 4.8?
>>>>>                    thanks, Dinar.
>>>>
>>>>
>>>>
>>>> --
>>>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Google] Fix profiledbootstrap failure
  2013-07-30 20:18         ` Rong Xu
@ 2013-07-31 17:09           ` Dinar Temirbulatov
  0 siblings, 0 replies; 8+ messages in thread
From: Dinar Temirbulatov @ 2013-07-31 17:09 UTC (permalink / raw)
  To: Rong Xu; +Cc: Xinliang David Li, Teresa Johnson, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

Hi,
Here is the patch, Tested by profiledbootstrap. Ok for google gcc-4.8?
                thanks, Dinar.

On Wed, Jul 31, 2013 at 12:01 AM, Rong Xu <xur@google.com> wrote:
> Will do.
>
> The patch was in gcc-4_7 by Dehao.
>
> r194713 | dehao | 2012-12-24 16:49:06 -0800 (Mon, 24 Dec 2012) | 5 lines
>
> Fix the profiled bootstrap:
>
> 1. Set the default value of gcov-debug to be 0.
> 2. Merge profile summaries from different instrumented binaries.
>
> On Tue, Jul 30, 2013 at 12:58 PM, Xinliang David Li <davidxl@google.com> wrote:
>> Ok. Rong, can you help commit the parameter default setting patch?
>>
>> thanks,
>>
>> David
>>
>> On Tue, Jul 30, 2013 at 12:48 PM, Rong Xu <xur@google.com> wrote:
>>> We have seen the issue before. It does fail the profile boostrap as it
>>> reads a wrong gcda file.
>>> I thought it had been fixed. (The fix was as David mentioned, setting
>>> the default value of the parameter to 0).
>>>
>>> -Rong
>>>
>>> On Tue, Jul 30, 2013 at 12:02 PM, Xinliang David Li <davidxl@google.com> wrote:
>>>> I need to understand why this affects profile bootstrap -- is this due
>>>> to file name conflict?
>>>>
>>>> The fix is wrong -- please do not remove the parameter. If it is a
>>>> problem, a better fix is to change the default parameter value to 0.
>>>>
>>>> David
>>>>
>>>>
>>>> On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson <tejohnson@google.com> wrote:
>>>>> cc'ing Rong and David since this came from LIPO support.
>>>>>
>>>>> The patch as-is removes the one use of PARAM_GCOV_DEBUG (which is on
>>>>> by default) without removing the parameter itself. What is the failure
>>>>> mode you see from this code?
>>>>>
>>>>> Thanks,
>>>>> Teresa
>>>>>
>>>>> On Tue, Jul 30, 2013 at 11:50 AM, Dinar Temirbulatov
>>>>> <dinar@kugelworks.com> wrote:
>>>>>> Hello
>>>>>>
>>>>>> This change allows to complete profiledbootstrap on the google gcc-4.8
>>>>>> branch, tested with make bootstrap with no new regressions.  OK for
>>>>>> google 4.8?
>>>>>>                    thanks, Dinar.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413

[-- Attachment #2: profiledbootstrap-fix1.patch --]
[-- Type: application/octet-stream, Size: 396 bytes --]

Index: gcc/params.def
===================================================================
--- gcc/params.def	(revision 201372)
+++ gcc/params.def	(working copy)
@@ -1026,7 +1026,7 @@
 DEFPARAM (PARAM_GCOV_DEBUG,
 	  "gcov-debug",
 	  "Looking for gcda file in current dir.",
-	  1, 0, 1)
+	  0, 0, 1)
 
 /* Avoid SLP vectorization of large basic blocks.  */
 DEFPARAM (PARAM_SLP_MAX_INSNS_IN_BB,

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-31 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-30 18:51 [Google] Fix profiledbootstrap failure Dinar Temirbulatov
2013-07-30 19:02 ` Teresa Johnson
2013-07-30 19:13   ` Xinliang David Li
2013-07-30 19:50     ` Rong Xu
2013-07-30 20:01       ` Xinliang David Li
2013-07-30 20:18         ` Rong Xu
2013-07-31 17:09           ` Dinar Temirbulatov
2013-07-30 19:58     ` Dinar Temirbulatov

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).