https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123923

--- Comment #5 from Dhruv Chawla <dhruvc at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Dhruv Chawla from comment #3)
> > Yeah, I was looking for something like this. How do I check if I have global
> > settings set?
> 
> I tried to see if there was one but I could not find it. This is why I was
> suggesting to see if changing gcc-auto-profile to add `--inherit` on the
> perf command line.

--inherit seems to do the trick, thanks a lot! Though I still see:

  E20260202 03:19:07.625666 2101393 simple_spe_sample_reader.cc:168] No MMAP
event found for "../stage1-gcc/cc1"
  E20260202 03:19:07.625804 2101393 profile_creator.cc:209] Error reading
profile from ../prev-libcpp/perf.data
  make[3]: *** [../../src/gcc/c/Make-lang.in:101: create_fdas_for_cc1] Error 1

  E20260202 03:19:11.389925 2101419 simple_spe_sample_reader.cc:168] No MMAP
event found for "../stage1-gcc/cc1plus"
  E20260202 03:19:11.390053 2101419 profile_creator.cc:209] Error reading
profile from ../prev-libbacktrace/perf.data
  make[3]: *** [../../src/gcc/cp/Make-lang.in:218: create_fdas_for_cc1plus]
Error 1

  E20260202 03:19:12.925416 2101437 simple_spe_sample_reader.cc:168] No MMAP
event found for "../stage1-gcc/lto1"
  E20260202 03:19:12.925534 2101437 profile_creator.cc:209] Error reading
profile from ../prev-libbacktrace/perf.data
  make[3]: *** [../../src/gcc/lto/Make-lang.in:114: create_fdas_for_lto1] Error
1

I guess it makes sense that non-LTO compilation or pure C/C++ libraries would
not profile some parts of the compiler. I think it would be good to ignore
these errors during the build and force --inherit in gcc-auto-profile to stop
this showing up again.

Reply via email to