dumping profiling info in gmon.out file format

Ian Lance Taylor iant@google.com
Wed May 16 02:07:00 GMT 2007


"Mohamed Shafi" <shafitvm@gmail.com> writes:

> gmon.out file is created in mcleanup function.This function however
> doesn't dump the data in the grof gmon.out data format. When i looked
> into the code for i386 and sparc in the backend nothing has been done
> to store the profiling info the required format. How is it that the
> file thus created is recognized by gprof? Or am i missing something?

Assuming you are referring to gcc/config/{i386,sparc}/gmon-sol2.c,
that code is only used on Solaris, not on other operating systems.
Are you using Solaris?

On GNU/Linux gmon.out is generated by code in glibc, not gcc.  The
glibc code is in gmon/gmon.c in the glibc sources.

Ian



More information about the Gcc mailing list