PSPSDK 2024-12-24
Loading...
Searching...
No Matches
prof.c File Reference
#include <stdlib.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <pspprof.h>
#include <pspthreadman.h>
Include dependency graph for prof.c:

Data Structures

struct  gmonhdr
 gmon.out file header More...
 
struct  rawarc
 frompc -> selfpc graph More...
 
struct  gmonparam
 context More...
 

Macros

#define GMON_PROF_ON   0
 
#define GMON_PROF_BUSY   1
 
#define GMON_PROF_ERROR   2
 
#define GMON_PROF_OFF   3
 
#define GMONVERSION   0x00051879
 
#define HISTFRACTION   4
 one histogram per four bytes of text space
 
#define SAMPLE_FREQ   1000
 define sample frequency - 1000 hz = 1ms
 

Functions

 __attribute__ ((__no_instrument_function__, __no_profile_instrument_function__))
 Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a gmon.out file at cwd with all collected information.
 

Variables

int _ftext
 defined by linker
 
int _etext
 

Macro Definition Documentation

◆ GMON_PROF_BUSY

#define GMON_PROF_BUSY   1

◆ GMON_PROF_ERROR

#define GMON_PROF_ERROR   2

◆ GMON_PROF_OFF

#define GMON_PROF_OFF   3

◆ GMON_PROF_ON

#define GMON_PROF_ON   0

◆ GMONVERSION

#define GMONVERSION   0x00051879

◆ HISTFRACTION

#define HISTFRACTION   4

one histogram per four bytes of text space

◆ SAMPLE_FREQ

#define SAMPLE_FREQ   1000

define sample frequency - 1000 hz = 1ms

Function Documentation

◆ __attribute__()

Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a gmon.out file at cwd with all collected information.

Internal timer handler.

Internal C handler for _mcount()

Parameters
frompcpc address of caller
selfpcpc address of current function

Called from mcount.S to make life a bit easier. __mcount is called right before a function starts. GCC generates a tiny stub at the very beginning of each compiled routine, which eventually brings the control to here.

References gp.

Variable Documentation

◆ _etext

int _etext
extern

◆ _ftext

int _ftext
extern

defined by linker