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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc1/] [or1ksim/] [profiler.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 632 ivang
/* profiler.h -- profiling utility
2 1748 jeremybenn
 
3 632 ivang
   Copyright (C) 2001 Marko Mlinar, markom@opencores.org
4 1748 jeremybenn
   Copyright (C) 2008 Embecosm Limited
5 632 ivang
 
6 1748 jeremybenn
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
7 632 ivang
 
8 1748 jeremybenn
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
9 632 ivang
 
10 1748 jeremybenn
   This program is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published by the Free
12
   Software Foundation; either version 3 of the License, or (at your option)
13
   any later version.
14 632 ivang
 
15 1748 jeremybenn
   This program is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
   more details.
19 632 ivang
 
20 1748 jeremybenn
   You should have received a copy of the GNU General Public License along
21
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22 632 ivang
 
23 1748 jeremybenn
/* This program is commented throughout in a fashion suitable for processing
24
   with Doxygen. */
25 632 ivang
 
26
 
27 1748 jeremybenn
#ifndef PROFILER__H
28
#define PROFILER__H
29 632 ivang
 
30 1748 jeremybenn
/*! Maximum number of functions that can be profiled */
31
#define MAX_FUNCS 1024
32 879 markom
 
33 1748 jeremybenn
/*! Data structure for information about functions */
34 879 markom
struct func_struct {
35 1748 jeremybenn
  unsigned int  addr;           /*!< Start address of function */
36
  char          name[33];       /*!< Name of the function */
37
  long          cum_cycles;     /*!< Total cycles spent in function */
38
  long          calls;          /*!< Calls to this function */
39 879 markom
};
40
 
41 1748 jeremybenn
/* Global data structures for external use */
42
extern struct func_struct  prof_func[MAX_FUNCS];
43
extern int                 prof_nfuncs;
44
extern int                 prof_cycles;
45 879 markom
 
46 1748 jeremybenn
/* Function prototypes for external use */
47
int   prof_acquire (const char *fprofname);
48
void  prof_set (int  _quiet,
49
                int  _cumulative);
50
int   main_profiler (int   argc,
51
                     char *argv[],
52
                     int   just_help);
53 879 markom
 
54 1748 jeremybenn
#endif  /* PROFILER__H */

powered by: WebSVN 2.1.0

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