Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC profile guided optimization with shared library with no control over executable

We tried gcc's profiling options on an Audio Unit that we compiled under gcc4.2/MacOS. (Technically it is a library.) The problem is that we don't have control over the executable that is loading the library. Ergo we can only link the library with the profiling option but not the executable.

How (if at all) can we use profile guided optimization under these circumstances?

Cheers!

like image 437
clemens Avatar asked Nov 13 '22 11:11

clemens


1 Answers

Can't you write a custom executable to load (and test) the library? That would be under your control and could be built with profiling.

like image 160
Jonathan Wakely Avatar answered May 14 '23 09:05

Jonathan Wakely