I'm profiling a c++ app on linux compiled with g++.
In the gprof output I'm getting some nontrivial usage statistics for:
global constructors keyed to _ZN4CGps14ms_OutputNamesE
Where _ZN4CGps14ms_OutputNamesE is the mangled name of a static member of one of my classes. It's an array of std::strings:
static std::string ms_OutputNames[MAXOUTPUTS];
I'm a bit surprised that this isn't being constructed once at the beginning of the app. Is there some sort of guard variable or first usage check going on? How would I go about optimising this?