On Sun, 4 Apr 2021, 09:31 Akshit Sharma via Gcc-help, <gcc-help@xxxxxxxxxxx> wrote: > 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++>" > Looks like you have a stray '>' here, but I would expect that you have to use the mangled name for C++ functions. > But I am unable to make the compiler ignore the function. > Is there a way for the compiler to make ignore a predefined function? > N.B. this function is not "predefined", it's defined in the C++ Standard Library.