PSPSDK 2025-04-22
|
#include <stdlib.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <pspprof.h>
#include <pspthreadman.h>
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 | |
void | __gprof_cleanup () |
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. | |
void | __mcount (unsigned int frompc, unsigned int selfpc) |
Internal C handler for _mcount() | |
void | gprof_start (void) |
Start the profiler. | |
void | gprof_stop (const char *filename, int should_dump) |
Stop the profiler. | |
Variables | |
int | _ftext |
defined by linker | |
int | _etext |
#define GMON_PROF_BUSY 1 |
#define GMON_PROF_ERROR 2 |
#define GMON_PROF_OFF 3 |
Referenced by gprof_stop().
#define GMON_PROF_ON 0 |
Referenced by __mcount(), gprof_start(), and gprof_stop().
#define GMONVERSION 0x00051879 |
Referenced by gprof_stop().
#define HISTFRACTION 4 |
one histogram per four bytes of text space
#define SAMPLE_FREQ 1000 |
define sample frequency - 1000 hz = 1ms
Referenced by gprof_stop().
void __gprof_cleanup | ( | void | ) |
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.
References gprof_stop().
void __mcount | ( | unsigned int | frompc, |
unsigned int | selfpc ) |
Internal C handler for _mcount()
frompc | pc address of caller |
selfpc | pc 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 rawarc::frompc, GMON_PROF_ON, gp, and rawarc::selfpc.
void gprof_start | ( | void | ) |
Start the profiler.
If the profiler is already running, this function stop previous one, and ignore the result. Finally, it initializes a new profiler session.
References GMON_PROF_ON, and gp.
void gprof_stop | ( | const char * | filename, |
int | should_dump ) |
Stop the profiler.
If the profiler is not running, this function does nothing.
filename | The name of the file to write the profiling data to. |
should_dump | If 1, the profiling data will be written to the file. If 0, the profiling data will be discarded. |
References fp, GMON_PROF_OFF, GMON_PROF_ON, GMONVERSION, gp, gmonhdr::hpc, gmonhdr::lpc, gmonhdr::ncnt, gmonhdr::profrate, gmonhdr::resv, SAMPLE_FREQ, sceKernelDeleteVTimer(), sceKernelStopVTimer(), and gmonhdr::version.
Referenced by __gprof_cleanup().
|
extern |
|
extern |
defined by linker