Hi Andrew, > On 6 Jun 2025, at 8:18 am, Andrew Pinski <pins...@gmail.com> wrote: > > External email: Use caution opening links or attachments > > > On Wed, Jun 4, 2025 at 12:02 AM Kugan Vivekanandarajah > <kvivekana...@nvidia.com> wrote: >> >> This patch introduces a new testcase to verify the merging of profiles >> is performed for cloned functions. >> >> Since this is invoked very early, before the pass manager, we need to >> set up the dumping explicitly. This is similar to the handling in >> finish_optimization_passes. >> >> gcc/ChangeLog: >> >> * auto-profile.cc (autofdo_source_profile::read): Dump message >> while merging profile. >> * pass_manager.h (get_pass_auto_profile): New. >> >> gcc/testsuite/ChangeLog: >> >> * gcc.dg/tree-prof/clone-merge-1.c: New test. > > This new testcase fails if you don't have autofdo setup. > I think it needs: > /* { dg-require-profiling "-fauto-profile" } */
Currently aarch64/gcc-auto-profile currently runs perf even when we do not have BRBE (with a warning). This is what seems to be happening here. Tests currently rely on availability of create_gcov to decide if the tests should be running. Without BRBE, we are not going to have good enough profile for the tests. I now get. ./gcc/testsuite/gcc/gcc.sum:UNSUPPORTED: gcc.dg/tree-prof/clone-merge-1.c -fauto-profile: cannot run create_gcov Maybe we should fail when gcc-auto-profile warns? Let me try that. Thanks, Kugan > > Thanks, > Andrew Pinski > > >> >> Is this OK? >> >> Thanks, >> Kugan >>