Print this page
2916 DTrace in a zone should be able to access fds[]


 270 #define DIF_SUBR_DIRNAME                26
 271 #define DIF_SUBR_CLEANPATH              27
 272 #define DIF_SUBR_STRCHR                 28
 273 #define DIF_SUBR_STRRCHR                29
 274 #define DIF_SUBR_STRSTR                 30
 275 #define DIF_SUBR_STRTOK                 31
 276 #define DIF_SUBR_SUBSTR                 32
 277 #define DIF_SUBR_INDEX                  33
 278 #define DIF_SUBR_RINDEX                 34
 279 #define DIF_SUBR_HTONS                  35
 280 #define DIF_SUBR_HTONL                  36
 281 #define DIF_SUBR_HTONLL                 37
 282 #define DIF_SUBR_NTOHS                  38
 283 #define DIF_SUBR_NTOHL                  39
 284 #define DIF_SUBR_NTOHLL                 40
 285 #define DIF_SUBR_INET_NTOP              41
 286 #define DIF_SUBR_INET_NTOA              42
 287 #define DIF_SUBR_INET_NTOA6             43
 288 #define DIF_SUBR_TOUPPER                44
 289 #define DIF_SUBR_TOLOWER                45

 290 
 291 #define DIF_SUBR_MAX                    45      /* max subroutine value */
 292 
 293 typedef uint32_t dif_instr_t;
 294 
 295 #define DIF_INSTR_OP(i)                 (((i) >> 24) & 0xff)
 296 #define DIF_INSTR_R1(i)                 (((i) >> 16) & 0xff)
 297 #define DIF_INSTR_R2(i)                 (((i) >>  8) & 0xff)
 298 #define DIF_INSTR_RD(i)                 ((i) & 0xff)
 299 #define DIF_INSTR_RS(i)                 ((i) & 0xff)
 300 #define DIF_INSTR_LABEL(i)              ((i) & 0xffffff)
 301 #define DIF_INSTR_VAR(i)                (((i) >>  8) & 0xffff)
 302 #define DIF_INSTR_INTEGER(i)            (((i) >>  8) & 0xffff)
 303 #define DIF_INSTR_STRING(i)             (((i) >>  8) & 0xffff)
 304 #define DIF_INSTR_SUBR(i)               (((i) >>  8) & 0xffff)
 305 #define DIF_INSTR_TYPE(i)               (((i) >> 16) & 0xff)
 306 #define DIF_INSTR_XLREF(i)              (((i) >>  8) & 0xffff)
 307 
 308 #define DIF_INSTR_FMT(op, r1, r2, d) \
 309         (((op) << 24) | ((r1) << 16) | ((r2) << 8) | (d))
 310 
 311 #define DIF_INSTR_NOT(r1, d)            (DIF_INSTR_FMT(DIF_OP_NOT, r1, 0, d))


2226 extern void (*dtrace_fasttrap_exec_ptr)(proc_t *);
2227 extern void (*dtrace_fasttrap_exit_ptr)(proc_t *);
2228 extern void dtrace_fasttrap_fork(proc_t *, proc_t *);
2229 
2230 typedef uintptr_t dtrace_icookie_t;
2231 typedef void (*dtrace_xcall_t)(void *);
2232 
2233 extern dtrace_icookie_t dtrace_interrupt_disable(void);
2234 extern void dtrace_interrupt_enable(dtrace_icookie_t);
2235 
2236 extern void dtrace_membar_producer(void);
2237 extern void dtrace_membar_consumer(void);
2238 
2239 extern void (*dtrace_cpu_init)(processorid_t);
2240 extern void (*dtrace_modload)(struct modctl *);
2241 extern void (*dtrace_modunload)(struct modctl *);
2242 extern void (*dtrace_helpers_cleanup)();
2243 extern void (*dtrace_helpers_fork)(proc_t *parent, proc_t *child);
2244 extern void (*dtrace_cpustart_init)();
2245 extern void (*dtrace_cpustart_fini)();

