Back to index

glibc  2.9
Defines | Functions | Variables
gmon-start.c File Reference
#include <sys/types.h>
#include <sys/gmon.h>
#include <stdlib.h>
#include <unistd.h>
#include <entry.h>

Go to the source code of this file.

Defines

#define __ASSEMBLY__
#define TEXT_START   &ENTRY_POINT

Functions

void __gmon_start__ (void)

Variables

void ENTRY_POINT
void etext

Define Documentation

#define __ASSEMBLY__

Definition at line 24 of file gmon-start.c.

#define TEXT_START   &ENTRY_POINT

Definition at line 42 of file gmon-start.c.


Function Documentation

void __gmon_start__ ( void  )

Definition at line 51 of file gmon-start.c.

{
#ifdef HAVE_INITFINI
  /* Protect from being called more than once.  Since crti.o is linked
     into every shared library, each of their init functions will call us.  */
  static int called;

  if (called)
    return;

  called = 1;
#endif

  /* Start keeping profiling records.  */
  __monstartup ((u_long) TEXT_START, (u_long) &etext);

  /* Call _mcleanup before exiting; it will write out gmon.out from the
     collected data.  */
  atexit (&_mcleanup);
}

Here is the caller graph for this function:


Variable Documentation

void etext