Author Topic: SOLVED Plugins>Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2  (Read 3331 times)

Offline ChosenName

  • Single posting newcomer
  • *
  • Posts: 9
I've been successfully using Code::Blocks as my IDE for some years now, with successive versions of mingw64 based on GCC 4.6 onwards.

With mingw64 based on GCC 10.3 the code profiler plugin parses the gmon.out file as expected. With mingw64 based on GCC 11.2 it does not and shows a blank gprof window. The file size is about the same (1,428kib vs. 1,430kib) so there would seem to be information contained in it.

I've looked online for bug reports or workarounds relating to gprof and mingw based on GCC 11.2 to no avail - so was wondering if this is something that anyone has experienced with Code::Blocks.

Any advice would be very much appreciated.
« Last Edit: May 11, 2022, 08:14:49 am by ChosenName »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1206
Can you attach both files?

Offline ChosenName

  • Single posting newcomer
  • *
  • Posts: 9
Thanks for the reply.

Here are the files, 7zipped:


Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1206
You must use the gprof.exe that came with MinGW11.2.

Is the Windows path set correctly?. You can check the configured path opening a console and executing gprof -h, the first line shows the complete path.
« Last Edit: January 05, 2022, 08:25:34 pm by Miguel Gimenez »

Offline ChosenName

  • Single posting newcomer
  • *
  • Posts: 9
To the best of my knowledge the compiler is using the version of gprof.exe that is part of the compiler - and it does not work on the command line either.

Thanks for the pointer to the likely cause of the problem, much appreciated.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1206
BTW, both files are almost empty (that is why 1.4 MB become 5 kB).

Offline ChosenName

  • Single posting newcomer
  • *
  • Posts: 9
It seems so - yet one gives meaningful output and the other gives a blank page.

Offline ChosenName

  • Single posting newcomer
  • *
  • Posts: 9
Problem solved - adding "-no-pie" to compiler and linker settings allows profiler output to be viewed successfully.