2006-10-30 16:53:38 +01:00
|
|
|
#ifndef PROFILE_H
|
|
|
|
#define PROFILE_H
|
|
|
|
|
|
|
|
#include <minix/profile.h>
|
|
|
|
|
|
|
|
#if SPROFILE /* statistical profiling */
|
|
|
|
|
2010-09-23 12:49:45 +02:00
|
|
|
#include "arch_watchdog.h"
|
|
|
|
|
2010-09-23 12:49:48 +02:00
|
|
|
#define SAMPLE_BUFFER_SIZE (64 << 20)
|
|
|
|
EXTERN char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
|
|
|
|
|
2006-10-30 16:53:38 +01:00
|
|
|
EXTERN int sprofiling; /* whether profiling is running */
|
2010-09-23 12:49:45 +02:00
|
|
|
EXTERN int sprofiling_type; /* whether profiling is running */
|
2006-10-30 16:53:38 +01:00
|
|
|
EXTERN int sprof_mem_size; /* available user memory for data */
|
|
|
|
EXTERN struct sprof_info_s sprof_info; /* profiling info for user program */
|
2008-11-19 13:26:10 +01:00
|
|
|
EXTERN vir_bytes sprof_data_addr_vir; /* user address to write data */
|
|
|
|
EXTERN endpoint_t sprof_ep; /* user process */
|
2006-10-30 16:53:38 +01:00
|
|
|
|
2010-09-23 12:49:45 +02:00
|
|
|
_PROTOTYPE(void nmi_sprofile_handler, (struct nmi_frame * frame));
|
|
|
|
|
2006-10-30 16:53:38 +01:00
|
|
|
#endif /* SPROFILE */
|
|
|
|
|
|
|
|
|
|
|
|
EXTERN int cprof_mem_size; /* available user memory for data */
|
|
|
|
EXTERN struct cprof_info_s cprof_info; /* profiling info for user program */
|
|
|
|
EXTERN int cprof_procs_no; /* number of profiled processes */
|
|
|
|
EXTERN struct cprof_proc_info_s { /* info about profiled process */
|
2008-11-19 13:26:10 +01:00
|
|
|
endpoint_t endpt; /* endpoint */
|
2006-10-30 16:53:38 +01:00
|
|
|
char *name; /* name */
|
2008-11-19 13:26:10 +01:00
|
|
|
vir_bytes ctl_v; /* location of control struct */
|
|
|
|
vir_bytes buf_v; /* location of buffer */
|
2006-10-30 16:53:38 +01:00
|
|
|
int slots_used; /* table slots used */
|
|
|
|
} cprof_proc_info_inst;
|
|
|
|
EXTERN struct cprof_proc_info_s cprof_proc_info[NR_SYS_PROCS];
|
|
|
|
|
|
|
|
#endif /* PROFILE_H */
|
|
|
|
|