I'd like to build one module (mod_fifo) with the -pg compiler flag. But my inexperience with gcc makefiles is making it difficult. :-) Does anyone have any info for doing profiling in a FreeSwitch module?<div><br></div>
<div>The only way I can get it to even compile with the profiling flag is to run ./configure to set the flag for ALL modules, then make mod_fifo, then re-run configure to remove the flag. My code:</div><div><br></div><div>
$> export MOD_CFLAGS="-pg"</div><div>$> export CFLAGS="-pg"</div><div>$> ./configure</div><div>$> make mod_fifo</div><div>$> # undo the changes so I don't screw up my entire build.</div>
<div>$> export MOD_CFLAGS=</div><div>$> export CFLAGS=</div><div>$> ../configure</div><div><br></div><div>Unfortunately, ./configure takes about 40 minutes to run on my poor little pogoplug, and then "make mod_fifo" feels the need to rebuild a bunch of libraries with the -pg flag (which I don't want), which adds another 15 minutes. In all, my script takes 105 minutes to run.</div>
<div><br></div><div>After all this, I can see the -pg flag in use when doing "make mod_fifo", and -pg shows up in the relink_command in <a href="http://mod_fifo.la">mod_fifo.la</a>. But it doesn't create the profiling data file, so apparently the -pg didn't actually work.</div>
<div><br></div><div>I'm stumped. :-)</div><div><br></div>