retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
#include <minix/u64.h>
|
||||
#include <minix/minlib.h>
|
||||
|
||||
PRIVATE char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */
|
||||
PRIVATE int cpath_len; /* current call path len */
|
||||
PRIVATE struct cprof_tbl_s *cprof_slot; /* slot of current function */
|
||||
static char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */
|
||||
static int cpath_len; /* current call path len */
|
||||
static struct cprof_tbl_s *cprof_slot; /* slot of current function */
|
||||
struct stack_s { /* stack entry */
|
||||
int cpath_len; /* call path len */
|
||||
struct cprof_tbl_s *slot; /* table slot */
|
||||
@@ -30,22 +30,22 @@ struct stack_s { /* stack entry */
|
||||
u64_t start_2; /* count @ end of procentry */
|
||||
u64_t spent_deeper; /* spent in called functions */
|
||||
};
|
||||
PRIVATE struct stack_s cprof_stk[CPROF_STACK_SIZE]; /* stack */
|
||||
PRIVATE int cprof_stk_top; /* top of stack */
|
||||
static struct stack_s cprof_stk[CPROF_STACK_SIZE]; /* stack */
|
||||
static int cprof_stk_top; /* top of stack */
|
||||
EXTERN struct cprof_tbl_s cprof_tbl[]; /* hash table */
|
||||
PRIVATE int cprof_tbl_size; /* nr of slots */
|
||||
PRIVATE struct cprof_tbl_s *idx[CPROF_INDEX_SIZE]; /* index to table */
|
||||
PRIVATE struct cprof_ctl_s control; /* for comms with kernel */
|
||||
PRIVATE int cprof_announce; /* announce on n-th execution
|
||||
static int cprof_tbl_size; /* nr of slots */
|
||||
static struct cprof_tbl_s *idx[CPROF_INDEX_SIZE]; /* index to table */
|
||||
static struct cprof_ctl_s control; /* for comms with kernel */
|
||||
static int cprof_announce; /* announce on n-th execution
|
||||
* of procentry */
|
||||
PRIVATE int cprof_locked; /* for reentrancy */
|
||||
static int cprof_locked; /* for reentrancy */
|
||||
|
||||
FORWARD void cprof_init(void);
|
||||
FORWARD void reset(void);
|
||||
FORWARD void clear_tbl(void);
|
||||
static void cprof_init(void);
|
||||
static void reset(void);
|
||||
static void clear_tbl(void);
|
||||
|
||||
|
||||
PUBLIC void procentry (char *name)
|
||||
void procentry (char *name)
|
||||
{
|
||||
static int init = 0;
|
||||
unsigned hash = 0, x = 0;
|
||||
@@ -168,7 +168,7 @@ PUBLIC void procentry (char *name)
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void procexit (char *UNUSED(name))
|
||||
void procexit (char *UNUSED(name))
|
||||
{
|
||||
u64_t stop, spent;
|
||||
u32_t tsc_lo, tsc_hi;
|
||||
@@ -226,7 +226,7 @@ PUBLIC void procexit (char *UNUSED(name))
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void cprof_init()
|
||||
static void cprof_init()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -249,14 +249,14 @@ PRIVATE void cprof_init()
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void reset()
|
||||
static void reset()
|
||||
{
|
||||
clear_tbl();
|
||||
control.reset = 0;
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void clear_tbl()
|
||||
static void clear_tbl()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user