Print this page
4471 DTrace count() with histogram
4472 DTrace full width distribution histograms
4473 DTrace frequency trails


 336 
 337 typedef struct dtrace_setoptdata {
 338         dtrace_hdl_t *dtsda_handle;             /* handle to DTrace library */
 339         const dtrace_probedata_t *dtsda_probe;  /* probe data */
 340         const char *dtsda_option;               /* option that was set */
 341         dtrace_optval_t dtsda_oldval;           /* old value */
 342         dtrace_optval_t dtsda_newval;           /* new value */
 343 } dtrace_setoptdata_t;
 344 
 345 typedef int dtrace_handle_setopt_f(const dtrace_setoptdata_t *, void *);
 346 extern int dtrace_handle_setopt(dtrace_hdl_t *,
 347     dtrace_handle_setopt_f *, void *);
 348 
 349 /*
 350  * DTrace Aggregate Interface
 351  */
 352 
 353 #define DTRACE_A_PERCPU         0x0001
 354 #define DTRACE_A_KEEPDELTA      0x0002
 355 #define DTRACE_A_ANONYMOUS      0x0004






 356 
 357 #define DTRACE_AGGWALK_ERROR            -1      /* error while processing */
 358 #define DTRACE_AGGWALK_NEXT             0       /* proceed to next element */
 359 #define DTRACE_AGGWALK_ABORT            1       /* abort aggregation walk */
 360 #define DTRACE_AGGWALK_CLEAR            2       /* clear this element */
 361 #define DTRACE_AGGWALK_NORMALIZE        3       /* normalize this element */
 362 #define DTRACE_AGGWALK_DENORMALIZE      4       /* denormalize this element */
 363 #define DTRACE_AGGWALK_REMOVE           5       /* remove this element */
 364 
 365 struct dtrace_aggdata {
 366         dtrace_hdl_t *dtada_handle;             /* handle to DTrace library */
 367         dtrace_aggdesc_t *dtada_desc;           /* aggregation description */
 368         dtrace_eprobedesc_t *dtada_edesc;       /* enabled probe description */
 369         dtrace_probedesc_t *dtada_pdesc;        /* probe description */
 370         caddr_t dtada_data;                     /* pointer to raw data */
 371         uint64_t dtada_normal;                  /* the normal -- 1 for denorm */
 372         size_t dtada_size;                      /* total size of the data */
 373         caddr_t dtada_delta;                    /* delta data, if available */
 374         caddr_t *dtada_percpu;                  /* per CPU data, if avail */
 375         caddr_t *dtada_percpu_delta;            /* per CPU delta, if avail */




 376 };
 377 
 378 typedef int dtrace_aggregate_f(const dtrace_aggdata_t *, void *);
 379 typedef int dtrace_aggregate_walk_f(dtrace_hdl_t *,
 380     dtrace_aggregate_f *, void *);
 381 typedef int dtrace_aggregate_walk_joined_f(const dtrace_aggdata_t **,
 382     const int, void *);
 383 
 384 extern void dtrace_aggregate_clear(dtrace_hdl_t *);
 385 extern int dtrace_aggregate_snap(dtrace_hdl_t *);
 386 extern int dtrace_aggregate_print(dtrace_hdl_t *, FILE *,
 387     dtrace_aggregate_walk_f *);
 388 
 389 extern int dtrace_aggregate_walk(dtrace_hdl_t *, dtrace_aggregate_f *, void *);
 390 
 391 extern int dtrace_aggregate_walk_joined(dtrace_hdl_t *,
 392     dtrace_aggvarid_t *, int, dtrace_aggregate_walk_joined_f *, void *);
 393 
 394 extern int dtrace_aggregate_walk_sorted(dtrace_hdl_t *,
 395     dtrace_aggregate_f *, void *);




 336 
 337 typedef struct dtrace_setoptdata {
 338         dtrace_hdl_t *dtsda_handle;             /* handle to DTrace library */
 339         const dtrace_probedata_t *dtsda_probe;  /* probe data */
 340         const char *dtsda_option;               /* option that was set */
 341         dtrace_optval_t dtsda_oldval;           /* old value */
 342         dtrace_optval_t dtsda_newval;           /* new value */
 343 } dtrace_setoptdata_t;
 344 
 345 typedef int dtrace_handle_setopt_f(const dtrace_setoptdata_t *, void *);
 346 extern int dtrace_handle_setopt(dtrace_hdl_t *,
 347     dtrace_handle_setopt_f *, void *);
 348 
 349 /*
 350  * DTrace Aggregate Interface
 351  */
 352 
 353 #define DTRACE_A_PERCPU         0x0001
 354 #define DTRACE_A_KEEPDELTA      0x0002
 355 #define DTRACE_A_ANONYMOUS      0x0004
 356 #define DTRACE_A_TOTAL          0x0008
 357 #define DTRACE_A_MINMAXBIN      0x0010
 358 #define DTRACE_A_HASNEGATIVES   0x0020
 359 #define DTRACE_A_HASPOSITIVES   0x0040
 360 
 361 #define DTRACE_AGGZOOM_MAX              0.95    /* height of max bar */
 362 
 363 #define DTRACE_AGGWALK_ERROR            -1      /* error while processing */
 364 #define DTRACE_AGGWALK_NEXT             0       /* proceed to next element */
 365 #define DTRACE_AGGWALK_ABORT            1       /* abort aggregation walk */
 366 #define DTRACE_AGGWALK_CLEAR            2       /* clear this element */
 367 #define DTRACE_AGGWALK_NORMALIZE        3       /* normalize this element */
 368 #define DTRACE_AGGWALK_DENORMALIZE      4       /* denormalize this element */
 369 #define DTRACE_AGGWALK_REMOVE           5       /* remove this element */
 370 
 371 struct dtrace_aggdata {
 372         dtrace_hdl_t *dtada_handle;             /* handle to DTrace library */
 373         dtrace_aggdesc_t *dtada_desc;           /* aggregation description */
 374         dtrace_eprobedesc_t *dtada_edesc;       /* enabled probe description */
 375         dtrace_probedesc_t *dtada_pdesc;        /* probe description */
 376         caddr_t dtada_data;                     /* pointer to raw data */
 377         uint64_t dtada_normal;                  /* the normal -- 1 for denorm */
 378         size_t dtada_size;                      /* total size of the data */
 379         caddr_t dtada_delta;                    /* delta data, if available */
 380         caddr_t *dtada_percpu;                  /* per CPU data, if avail */
 381         caddr_t *dtada_percpu_delta;            /* per CPU delta, if avail */
 382         int64_t dtada_total;                    /* per agg total, if avail */
 383         uint16_t dtada_minbin;                  /* minimum bin, if avail */
 384         uint16_t dtada_maxbin;                  /* maximum bin, if avail */
 385         uint32_t dtada_flags;                   /* flags */
 386 };
 387 
 388 typedef int dtrace_aggregate_f(const dtrace_aggdata_t *, void *);
 389 typedef int dtrace_aggregate_walk_f(dtrace_hdl_t *,
 390     dtrace_aggregate_f *, void *);
 391 typedef int dtrace_aggregate_walk_joined_f(const dtrace_aggdata_t **,
 392     const int, void *);
 393 
 394 extern void dtrace_aggregate_clear(dtrace_hdl_t *);
 395 extern int dtrace_aggregate_snap(dtrace_hdl_t *);
 396 extern int dtrace_aggregate_print(dtrace_hdl_t *, FILE *,
 397     dtrace_aggregate_walk_f *);
 398 
 399 extern int dtrace_aggregate_walk(dtrace_hdl_t *, dtrace_aggregate_f *, void *);
 400 
 401 extern int dtrace_aggregate_walk_joined(dtrace_hdl_t *,
 402     dtrace_aggvarid_t *, int, dtrace_aggregate_walk_joined_f *, void *);
 403 
 404 extern int dtrace_aggregate_walk_sorted(dtrace_hdl_t *,
 405     dtrace_aggregate_f *, void *);