Deleted Added
full compact
dtrace.h (256281) dtrace.h (268578)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 11 unchanged lines hidden (view full) ---

20 */
21
22/*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 11 unchanged lines hidden (view full) ---

20 */
21
22/*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*
28 * Copyright (c) 2011, Joyent, Inc. All rights reserved.
28 * Copyright (c) 2013 by Delphix. All rights reserved.
29 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
29 */
30
31#ifndef _DTRACE_H
32#define _DTRACE_H
33
34#include <sys/dtrace.h>
35#include <stdarg.h>
36#include <stdio.h>

--- 314 unchanged lines hidden (view full) ---

351
352/*
353 * DTrace Aggregate Interface
354 */
355
356#define DTRACE_A_PERCPU 0x0001
357#define DTRACE_A_KEEPDELTA 0x0002
358#define DTRACE_A_ANONYMOUS 0x0004
30 */
31
32#ifndef _DTRACE_H
33#define _DTRACE_H
34
35#include <sys/dtrace.h>
36#include <stdarg.h>
37#include <stdio.h>

--- 314 unchanged lines hidden (view full) ---

352
353/*
354 * DTrace Aggregate Interface
355 */
356
357#define DTRACE_A_PERCPU 0x0001
358#define DTRACE_A_KEEPDELTA 0x0002
359#define DTRACE_A_ANONYMOUS 0x0004
360#define DTRACE_A_TOTAL 0x0008
361#define DTRACE_A_MINMAXBIN 0x0010
362#define DTRACE_A_HASNEGATIVES 0x0020
363#define DTRACE_A_HASPOSITIVES 0x0040
359
364
365#define DTRACE_AGGZOOM_MAX 0.95 /* height of max bar */
366
360#define DTRACE_AGGWALK_ERROR -1 /* error while processing */
361#define DTRACE_AGGWALK_NEXT 0 /* proceed to next element */
362#define DTRACE_AGGWALK_ABORT 1 /* abort aggregation walk */
363#define DTRACE_AGGWALK_CLEAR 2 /* clear this element */
364#define DTRACE_AGGWALK_NORMALIZE 3 /* normalize this element */
365#define DTRACE_AGGWALK_DENORMALIZE 4 /* denormalize this element */
366#define DTRACE_AGGWALK_REMOVE 5 /* remove this element */
367
368struct dtrace_aggdata {
369 dtrace_hdl_t *dtada_handle; /* handle to DTrace library */
370 dtrace_aggdesc_t *dtada_desc; /* aggregation description */
371 dtrace_eprobedesc_t *dtada_edesc; /* enabled probe description */
372 dtrace_probedesc_t *dtada_pdesc; /* probe description */
373 caddr_t dtada_data; /* pointer to raw data */
374 uint64_t dtada_normal; /* the normal -- 1 for denorm */
375 size_t dtada_size; /* total size of the data */
376 caddr_t dtada_delta; /* delta data, if available */
377 caddr_t *dtada_percpu; /* per CPU data, if avail */
378 caddr_t *dtada_percpu_delta; /* per CPU delta, if avail */
367#define DTRACE_AGGWALK_ERROR -1 /* error while processing */
368#define DTRACE_AGGWALK_NEXT 0 /* proceed to next element */
369#define DTRACE_AGGWALK_ABORT 1 /* abort aggregation walk */
370#define DTRACE_AGGWALK_CLEAR 2 /* clear this element */
371#define DTRACE_AGGWALK_NORMALIZE 3 /* normalize this element */
372#define DTRACE_AGGWALK_DENORMALIZE 4 /* denormalize this element */
373#define DTRACE_AGGWALK_REMOVE 5 /* remove this element */
374
375struct dtrace_aggdata {
376 dtrace_hdl_t *dtada_handle; /* handle to DTrace library */
377 dtrace_aggdesc_t *dtada_desc; /* aggregation description */
378 dtrace_eprobedesc_t *dtada_edesc; /* enabled probe description */
379 dtrace_probedesc_t *dtada_pdesc; /* probe description */
380 caddr_t dtada_data; /* pointer to raw data */
381 uint64_t dtada_normal; /* the normal -- 1 for denorm */
382 size_t dtada_size; /* total size of the data */
383 caddr_t dtada_delta; /* delta data, if available */
384 caddr_t *dtada_percpu; /* per CPU data, if avail */
385 caddr_t *dtada_percpu_delta; /* per CPU delta, if avail */
386 int64_t dtada_total; /* per agg total, if avail */
387 uint16_t dtada_minbin; /* minimum bin, if avail */
388 uint16_t dtada_maxbin; /* maximum bin, if avail */
389 uint32_t dtada_flags; /* flags */
379};
380
381typedef int dtrace_aggregate_f(const dtrace_aggdata_t *, void *);
382typedef int dtrace_aggregate_walk_f(dtrace_hdl_t *,
383 dtrace_aggregate_f *, void *);
384typedef int dtrace_aggregate_walk_joined_f(const dtrace_aggdata_t **,
385 const int, void *);
386

--- 103 unchanged lines hidden (view full) ---

490
491extern int dtrace_lookup_by_addr(dtrace_hdl_t *, GElf_Addr addr,
492 GElf_Sym *, dtrace_syminfo_t *);
493
494typedef struct dtrace_typeinfo {
495 const char *dtt_object; /* object containing type */
496 ctf_file_t *dtt_ctfp; /* CTF container handle */
497 ctf_id_t dtt_type; /* CTF type identifier */
390};
391
392typedef int dtrace_aggregate_f(const dtrace_aggdata_t *, void *);
393typedef int dtrace_aggregate_walk_f(dtrace_hdl_t *,
394 dtrace_aggregate_f *, void *);
395typedef int dtrace_aggregate_walk_joined_f(const dtrace_aggdata_t **,
396 const int, void *);
397

--- 103 unchanged lines hidden (view full) ---

501
502extern int dtrace_lookup_by_addr(dtrace_hdl_t *, GElf_Addr addr,
503 GElf_Sym *, dtrace_syminfo_t *);
504
505typedef struct dtrace_typeinfo {
506 const char *dtt_object; /* object containing type */
507 ctf_file_t *dtt_ctfp; /* CTF container handle */
508 ctf_id_t dtt_type; /* CTF type identifier */
509 uint_t dtt_flags; /* Misc. flags */
498} dtrace_typeinfo_t;
499
510} dtrace_typeinfo_t;
511
512#define DTT_FL_USER 0x1 /* user type */
513
500extern int dtrace_lookup_by_type(dtrace_hdl_t *, const char *, const char *,
501 dtrace_typeinfo_t *);
502
503extern int dtrace_symbol_type(dtrace_hdl_t *, const GElf_Sym *,
504 const dtrace_syminfo_t *, dtrace_typeinfo_t *);
505
506extern int dtrace_type_strcompile(dtrace_hdl_t *,
507 const char *, dtrace_typeinfo_t *);

--- 92 unchanged lines hidden ---
514extern int dtrace_lookup_by_type(dtrace_hdl_t *, const char *, const char *,
515 dtrace_typeinfo_t *);
516
517extern int dtrace_symbol_type(dtrace_hdl_t *, const GElf_Sym *,
518 const dtrace_syminfo_t *, dtrace_typeinfo_t *);
519
520extern int dtrace_type_strcompile(dtrace_hdl_t *,
521 const char *, dtrace_typeinfo_t *);

--- 92 unchanged lines hidden ---