Deleted Added
full compact
sdt_subr.c (256281) sdt_subr.c (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

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

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
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

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

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
24 */
25
26#pragma ident "%Z%%M% %I% %E% SMI"
27
28#include <sys/sdt_impl.h>
29
30static dtrace_pattr_t vtrace_attr = {
31{ DTRACE_STABILITY_UNSTABLE, DTRACE_STABILITY_UNSTABLE, DTRACE_CLASS_ISA },

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

80{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
81{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
82{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM },
83{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM },
84};
85
86sdt_provider_t sdt_providers[] = {
87 { "vtrace", "__vtrace_", &vtrace_attr, 0 },
25 */
26
27#pragma ident "%Z%%M% %I% %E% SMI"
28
29#include <sys/sdt_impl.h>
30
31static dtrace_pattr_t vtrace_attr = {
32{ DTRACE_STABILITY_UNSTABLE, DTRACE_STABILITY_UNSTABLE, DTRACE_CLASS_ISA },

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

81{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
82{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
83{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM },
84{ DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_PLATFORM },
85};
86
87sdt_provider_t sdt_providers[] = {
88 { "vtrace", "__vtrace_", &vtrace_attr, 0 },
88 { "sysinfo", "__cpu_sysinfo_", &info_attr, 0 },
89 { "vminfo", "__cpu_vminfo_", &info_attr, 0 },
89 { "sysinfo", "__cpu_sysinfo_", &info_attr, DTRACE_PRIV_USER },
90 { "vminfo", "__cpu_vminfo_", &info_attr, DTRACE_PRIV_USER },
90 { "fpuinfo", "__fpuinfo_", &fpu_attr, 0 },
91 { "fpuinfo", "__fpuinfo_", &fpu_attr, 0 },
91 { "sched", "__sched_", &stab_attr, 0 },
92 { "proc", "__proc_", &stab_attr, 0 },
92 { "sched", "__sched_", &stab_attr, DTRACE_PRIV_USER },
93 { "proc", "__proc_", &stab_attr, DTRACE_PRIV_USER },
93 { "io", "__io_", &stab_attr, 0 },
94 { "mib", "__mib_", &stab_attr, 0 },
95 { "fsinfo", "__fsinfo_", &fsinfo_attr, 0 },
96 { "nfsv3", "__nfsv3_", &stab_attr, 0 },
97 { "nfsv4", "__nfsv4_", &stab_attr, 0 },
98 { "xpv", "__xpv_", &xpv_attr, 0 },
99 { "sysevent", "__sysevent_", &stab_attr, 0 },
100 { "sdt", NULL, &sdt_attr, 0 },

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

847 { "xpv", "set-memory-map-start", 2, 2, "struct xen_memory_map *" },
848 { "xpv", "setvcpucontext-end", 0, 0, "int" },
849 { "xpv", "setvcpucontext-start", 0, 0, "domid_t" },
850 { "xpv", "setvcpucontext-start", 1, 1, "vcpu_guest_context_t *" },
851 { NULL }
852};
853
854/*ARGSUSED*/
94 { "io", "__io_", &stab_attr, 0 },
95 { "mib", "__mib_", &stab_attr, 0 },
96 { "fsinfo", "__fsinfo_", &fsinfo_attr, 0 },
97 { "nfsv3", "__nfsv3_", &stab_attr, 0 },
98 { "nfsv4", "__nfsv4_", &stab_attr, 0 },
99 { "xpv", "__xpv_", &xpv_attr, 0 },
100 { "sysevent", "__sysevent_", &stab_attr, 0 },
101 { "sdt", NULL, &sdt_attr, 0 },

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

848 { "xpv", "set-memory-map-start", 2, 2, "struct xen_memory_map *" },
849 { "xpv", "setvcpucontext-end", 0, 0, "int" },
850 { "xpv", "setvcpucontext-start", 0, 0, "domid_t" },
851 { "xpv", "setvcpucontext-start", 1, 1, "vcpu_guest_context_t *" },
852 { NULL }
853};
854
855/*ARGSUSED*/
856int
857sdt_mode(void *arg, dtrace_id_t id, void *parg)
858{
859 /*
860 * We tell DTrace that we're in kernel mode, that the firing needs to
861 * be dropped for anything that doesn't have necessary privileges, and
862 * that it needs to be restricted for anything that has restricted
863 * (i.e., not all-zone) privileges.
864 */
865 return (DTRACE_MODE_KERNEL | DTRACE_MODE_NOPRIV_DROP |
866 DTRACE_MODE_LIMITEDPRIV_RESTRICT);
867}
868
869/*ARGSUSED*/
855void
856sdt_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc)
857{
858 sdt_probe_t *sdp = parg;
859 int i;
860
861 desc->dtargd_native[0] = '\0';
862 desc->dtargd_xlate[0] = '\0';

--- 26 unchanged lines hidden ---
870void
871sdt_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc)
872{
873 sdt_probe_t *sdp = parg;
874 int i;
875
876 desc->dtargd_native[0] = '\0';
877 desc->dtargd_xlate[0] = '\0';

--- 26 unchanged lines hidden ---