🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Lawrence De Vooght Wed, 26 Jun 1991 15:50
Gprof for g++; fixed - here's how.
#648
Author: Lawrence De Vooght
Date: Wed, 26 Jun 1991 15:50
66 lines
2222 bytes
I sent this letter out the other day:

===================================
>> Subject: Gprof -gnu profiler - I need advise
>> Message-ID: <ugenblf3ra@ads.com>
>> Sender: usenet@ads.com (USENET News)
>>Organization: Advanced Decision Systems, Mtn. View, CA (415) 960-7300
>>Distribution: usa
>>Date: Fri, 21 Jun 91 10:15:23 PDT
>>Lines: 34

>>   I am trying to find out if it us possible to use the Gnu Profiler -
>>Gprof - with g++ compiled code. 

>>   I have quite a large image (20mg) that I want to profile and I am
>>having problems getting the GPROF to work. I have done the following.


>>On a Sparc station:

>>the code consists of, Xwindow, Interviews and g++

>>compiled the source with the -pg option -- g++ compiler

>>linked the o's with the -pg option

>>make sure that the program executes in the prescribed manner - with
>>exit(0)

>>---- 

>>result is no gmon.out is generated, any suggestion or insights ?

>>	Thanks in advance,
>>	devooght@ads.com

====================

I received a number of answers to my problem some of them complex
other simple. I choose the most simple -- and it worked with one
exception. I defined the extern function as 
- extern "C" void monitor() --. 

The following is the fix ---- Thanks Miron Cuperman.



From: miron@cs.sfu.ca (Miron Cuperman)
Newsgroups: gnu.emacs.help,gnu.g++.help,gnu.gcc.help,gnu.emac
Subject: Re: Gprof -gnu profiler - I need advise
Message-ID: <1991Jun22.022027.1185@cs.sfu.ca>
Date: 22 Jun 91 02:20:27 GMT
References: <ugenblf3ra@ads.com>
Distribution: usa
Organization: Simon Fraser University
Lines: 9



You have to execute the following code before exiting:

extern void monitor(int);
monitor(0);

--	
	by Miron Cuperman <miron@cs.sfu.ca>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads