🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #540

Profiling C++ programs.

#540
From: Nir Friedman
Date: Tue, 30 Apr 1991 15:27
19 lines
1184 bytes
Hello

	I am working in C++ using g++ (ver. 1.39.0) on sun4 and sun3.
	I'm trying to 'prof' and  'gprof' on my program, since it is
	quite large (25K lines). The compiler documentation (g++.texinfo
	updated 1.37) state that the -p and -pg options are not supported
	yet. I have noticed though, that when compiling with -p the
	compiler generate calls to 'mcount' at the right locations.

	The problem is that when I run the program, no profiling happens.
	I guess this has to do with  the startup module (crt1+.o ?) of g++.

	Do you know of any way of solving this ? or any way of profiling
	C++ programs ?
	
		Thanks in advance

			Nir Friedman
	
Technical Details
Message-ID: <9104301527.AA02972@white.wisdom.weizmann.ac.il>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!tut.cis.ohio-state.edu!unreplyable!garbage
From: murphy@WISDOM.WEIZMANN.AC.IL (Nir Friedman)
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: Profiling C++ programs.
Message-ID: <9104301527.AA02972@white.wisdom.weizmann.ac.il>
Date: 30 Apr 91 15:27:48 GMT
Sender: daemon@tut.cis.ohio-state.edu
Followup-To: gnu.g++.help
Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu
Lines: 19