Bug 17812

Summary: gprof gives error:
Product: Base System Reporter: christor <christor>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description christor 2000-04-05 15:50:01 UTC
The gprof program seems to want to use an enormous amount of memory, even for very simple programs.

On my system at home (uname -a output: FreeBSD laptop.smurfy.net 3.3-RELEASE FreeBSD 3.3-RELEASE #5: Tue Mar 28 17:06:51 EST 2000     chris@laptop.smurfy.net:/usr/src/sys/compile/LAPTOP  i386) I get the output:

Killed

In addition, the output "swap_pager: out of swap space" is sent to the console.
---
On a FreeBSD system at school (uname -a output: FreeBSD public.ug.cs.sunysb.edu 3.2-RELEASE FreeBSD 3.2-RELEASE #1: Fri Aug 6 15:34:52 EDT 1999     root@:/A/src/sys/compile/PUBLIC  i386) gprof gives the output:

gprof: no room for 67268600 sample pc's

How-To-Repeat: Create a C program (hello.c):
int main(void){
  printf("hello world!\n);
}

Then compile it with:
$ gcc -pg -o hello hello.c

Then run:
gprof hello
Comment 1 dwmalone 2000-04-07 21:01:27 UTC
Gprof seems to work OK for me on 3.4-STABLE. I'd guess you have a
gmon.out file which is corrupt or for a different type of system.
For me it produced a file called hello.gmon, so I had to give this
on the command line.

	David.

182% cat hello.c
#include <stdio.h>

int main(void){
       printf("hello world!\n");
     }
183% gcc -pg -o hello hello.c
184% ls -l
total 55
-rwxr-xr-x  1 dwmalone  wheel  54638 Apr  7 20:55 hello
-rw-r--r--  1 dwmalone  wheel     76 Apr  7 20:53 hello.c
185% ./hello
hello world!
186% ls -l
total 74
-rwxr-xr-x  1 dwmalone  wheel  54638 Apr  7 20:55 hello
-rw-r--r--  1 dwmalone  wheel     76 Apr  7 20:53 hello.c
-rw-r--r--  1 dwmalone  wheel  18482 Apr  7 20:55 hello.gmon
187% gprof hello hello.gmon
<gmon output follows>
Comment 2 iedowse freebsd_committer freebsd_triage 2001-11-17 00:20:11 UTC
State Changed
From-To: open->feedback


Does this problem still exist on more recent releases?
Comment 3 iedowse freebsd_committer freebsd_triage 2001-11-17 00:49:56 UTC
State Changed
From-To: feedback->closed


Mail to submitter bounces, and I can't reproduce the problem.