Code::Blocks Forums

User forums => Help => Topic started by: ChosenName on January 05, 2022, 04:10:42 pm

Title: SOLVED Plugins>Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: ChosenName on January 05, 2022, 04:10:42 pm
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.
Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: Miguel Gimenez on January 05, 2022, 05:22:12 pm
Can you attach both files?
Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: ChosenName on January 05, 2022, 05:55:26 pm
Thanks for the reply.

Here are the files, 7zipped:

Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: Miguel Gimenez on January 05, 2022, 07:53:22 pm
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.
Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: ChosenName on January 05, 2022, 08:18:31 pm
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.
Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: Miguel Gimenez on January 05, 2022, 08:49:51 pm
BTW, both files are almost empty (that is why 1.4 MB become 5 kB).
Title: Re: Settings > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: ChosenName on January 05, 2022, 11:02:45 pm
It seems so - yet one gives meaningful output and the other gives a blank page.
Title: Re: Plugins > Code Profiler; Output OK with GCC 10.3; Not parsed with GCC 11.2
Post by: ChosenName on May 10, 2022, 10:30:21 am
Problem solved - adding "-no-pie" to compiler and linker settings allows profiler output to be viewed successfully.