opd_perfmon.h
Go to the documentation of this file.00001
00011 #ifndef OPD_PERFMON_H
00012 #define OPD_PERFMON_H
00013
00014 #ifdef __ia64__
00015
00016 #include <stdlib.h>
00017
00018 void perfmon_init(void);
00019 void perfmon_exit(void);
00020 void perfmon_start(void);
00021 void perfmon_stop(void);
00022
00023
00024
00025
00026
00027
00028 typedef unsigned char pfm_uuid_t[16];
00029
00030
00031
00032
00033 typedef struct {
00034 pfm_uuid_t ctx_smpl_buf_id;
00035 unsigned long ctx_flags;
00036 unsigned short ctx_nextra_sets;
00037 unsigned short ctx_reserved1;
00038 int ctx_fd;
00039 void *ctx_smpl_vaddr;
00040 unsigned long ctx_reserved2[11];
00041 } pfarg_context_t;
00042
00043
00044
00045
00046 typedef struct {
00047 unsigned int reg_num;
00048 unsigned short reg_set;
00049 unsigned short reg_reserved1;
00050
00051 unsigned long reg_value;
00052 unsigned long reg_flags;
00053
00054 unsigned long reg_long_reset;
00055 unsigned long reg_short_reset;
00056
00057 unsigned long reg_reset_pmds[4];
00058 unsigned long reg_random_seed;
00059 unsigned long reg_random_mask;
00060 unsigned long reg_last_reset_val;
00061
00062 unsigned long reg_smpl_pmds[4];
00063 unsigned long reg_smpl_eventid;
00064
00065 unsigned long reg_reserved2[3];
00066 } pfarg_reg_t;
00067
00068 typedef struct {
00069 pid_t load_pid;
00070 unsigned short load_set;
00071 unsigned short load_reserved1;
00072 unsigned long load_reserved2[3];
00073 } pfarg_load_t;
00074
00075 #define PFM_WRITE_PMCS 0x01
00076 #define PFM_WRITE_PMDS 0x02
00077 #define PFM_STOP 0x04
00078 #define PFM_START 0x05
00079 #define PFM_CREATE_CONTEXT 0x08
00080 #define PFM_LOAD_CONTEXT 0x10
00081 #define PFM_FL_SYSTEM_WIDE 0x02
00082
00083 #else
00084
00085 void perfmon_init(void)
00086 {
00087 }
00088
00089
00090 void perfmon_exit(void)
00091 {
00092 }
00093
00094
00095 void perfmon_start(void)
00096 {
00097 }
00098
00099
00100 void perfmon_stop(void)
00101 {
00102 }
00103
00104 #endif
00105
00106 #endif