This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Google] Suppress message when primary module entry cannot found
- From: Xinliang David Li <davidxl at google dot com>
- To: Dehao Chen <dehao at google dot com>
- Cc: Teresa Johnson <tejohnson at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 May 2013 11:03:10 -0700
- Subject: Re: [Google] Suppress message when primary module entry cannot found
- References: <CAO2gOZVS5z0KJcsWj87d1ri+GJN50Ye=gGi7bZ+yikWhCi3iog at mail dot gmail dot com> <CAAe5K+XDbLrmWR96aUG74JJNxPO8=5SFArvC=1_d0+KA=Gt4hw at mail dot gmail dot com> <CAO2gOZW-wQwozPVNZXGou84Y9Pr8abBypvADoOJfOL1nTECipQ at mail dot gmail dot com>
ok. Would be nicer if there is a way to tell this from other error cases though.
David
On Fri, May 10, 2013 at 11:00 AM, Dehao Chen <dehao@google.com> wrote:
> On Fri, May 10, 2013 at 10:47 AM, Teresa Johnson <tejohnson@google.com> wrote:
>> Is it only auto fdo that doesn't store the module info if the module
>> is not exported or has aux modules? Note that this will prevent usage
>> of my script that enables annotation of gcov dump info with function
>> names, which relies on accessing the primary module info to obtain the
>> module name (which is then used to locate the module's associated func
>> id to func name mapping optionally emitted into the build output).
>
> Yes, this is auto fdo only. And gcov dump will not work on auto fdo
> profile because it does not use the id at all in the profile (instead,
> it stores the function name directly).
>
> Thanks,
> Dehao
>
>>
>> Teresa
>>
>> On Fri, May 10, 2013 at 10:37 AM, Dehao Chen <dehao@google.com> wrote:
>>> Now we don't store the module info if the module is not exported or
>>> has any aux module (to compress the profile data size). Thus it's
>>> normal that a primary module entry cannot be found. This patch
>>> suppresses the messages printed when the primary module is not found.
>>>
>>> Bootstrapped and passed regression test.
>>>
>>> OK for google branch?
>>>
>>> Thanks,
>>> Dehao
>>>
>>> Index: auto-profile.c
>>> ===================================================================
>>> --- auto-profile.c (revision 198751)
>>> +++ auto-profile.c (working copy)
>>> @@ -497,10 +497,7 @@ read_aux_modules (void)
>>> module.name = xstrdup (in_fnames[0]);
>>> entry = (struct afdo_module *) htab_find (module_htab, &module);
>>> if (!entry)
>>> - {
>>> - inform (0, "primary module %s cannot be found.", in_fnames[0]);
>>> - return;
>>> - }
>>> + return;
>>> module_infos = XCNEWVEC (struct gcov_module_info *,
>>> entry->num_aux_modules + 1);
>>> afdo_add_module (module_infos, entry, true);
>>
>>
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413