Hi All, I want to use -finstrument-functions options to trace some function calls of kernel. $cat drivers/base/power/.runtime.o.cmd arm-none-linux-gnueabi-gcc -Wp,-MD,drivers/base/power/.runtime.o.d -nostdinc -isystem /opt/arm-2009q3-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include -I/home/PRC/git/linux-2.6/arch/arm/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-versatile/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -finstrument-functions -finstrument-functions-exclude-file-list=linux/,asm/,runtime.c -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(runtime)" -D"KBUILD_MODNAME=KBUILD_STR(runtime)" -c -o drivers/base/power/runtime.o drivers/base/power/runtime.c I wish gcc invoke __cyg_profile_func_enter/__cyg_profile_func_exit only from the functions within `runtime.c' in the driver/base/power. It is not successful. $nm drivers/power/base/main.o ... U __cyg_profile_func_enter U __cyg_profile_func_exit But with the some gcc, I handle another simple source file, $cat 1.c void function1_1() {} $ arm-none-linux-gnueabi-gcc -Os -finstrument-functions -finstrument-functions-exclude-file-list=1.c -c 1.c $ nm 1.o 00000000 t $a 00000000 r $d U __aeabi_unwind_cpp_pr0 00000000 T function1_1 $ arm-none-linux-gnueabi-gcc -Os -finstrument-functions -c 1.c $ nm 1.o 00000000 t $a 00000024 t $d 00000000 r $d U __aeabi_unwind_cpp_pr0 U __cyg_profile_func_enter U __cyg_profile_func_exit 00000000 T function1_1 I guess -finstrument-functions and -finstrument-functions-exclude-file-list are affected by some other options. So what's wrong. - PRC