Re: -finstrument-functions-exclude-file-list can't work in some case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pan ruochen <panruochen@xxxxxxxxx> writes:

> $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

Your command above says to instrument all functions except those in
files whose names match linux/ or asm/ or runtime.c.  The file
drivers/power/base/main.c does not match any of those strings, so it
gets instrumented.  This seems consistent.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux