On 2018-07-25 10:30 +0000, Ming Cheng wrote: > But I need to profile some of my functions and inside these functions, std classes are used. Quote from <https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Instrumentation-Options.html>: > -finstrument-functions-exclude-file-list=file,file,... Set the list of > functions that are excluded from instrumentation (see the description of > -finstrument-functions). If the file that contains a function definition > matches with one of file, then that function is not instrumented. The > match is done on substrings: if the file parameter is a substring of > the file name, it is considered to be a match. > > For example: > > -finstrument-functions-exclude-file-list=/bits/stl,include/sys > > excludes any inline function defined in files whose pathnames contain > /bits/stl or include/sys. So "-finstrument-functions-exclude-file-list=/usr/include/c++ should work. -- Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University