OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_62/] [or1ksim/] [profiler.h] - Diff between revs 847 and 879

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 847 Rev 879
Line 27... Line 27...
#define MAX_FUNCS 1024
#define MAX_FUNCS 1024
 
 
#define PROF_CUMULATIVE 0x01
#define PROF_CUMULATIVE 0x01
#define PROF_QUIET      0x02
#define PROF_QUIET      0x02
 
 
 
struct stack_struct {
 
  /* Function address */
 
  unsigned int addr;
 
 
 
  /* Cycles of function start; cycles of subfunctions are added later */
 
  unsigned int cycles;
 
 
 
  /* Return address */
 
  unsigned int raddr;
 
 
 
  /* Name of the function */
 
  char name[33];
 
};
 
 
 
struct func_struct {
 
  /* Start address of function */
 
  unsigned int addr;
 
 
 
  /* Name of the function */
 
  char name[33];
 
 
 
  /* Total cycles spent in function */
 
  long cum_cycles;
 
 
 
  /* Calls to this function */
 
  long calls;
 
};
 
 
 
extern struct func_struct prof_func[MAX_FUNCS];
 
 
 
/* Total number of functions */
 
extern int prof_nfuncs;
 
extern int prof_cycles;
 
 
 
/* Print out command line help */
 
void prof_help ();
 
 
 
/* Acquire data from profiler file */
 
int prof_acquire (char *fprofname);
 
 
 
/* Print out profiling data */
 
void prof_print ();
 
 
 
/* Set options */
 
void prof_set (int _quiet, int _cumulative);
 
 
int main_profiler (int argc, char *argv[]);
int main_profiler (int argc, char *argv[]);
#endif /* not __PROFILER_H */
#endif /* not __PROFILER_H */
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.