2246 
2247 extern void (*dtrace_debugger_init)();
2248 extern void (*dtrace_debugger_fini)();
2249 extern dtrace_cacheid_t dtrace_predcache_id;
2250 
2251 extern hrtime_t dtrace_gethrtime(void);
2252 extern void dtrace_sync(void);
2253 extern void dtrace_toxic_ranges(void (*)(uintptr_t, uintptr_t));
2254 extern void dtrace_xcall(processorid_t, dtrace_xcall_t, void *);
2255 extern void dtrace_vpanic(const char *, __va_list);
2256 extern void dtrace_panic(const char *, ...);
2257 
2258 extern int dtrace_safe_defer_signal(void);
2259 extern void dtrace_safe_synchronous_signal(void);
2260 
2261 extern int dtrace_mach_aframes(void);
2262 
2263 #if defined(__i386) || defined(__amd64)
2264 extern int dtrace_instr_size(uchar_t *instr);
2265 extern int dtrace_instr_size_isa(uchar_t *, model_t, int *);




 270 #define DIF_SUBR_DIRNAME                26
 271 #define DIF_SUBR_CLEANPATH              27
 272 #define DIF_SUBR_STRCHR                 28
 273 #define DIF_SUBR_STRRCHR                29
 274 #define DIF_SUBR_STRSTR                 30
 275 #define DIF_SUBR_STRTOK                 31
 276 #define DIF_SUBR_SUBSTR                 32
 277 #define DIF_SUBR_INDEX                  33
 278 #define DIF_SUBR_RINDEX                 34
 279 #define DIF_SUBR_HTONS                  35
 280 #define DIF_SUBR_HTONL                  36
 281 #define DIF_SUBR_HTONLL                 37
 282 #define DIF_SUBR_NTOHS                  38
 283 #define DIF_SUBR_NTOHL                  39
 284 #define DIF_SUBR_NTOHLL                 40
 285 #define DIF_SUBR_INET_NTOP              41
 286 #define DIF_SUBR_INET_NTOA              42
 287 #define DIF_SUBR_INET_NTOA6             43
 288 #define DIF_SUBR_TOUPPER                44
 289 #define DIF_SUBR_TOLOWER                45
 290 #define DIF_SUBR_GETF                   46
 291 
 292 #define DIF_SUBR_MAX                    46      /* max subroutine value */
 293 
 294 typedef uint32_t dif_instr_t;
 295 
 296 #define DIF_INSTR_OP(i)                 (((i) >> 24) & 0xff)
 297 #define DIF_INSTR_R1(i)                 (((i) >> 16) & 0xff)
 298 #define DIF_INSTR_R2(i)                 (((i) >>  8) & 0xff)
 299 #define DIF_INSTR_RD(i)                 ((i) & 0xff)
 300 #define DIF_INSTR_RS(i)                 ((i) & 0xff)
 301 #define DIF_INSTR_LABEL(i)              ((i) & 0xffffff)
 302 #define DIF_INSTR_VAR(i)                (((i) >>  8) & 0xffff)
 303 #define DIF_INSTR_INTEGER(i)            (((i) >>  8) & 0xffff)
 304 #define DIF_INSTR_STRING(i)             (((i) >>  8) & 0xffff)
 305 #define DIF_INSTR_SUBR(i)               (((i) >>  8) & 0xffff)
 306 #define DIF_INSTR_TYPE(i)               (((i) >> 16) & 0xff)
 307 #define DIF_INSTR_XLREF(i)              (((i) >>  8) & 0xffff)
 308 
 309 #define DIF_INSTR_FMT(op, r1, r2, d) \
 310         (((op) << 24) | ((r1) << 16) | ((r2) << 8) | (d))
 311 
 312 #define DIF_INSTR_NOT(r1, d)            (DIF_INSTR_FMT(DIF_OP_NOT, r1, 0, d))


2227 extern void (*dtrace_fasttrap_exec_ptr)(proc_t *);
2228 extern void (*dtrace_fasttrap_exit_ptr)(proc_t *);
2229 extern void dtrace_fasttrap_fork(proc_t *, proc_t *);
2230 
2231 typedef uintptr_t dtrace_icookie_t;
2232 typedef void (*dtrace_xcall_t)(void *);
2233 
2234 extern dtrace_icookie_t dtrace_interrupt_disable(void);
2235 extern void dtrace_interrupt_enable(dtrace_icookie_t);
2236 
2237 extern void dtrace_membar_producer(void);
2238 extern void dtrace_membar_consumer(void);
2239 
2240 extern void (*dtrace_cpu_init)(processorid_t);
2241 extern void (*dtrace_modload)(struct modctl *);
2242 extern void (*dtrace_modunload)(struct modctl *);
2243 extern void (*dtrace_helpers_cleanup)();
2244 extern void (*dtrace_helpers_fork)(proc_t *parent, proc_t *child);
2245 extern void (*dtrace_cpustart_init)();
2246 extern void (*dtrace_cpustart_fini)();
2247 extern void (*dtrace_closef)();
2248 
2249 extern void (*dtrace_debugger_init)();
2250 extern void (*dtrace_debugger_fini)();
2251 extern dtrace_cacheid_t dtrace_predcache_id;
2252 
2253 extern hrtime_t dtrace_gethrtime(void);
2254 extern void dtrace_sync(void);
2255 extern void dtrace_toxic_ranges(void (*)(uintptr_t, uintptr_t));
2256 extern void dtrace_xcall(processorid_t, dtrace_xcall_t, void *);
2257 extern void dtrace_vpanic(const char *, __va_list);
2258 extern void dtrace_panic(const char *, ...);
2259 
2260 extern int dtrace_safe_defer_signal(void);
2261 extern void dtrace_safe_synchronous_signal(void);
2262 
2263 extern int dtrace_mach_aframes(void);
2264 
2265 #if defined(__i386) || defined(__amd64)
2266 extern int dtrace_instr_size(uchar_t *instr);
2267 extern int dtrace_instr_size_isa(uchar_t *, model_t, int *);