I am trying to profile the program with gcc. I am inserting the data into an array which is later used to generate a file. I am having a problem using template class (std::atomic<int>). Program is multithreaded. So, I need to use atomics. Right now, the __cyg_profile_func_enter is called for std::__atomic_base<int>::operator++ as well. I even tried setting the compile parameters to ignore it with: -finstrument-functions "-finstrument-functions-exclude-function-list=std::__atomic_base<int>::operator++>" But I am unable to make the compiler ignore the function. Is there a way for the compiler to make ignore a predefined function? Any pointers about using the __cyg_profile_func_* functionality will be helpful. Thanks, - Akshit