From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22828 invoked by alias); 26 Jun 2002 01:37:24 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 22816 invoked from network); 26 Jun 2002 01:37:22 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.2) by sources.redhat.com with SMTP; 26 Jun 2002 01:37:22 -0000 Received: from tooth.toronto.redhat.com (unknown [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 62C64B8049; Tue, 25 Jun 2002 21:37:21 -0400 (EDT) Received: (from fche@localhost) by tooth.toronto.redhat.com (8.11.6/8.11.6) id g5Q1bKt01078; Tue, 25 Jun 2002 21:37:20 -0400 Date: Tue, 25 Jun 2002 18:37:00 -0000 From: "Frank Ch. Eigler" To: Scott Dattalo Cc: sid@sources.redhat.com Subject: Re: Profiling Message-ID: <20020625213720.A14440@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from scott@dattalo.com on Tue, Jun 25, 2002 at 05:03:05PM -0700 X-SW-Source: 2002-q2/txt/msg00036.txt.bz2 Hi - On Tue, Jun 25, 2002 at 05:03:05PM -0700, Scott Dattalo wrote: > I'm trying to collect profile info on my ARM-based application. [...] > connect-pin main perform-activity -> gprof sample > connect-pin main stopping -> gprof store The "perform-activity" pin may signal infrequently compared to CPU instruction rates, so you will get a relatively low sample rate. You could connect that gprof sample pin from another source, such as the scheduler's CPU-bound NNN-output signal. > [...] > Now when I run gprof: > $ gprof --flat-profile gmon.out > I get the error: > gprof: gmon.out: not in a.out format This is a simple gprof usage error. gprof implicitly looks for the file named gmon.out, but it doesn't know what *target executable* to relate it to. gprof needs to process the executable in order to extract its symbol table, so that the PC sample addresses in gmon.out can become sensible. So, all you need to do is build the cross-gprof, and run arm-elf-gprof file.exe By the way, the "--flat-profile" option is not always needed any more, as sid can collect call-graph profiling information from cooperating cpu models. (They need to drive a special c-call from subroutine call semantics.) I don't recall if the ARM cpu model includes the few lines of code for this. If you're interested in fuller profiling, I'd be happy to give pointers for completing that few-minute job. > Hmm. After reading the gprof docs, I added -pg to my CFLAGS options in my > make files. [...] Right - this requests gcc to instrument the target code. sid can profile uninstrumented target code. (In some cases, sid can execute -pg-instrumented code and produce a gmon.out file, but this requires many more pieces of target software, and has some different properties.) - FChE