907
908 typedef struct dtrace_mstate {
909 uintptr_t dtms_scratch_base; /* base of scratch space */
910 uintptr_t dtms_scratch_ptr; /* current scratch pointer */
911 size_t dtms_scratch_size; /* scratch size */
912 uint32_t dtms_present; /* variables that are present */
913 uint64_t dtms_arg[5]; /* cached arguments */
914 dtrace_epid_t dtms_epid; /* current EPID */
915 uint64_t dtms_timestamp; /* cached timestamp */
916 hrtime_t dtms_walltimestamp; /* cached wall timestamp */
917 int dtms_stackdepth; /* cached stackdepth */
918 int dtms_ustackdepth; /* cached ustackdepth */
919 struct dtrace_probe *dtms_probe; /* current probe */
920 uintptr_t dtms_caller; /* cached caller */
921 uint64_t dtms_ucaller; /* cached user-level caller */
922 int dtms_ipl; /* cached interrupt pri lev */
923 int dtms_fltoffs; /* faulting DIFO offset */
924 uintptr_t dtms_strtok; /* saved strtok() pointer */
925 uint32_t dtms_access; /* memory access rights */
926 dtrace_difo_t *dtms_difo; /* current dif object */
927 } dtrace_mstate_t;
928
929 #define DTRACE_COND_OWNER 0x1
930 #define DTRACE_COND_USERMODE 0x2
931 #define DTRACE_COND_ZONEOWNER 0x4
932
933 #define DTRACE_PROBEKEY_MAXDEPTH 8 /* max glob recursion depth */
934
935 /*
936 * Access flag used by dtrace_mstate.dtms_access.
937 */
938 #define DTRACE_ACCESS_KERNEL 0x1 /* the priv to read kmem */
939 #define DTRACE_ACCESS_PROC 0x2 /* the priv for proc state */
940 #define DTRACE_ACCESS_ARGS 0x4 /* the priv to examine args */
941
942 /*
943 * DTrace Activity
944 *
945 * Each DTrace consumer is in one of several states, which (for purposes of
946 * avoiding yet-another overloading of the noun "state") we call the current
1127 int dts_naggregations; /* number of aggregations */
1128 dtrace_aggregation_t **dts_aggregations; /* aggregation array */
1129 vmem_t *dts_aggid_arena; /* arena for aggregation IDs */
1130 uint64_t dts_errors; /* total number of errors */
1131 uint32_t dts_speculations_busy; /* number of spec. busy */
1132 uint32_t dts_speculations_unavail; /* number of spec unavail */
1133 uint32_t dts_stkstroverflows; /* stack string tab overflows */
1134 uint32_t dts_dblerrors; /* errors in ERROR probes */
1135 uint32_t dts_reserve; /* space reserved for END */
1136 hrtime_t dts_laststatus; /* time of last status */
1137 cyclic_id_t dts_cleaner; /* cleaning cyclic */
1138 cyclic_id_t dts_deadman; /* deadman cyclic */
1139 hrtime_t dts_alive; /* time last alive */
1140 char dts_speculates; /* boolean: has speculations */
1141 char dts_destructive; /* boolean: has dest. actions */
1142 int dts_nformats; /* number of formats */
1143 char **dts_formats; /* format string array */
1144 dtrace_optval_t dts_options[DTRACEOPT_MAX]; /* options */
1145 dtrace_cred_t dts_cred; /* credentials */
1146 size_t dts_nretained; /* number of retained enabs */
1147 };
1148
1149 struct dtrace_provider {
1150 dtrace_pattr_t dtpv_attr; /* provider attributes */
1151 dtrace_ppriv_t dtpv_priv; /* provider privileges */
1152 dtrace_pops_t dtpv_pops; /* provider operations */
1153 char *dtpv_name; /* provider name */
1154 void *dtpv_arg; /* provider argument */
1155 hrtime_t dtpv_defunct; /* when made defunct */
1156 struct dtrace_provider *dtpv_next; /* next provider */
1157 };
1158
1159 struct dtrace_meta {
1160 dtrace_mops_t dtm_mops; /* meta provider operations */
1161 char *dtm_name; /* meta provider name */
1162 void *dtm_arg; /* meta provider user arg */
1163 uint64_t dtm_count; /* no. of associated provs. */
1164 };
1165
1166 /*
|
907
908 typedef struct dtrace_mstate {
909 uintptr_t dtms_scratch_base; /* base of scratch space */
910 uintptr_t dtms_scratch_ptr; /* current scratch pointer */
911 size_t dtms_scratch_size; /* scratch size */
912 uint32_t dtms_present; /* variables that are present */
913 uint64_t dtms_arg[5]; /* cached arguments */
914 dtrace_epid_t dtms_epid; /* current EPID */
915 uint64_t dtms_timestamp; /* cached timestamp */
916 hrtime_t dtms_walltimestamp; /* cached wall timestamp */
917 int dtms_stackdepth; /* cached stackdepth */
918 int dtms_ustackdepth; /* cached ustackdepth */
919 struct dtrace_probe *dtms_probe; /* current probe */
920 uintptr_t dtms_caller; /* cached caller */
921 uint64_t dtms_ucaller; /* cached user-level caller */
922 int dtms_ipl; /* cached interrupt pri lev */
923 int dtms_fltoffs; /* faulting DIFO offset */
924 uintptr_t dtms_strtok; /* saved strtok() pointer */
925 uint32_t dtms_access; /* memory access rights */
926 dtrace_difo_t *dtms_difo; /* current dif object */
927 file_t *dtms_getf; /* cached rval of getf() */
928 } dtrace_mstate_t;
929
930 #define DTRACE_COND_OWNER 0x1
931 #define DTRACE_COND_USERMODE 0x2
932 #define DTRACE_COND_ZONEOWNER 0x4
933
934 #define DTRACE_PROBEKEY_MAXDEPTH 8 /* max glob recursion depth */
935
936 /*
937 * Access flag used by dtrace_mstate.dtms_access.
938 */
939 #define DTRACE_ACCESS_KERNEL 0x1 /* the priv to read kmem */
940 #define DTRACE_ACCESS_PROC 0x2 /* the priv for proc state */
941 #define DTRACE_ACCESS_ARGS 0x4 /* the priv to examine args */
942
943 /*
944 * DTrace Activity
945 *
946 * Each DTrace consumer is in one of several states, which (for purposes of
947 * avoiding yet-another overloading of the noun "state") we call the current
1128 int dts_naggregations; /* number of aggregations */
1129 dtrace_aggregation_t **dts_aggregations; /* aggregation array */
1130 vmem_t *dts_aggid_arena; /* arena for aggregation IDs */
1131 uint64_t dts_errors; /* total number of errors */
1132 uint32_t dts_speculations_busy; /* number of spec. busy */
1133 uint32_t dts_speculations_unavail; /* number of spec unavail */
1134 uint32_t dts_stkstroverflows; /* stack string tab overflows */
1135 uint32_t dts_dblerrors; /* errors in ERROR probes */
1136 uint32_t dts_reserve; /* space reserved for END */
1137 hrtime_t dts_laststatus; /* time of last status */
1138 cyclic_id_t dts_cleaner; /* cleaning cyclic */
1139 cyclic_id_t dts_deadman; /* deadman cyclic */
1140 hrtime_t dts_alive; /* time last alive */
1141 char dts_speculates; /* boolean: has speculations */
1142 char dts_destructive; /* boolean: has dest. actions */
1143 int dts_nformats; /* number of formats */
1144 char **dts_formats; /* format string array */
1145 dtrace_optval_t dts_options[DTRACEOPT_MAX]; /* options */
1146 dtrace_cred_t dts_cred; /* credentials */
1147 size_t dts_nretained; /* number of retained enabs */
1148 int dts_getf; /* number of getf() calls */
1149 };
1150
1151 struct dtrace_provider {
1152 dtrace_pattr_t dtpv_attr; /* provider attributes */
1153 dtrace_ppriv_t dtpv_priv; /* provider privileges */
1154 dtrace_pops_t dtpv_pops; /* provider operations */
1155 char *dtpv_name; /* provider name */
1156 void *dtpv_arg; /* provider argument */
1157 hrtime_t dtpv_defunct; /* when made defunct */
1158 struct dtrace_provider *dtpv_next; /* next provider */
1159 };
1160
1161 struct dtrace_meta {
1162 dtrace_mops_t dtm_mops; /* meta provider operations */
1163 char *dtm_name; /* meta provider name */
1164 void *dtm_arg; /* meta provider user arg */
1165 uint64_t dtm_count; /* no. of associated provs. */
1166 };
1167
1168 /*
|