From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28814 invoked by alias); 6 Sep 2002 11:19:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28806 invoked from network); 6 Sep 2002 11:19:05 -0000 Received: from unknown (HELO mail.acunia.com) (194.7.211.211) by sources.redhat.com with SMTP; 6 Sep 2002 11:19:05 -0000 Received: from acunia.com (ldap.leuven.intern.acunia.com [10.42.42.1]) by mail.acunia.com (8.11.6/8.11.6) with ESMTP id g86BJ3419045 for ; Fri, 6 Sep 2002 13:19:04 +0200 Message-ID: <3D788F27.3030604@acunia.com> Date: Fri, 06 Sep 2002 04:19:00 -0000 From: jeroen dobbelaere Organization: ACUNIA User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: profiling on ARM Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00230.txt.bz2 Hi, I'm trying to get profiling working on an ARM platform (arm-linux) and I've observed following behavior : (glibc-2.2.5 compiled with gcc-3.0.4; testprogram with gcc-3.0.4 and gcc-3.2) : - using no optimizations and static compilation produces a binary that generates a 'gmon.out' file containing useful data. (ex. gcc -static -g -pg testfile.c) - enabling optimizations and static compilation produces a binary that generates a 'gmon.out' file, but that contains no call graph information (ex. gcc -static -g -pg -O3 testfile.c) debugging the code shows that the problem is due to frame pointers being optimized away. adding '-fno-omit-frame-pointer' resolves this problem. QUESTION : shouldn't this been taken care of automatically when providing '-pg', or should the profiling still work without frame pointers. - using 'shared libraries', no 'gmon.out' is created. It seems that the initalisation code for profile monitoring ('moncontrol') is never called. Any idea where this should be told to the program ? The same tests on an i686 platform produces valid output for each of those cases... Greetings, -- Jeroen Dobbelaere Embedded Software Engineer ACUNIA Embedded Solutions http://www.acunia.com/aes