GCC FDO

General FreeBASIC programming questions.
Provoni
Posts: 291
Joined: Jan 05, 2014 12:33
Location: Belgium

GCC FDO

Postby Provoni » Oct 11, 2018 13:10

How does one get the feedback-directed optimization (FDO) flags to work with FreeBASIC programs?

The flags are:

Code: Select all

-fprofile-generate
-fprofile-use

The flag -fprofile-generate should be used first but it throws a bunch of errors:

Code: Select all

Program2.o:fake:(.text+0x15): undefined reference to `__gcov_indirect_call_profiler_v2'
Program2.o:fake:(.text+0x37): undefined reference to `__gcov_time_profiler'
Program2.o:fake:(.text+0xc6): undefined reference to `__gcov_indirect_call_profiler_v2'
...
MrSwiss
Posts: 2869
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: GCC FDO

Postby MrSwiss » Oct 11, 2018 13:15

Do you have the profiler (gprof) installed?
fxm
Posts: 8530
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

Re: GCC FDO

Postby fxm » Oct 11, 2018 13:57

'gprof.exe' is in the 'bin' directory of all official releases, but not in the daily St_W build.
Provoni
Posts: 291
Joined: Jan 05, 2014 12:33
Location: Belgium

Re: GCC FDO

Postby Provoni » Oct 11, 2018 16:45

MrSwiss wrote:Do you have the profiler (gprof) installed?

Not sure what you mean with installed but gprof.exe is in the win64 bin directory.
fxm
Posts: 8530
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

Re: GCC FDO

Postby fxm » Oct 11, 2018 16:58

? :
-Wc -fprofile-generate
see Compiler Option: -Wc
Provoni
Posts: 291
Joined: Jan 05, 2014 12:33
Location: Belgium

Re: GCC FDO

Postby Provoni » Oct 12, 2018 5:14

fxm wrote:? :
-Wc -fprofile-generate
see Compiler Option: -Wc

Yes, -Wc -fprofile-generate.

Return to “General”

Who is online

Users browsing this forum: Richard and 1 guest