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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdtrace/common/dt_impl.h
          +++ new/usr/src/lib/libdtrace/common/dt_impl.h
↓ open down ↓ 172 lines elided ↑ open up ↑
 173  173          processorid_t dtat_ncpu;        /* size of dtat_cpus array */
 174  174          processorid_t dtat_maxcpu;      /* maximum number of CPUs */
 175  175          dt_ahash_t dtat_hash;           /* aggregate hash table */
 176  176  } dt_aggregate_t;
 177  177  
 178  178  typedef struct dt_print_aggdata {
 179  179          dtrace_hdl_t *dtpa_dtp;         /* pointer to libdtrace handle */
 180  180          dtrace_aggvarid_t dtpa_id;      /* aggregation variable of interest */
 181  181          FILE *dtpa_fp;                  /* file pointer */
 182  182          int dtpa_allunprint;            /* print only unprinted aggregations */
      183 +        int dtpa_agghist;               /* print aggregation as histogram */
      184 +        int dtpa_agghisthdr;            /* aggregation histogram hdr printed */
      185 +        int dtpa_aggpack;               /* pack quantized aggregations */
 183  186  } dt_print_aggdata_t;
 184  187  
 185  188  typedef struct dt_dirpath {
 186  189          dt_list_t dir_list;             /* linked-list forward/back pointers */
 187  190          char *dir_path;                 /* directory pathname */
 188  191  } dt_dirpath_t;
 189  192  
 190  193  typedef struct dt_lib_depend {
 191  194          dt_list_t dtld_deplist;         /* linked-list forward/back pointers */
 192  195          char *dtld_library;             /* library name */
↓ open down ↓ 74 lines elided ↑ open up ↑
 267  270          processorid_t dt_beganon; /* CPU that executed BEGIN probe (if any) */
 268  271          processorid_t dt_endedon; /* CPU that executed END probe (if any) */
 269  272          uint_t dt_oflags;       /* dtrace open-time options (see dtrace.h) */
 270  273          uint_t dt_cflags;       /* dtrace compile-time options (see dtrace.h) */
 271  274          uint_t dt_dflags;       /* dtrace link-time options (see dtrace.h) */
 272  275          uint_t dt_prcmode;      /* dtrace process create mode (see dt_proc.h) */
 273  276          uint_t dt_linkmode;     /* dtrace symbol linking mode (see below) */
 274  277          uint_t dt_linktype;     /* dtrace link output file type (see below) */
 275  278          uint_t dt_xlatemode;    /* dtrace translator linking mode (see below) */
 276  279          uint_t dt_stdcmode;     /* dtrace stdc compatibility mode (see below) */
      280 +        uint_t dt_encoding;     /* dtrace output encoding (see below) */
 277  281          uint_t dt_treedump;     /* dtrace tree debug bitmap (see below) */
 278  282          uint64_t dt_options[DTRACEOPT_MAX]; /* dtrace run-time options */
 279  283          int dt_version;         /* library version requested by client */
 280  284          int dt_ctferr;          /* error resulting from last CTF failure */
 281  285          int dt_errno;           /* error resulting from last failed operation */
 282  286          int dt_fd;              /* file descriptor for dtrace pseudo-device */
 283  287          int dt_ftfd;            /* file descriptor for fasttrap pseudo-device */
 284  288          int dt_fterr;           /* saved errno from failed open of dt_ftfd */
 285  289          int dt_cdefs_fd;        /* file descriptor for C CTF debugging cache */
 286  290          int dt_ddefs_fd;        /* file descriptor for D CTF debugging cache */
↓ open down ↓ 63 lines elided ↑ open up ↑
 350  354  /*
 351  355   * Values for the dt_stdcmode property, which is used by the compiler when
 352  356   * running cpp to determine the presence and setting of the __STDC__ macro.
 353  357   */
 354  358  #define DT_STDC_XA      0       /* ISO C + K&R C compat w/o ISO: __STDC__=0 */
 355  359  #define DT_STDC_XC      1       /* Strict ISO C: __STDC__=1 */
 356  360  #define DT_STDC_XS      2       /* K&R C: __STDC__ not defined */
 357  361  #define DT_STDC_XT      3       /* ISO C + K&R C compat with ISO: __STDC__=0 */
 358  362  
 359  363  /*
      364 + * Values for the dt_encoding property, which is used to force a particular
      365 + * character encoding (overriding default behavior and/or automatic detection).
      366 + */
      367 +#define DT_ENCODING_UNSET       0
      368 +#define DT_ENCODING_ASCII       1
      369 +#define DT_ENCODING_UTF8        2
      370 +
      371 +/*
 360  372   * Macro to test whether a given pass bit is set in the dt_treedump bit-vector.
 361  373   * If the bit for pass 'p' is set, the D compiler displays the parse tree for
 362  374   * the program by printing it to stderr at the end of compiler pass 'p'.
 363  375   */
 364  376  #define DT_TREEDUMP_PASS(dtp, p)        ((dtp)->dt_treedump & (1 << ((p) - 1)))
 365  377  
 366  378  /*
 367  379   * Macros for accessing the cached CTF container and type ID for the common
 368  380   * types "int", "string", and <DYN>, which we need to use frequently in the D
 369  381   * compiler.  The DT_INT_* macro relies upon "int" being at index 0 in the
↓ open down ↓ 308 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX