From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21442 invoked by alias); 1 Jun 2011 06:57:23 -0000 Received: (qmail 21434 invoked by uid 22791); 1 Jun 2011 06:57:23 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jun 2011 06:57:08 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p516v798010187 for ; Tue, 31 May 2011 23:57:07 -0700 Received: from pwj8 (pwj8.prod.google.com [10.241.219.72]) by wpaz33.hot.corp.google.com with ESMTP id p516v5sv011948 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 31 May 2011 23:57:06 -0700 Received: by pwj8 with SMTP id 8so3954675pwj.27 for ; Tue, 31 May 2011 23:57:05 -0700 (PDT) Received: by 10.68.30.73 with SMTP id q9mr2547604pbh.431.1306911425206; Tue, 31 May 2011 23:57:05 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id i7sm785240pbj.74.2011.05.31.23.57.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2011 23:57:04 -0700 (PDT) From: Ian Lance Taylor To: Pan ruochen Cc: gcc-help Subject: Re: -finstrument-functions-exclude-file-list can't work in some case References: Date: Wed, 01 Jun 2011 06:57:00 -0000 In-Reply-To: (Pan ruochen's message of "Wed, 1 Jun 2011 14:27:06 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00005.txt.bz2 Pan ruochen 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