From e1744f50ee9bc1978d41db7cc93bcf30687853e6 Mon Sep 17 00:00:00 2001 From: Tomas Jedlicka Date: Tue, 1 Aug 2017 09:15:44 -0400 Subject: [PATCH] dtrace: Integrate DTrace Modules into kernel proper This changeset integrates DTrace module sources into the main kernel source tree under the GPLv2 license. Sources have been moved to appropriate locations in the kernel tree. In addition a new RPM package is introduced: kernel-headers-dtrace. This package is responsible for installation of DTrace related header files for its userspace component. Orabug: 26585689 Signed-off-by: Tomas Jedlicka Signed-off-by: David Mc Lean Reviewed-by: Kris Van Hees --- Makefile | 12 +- arch/sparc/dtrace/Makefile.arch | 17 + .../sparc/dtrace}/dtrace_asm_sparc64.S | 29 +- .../sparc/dtrace}/dtrace_isa_sparc64.c | 29 +- .../sparc/dtrace}/fasttrap_sparc64.c | 30 +- {dtrace => arch/sparc/dtrace}/fbt_sparc64.c | 29 +- .../dtrace/include/dtrace/fasttrap_arch.h | 27 ++ .../sparc/dtrace/include}/dtrace/fbt_arch.h | 43 +-- .../sparc/dtrace/include}/dtrace/isa_arch.h | 35 +- arch/sparc/dtrace/include/dtrace/mod_arch.h | 38 +++ arch/sparc/dtrace/include/dtrace/sdt_arch.h | 27 ++ {dtrace => arch/sparc/dtrace}/sdt_sparc64.c | 29 +- arch/x86/dtrace/Makefile.arch | 17 + .../x86/dtrace}/dtrace_asm_x86_64.S | 29 +- .../x86/dtrace}/dtrace_isa_x86_64.c | 30 +- {dtrace => arch/x86/dtrace}/fasttrap_x86_64.c | 30 +- {dtrace => arch/x86/dtrace}/fbt_x86_64.c | 29 +- .../x86/dtrace/include/dtrace/fasttrap_arch.h | 27 ++ .../x86/dtrace/include}/dtrace/fbt_arch.h | 43 +-- arch/x86/dtrace/include/dtrace/mod_arch.h | 36 +++ arch/x86/dtrace/include/dtrace/sdt_arch.h | 27 ++ {dtrace => arch/x86/dtrace}/sdt_x86_64.c | 30 +- dtrace/Kbuild | 54 ---- dtrace/Makefile | 55 ++-- dtrace/ctf_api.h | 16 + dtrace/dt_perf.h | 29 +- dtrace/dt_perf_dev.c | 30 +- dtrace/dt_perf_mod.c | 32 +- dtrace/dt_test.h | 30 +- dtrace/dt_test_dev.c | 30 +- dtrace/dt_test_mod.c | 31 +- dtrace/dtrace-module.spec | 300 ------------------ dtrace/dtrace.h | 16 + dtrace/dtrace_actdesc.c | 30 +- dtrace/dtrace_anon.c | 30 +- dtrace/dtrace_buffer.c | 30 +- dtrace/dtrace_debug.h | 16 + dtrace/dtrace_dev.c | 60 ++-- dtrace/dtrace_dev.h | 16 + dtrace/dtrace_dif.c | 29 +- dtrace/dtrace_dof.c | 30 +- dtrace/dtrace_ecb.c | 30 +- dtrace/dtrace_enable.c | 30 +- dtrace/dtrace_fmt.c | 30 +- dtrace/dtrace_hash.c | 30 +- dtrace/dtrace_isa.c | 30 +- dtrace/dtrace_match.c | 30 +- dtrace/dtrace_mod.c | 32 +- dtrace/dtrace_predicate.c | 30 +- dtrace/dtrace_priv.c | 30 +- dtrace/dtrace_probe.c | 30 +- dtrace/dtrace_probe_ctx.c | 30 +- dtrace/dtrace_ptofapi.c | 29 +- dtrace/dtrace_spec.c | 30 +- dtrace/dtrace_state.c | 30 +- dtrace/dtrace_util.c | 30 +- dtrace/fasttrap_dev.c | 29 +- dtrace/fasttrap_impl.h | 16 + dtrace/fasttrap_mod.c | 32 +- dtrace/fbt_dev.c | 29 +- dtrace/fbt_impl.h | 16 + dtrace/fbt_mod.c | 31 +- dtrace/include/dtrace/provider_defines.h | 51 --- dtrace/include/sparc64/dtrace/fasttrap_arch.h | 37 --- dtrace/include/sparc64/dtrace/mod_arch.h | 46 --- dtrace/include/sparc64/dtrace/sdt_arch.h | 37 --- dtrace/include/uapi/linux/dtrace/actions.h | 30 -- .../include/uapi/linux/dtrace/arg_defines.h | 39 --- .../uapi/linux/dtrace/buffer_defines.h | 39 --- dtrace/include/uapi/linux/dtrace/conf.h | 53 ---- .../include/uapi/linux/dtrace/conf_defines.h | 39 --- .../include/uapi/linux/dtrace/difo_defines.h | 39 --- dtrace/include/uapi/linux/dtrace/dtrace.h | 59 ---- .../uapi/linux/dtrace/enabling_defines.h | 43 --- .../uapi/linux/dtrace/fasttrap_defines.h | 41 --- .../uapi/linux/dtrace/fasttrap_ioctl.h | 37 --- dtrace/include/uapi/linux/dtrace/faults.h | 38 --- .../uapi/linux/dtrace/helpers_defines.h | 39 --- .../include/uapi/linux/dtrace/ioctl_debug.h | 50 --- .../uapi/linux/dtrace/metadesc_defines.h | 42 --- dtrace/include/uapi/linux/dtrace/options.h | 38 --- dtrace/include/x86_64/dtrace/fasttrap_arch.h | 37 --- dtrace/include/x86_64/dtrace/mod_arch.h | 44 --- dtrace/include/x86_64/dtrace/sdt_arch.h | 37 --- dtrace/profile.h | 16 + dtrace/profile_dev.c | 30 +- dtrace/profile_mod.c | 31 +- dtrace/sdt_dev.c | 29 +- dtrace/sdt_impl.h | 16 + dtrace/sdt_mod.c | 32 +- dtrace/systrace.h | 27 +- dtrace/systrace_dev.c | 30 +- dtrace/systrace_mod.c | 31 +- .../include => include}/dtrace/dtrace_impl.h | 46 ++- .../dtrace/dtrace_impl_defines.h | 46 ++- {dtrace/include => include}/dtrace/provider.h | 43 +-- include/dtrace/provider_defines.h | 41 +++ {dtrace/include => include}/dtrace/types.h | 46 ++- include/linux/dtrace/cpu_defines.h | 62 ++++ include/linux/dtrace_cpu_defines.h | 63 +--- include/uapi/linux/Kbuild | 2 + include/uapi/linux/dtrace/Kbuild | 35 ++ include/uapi/linux/dtrace/actions.h | 13 + .../uapi/linux/dtrace/actions_defines.h | 37 +-- .../uapi/linux/dtrace/arg.h | 37 +-- include/uapi/linux/dtrace/arg_defines.h | 20 ++ .../uapi/linux/dtrace/buffer.h | 37 +-- include/uapi/linux/dtrace/buffer_defines.h | 20 ++ include/uapi/linux/dtrace/conf.h | 34 ++ include/uapi/linux/dtrace/conf_defines.h | 20 ++ include/uapi/linux/dtrace/cpu_defines.h | 16 + .../uapi/linux/dtrace/dif.h | 37 +-- .../uapi/linux/dtrace/dif_defines.h | 37 +-- .../uapi/linux/dtrace/difo.h | 37 +-- include/uapi/linux/dtrace/difo_defines.h | 20 ++ .../uapi/linux/dtrace/dof.h | 37 +-- .../uapi/linux/dtrace/dof_defines.h | 37 +-- include/uapi/linux/dtrace/dtrace.h | 32 ++ .../uapi/linux/dtrace/enabling.h | 37 +-- include/uapi/linux/dtrace/enabling_defines.h | 24 ++ .../uapi/linux/dtrace/fasttrap.h | 37 +-- include/uapi/linux/dtrace/fasttrap_defines.h | 22 ++ include/uapi/linux/dtrace/fasttrap_ioctl.h | 18 ++ include/uapi/linux/dtrace/faults.h | 19 ++ .../uapi/linux/dtrace/faults_defines.h | 37 +-- .../uapi/linux/dtrace/helpers.h | 37 +-- include/uapi/linux/dtrace/helpers_defines.h | 20 ++ .../uapi/linux/dtrace/ioctl.h | 33 +- .../uapi/linux/dtrace/metadesc.h | 37 +-- include/uapi/linux/dtrace/metadesc_defines.h | 23 ++ include/uapi/linux/dtrace/options.h | 19 ++ .../uapi/linux/dtrace/options_defines.h | 37 +-- .../uapi/linux/dtrace/stability.h | 37 +-- .../uapi/linux/dtrace/stability_defines.h | 37 +-- .../uapi/linux/dtrace/status.h | 37 +-- .../uapi/linux/dtrace/universal.h | 35 +- kernel/ctf/Kconfig | 2 +- kernel/dtrace/Kconfig | 3 +- kernel/dtrace/Makefile | 2 +- kernel/dtrace/cyclic.c | 10 + kernel/dtrace/dtrace_cpu.c | 14 +- kernel/dtrace/dtrace_fbt_core.c | 14 +- kernel/dtrace/dtrace_os.c | 12 +- kernel/dtrace/dtrace_sdt_core.c | 14 +- scripts/package/mkspec | 19 ++ 145 files changed, 1711 insertions(+), 3048 deletions(-) create mode 100644 arch/sparc/dtrace/Makefile.arch rename {dtrace => arch/sparc/dtrace}/dtrace_asm_sparc64.S (84%) rename {dtrace => arch/sparc/dtrace}/dtrace_isa_sparc64.c (79%) rename {dtrace => arch/sparc/dtrace}/fasttrap_sparc64.c (70%) rename {dtrace => arch/sparc/dtrace}/fbt_sparc64.c (92%) create mode 100644 arch/sparc/dtrace/include/dtrace/fasttrap_arch.h rename {dtrace/include/sparc64 => arch/sparc/dtrace/include}/dtrace/fbt_arch.h (55%) rename {dtrace/include/sparc64 => arch/sparc/dtrace/include}/dtrace/isa_arch.h (92%) create mode 100644 arch/sparc/dtrace/include/dtrace/mod_arch.h create mode 100644 arch/sparc/dtrace/include/dtrace/sdt_arch.h rename {dtrace => arch/sparc/dtrace}/sdt_sparc64.c (84%) create mode 100644 arch/x86/dtrace/Makefile.arch rename {dtrace => arch/x86/dtrace}/dtrace_asm_x86_64.S (85%) rename {dtrace => arch/x86/dtrace}/dtrace_isa_x86_64.c (83%) rename {dtrace => arch/x86/dtrace}/fasttrap_x86_64.c (66%) rename {dtrace => arch/x86/dtrace}/fbt_x86_64.c (75%) create mode 100644 arch/x86/dtrace/include/dtrace/fasttrap_arch.h rename {dtrace/include/x86_64 => arch/x86/dtrace/include}/dtrace/fbt_arch.h (54%) create mode 100644 arch/x86/dtrace/include/dtrace/mod_arch.h create mode 100644 arch/x86/dtrace/include/dtrace/sdt_arch.h rename {dtrace => arch/x86/dtrace}/sdt_x86_64.c (68%) delete mode 100644 dtrace/Kbuild delete mode 100644 dtrace/dtrace-module.spec delete mode 100644 dtrace/include/dtrace/provider_defines.h delete mode 100644 dtrace/include/sparc64/dtrace/fasttrap_arch.h delete mode 100644 dtrace/include/sparc64/dtrace/mod_arch.h delete mode 100644 dtrace/include/sparc64/dtrace/sdt_arch.h delete mode 100644 dtrace/include/uapi/linux/dtrace/actions.h delete mode 100644 dtrace/include/uapi/linux/dtrace/arg_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/buffer_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/conf.h delete mode 100644 dtrace/include/uapi/linux/dtrace/conf_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/difo_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/dtrace.h delete mode 100644 dtrace/include/uapi/linux/dtrace/enabling_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/fasttrap_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/fasttrap_ioctl.h delete mode 100644 dtrace/include/uapi/linux/dtrace/faults.h delete mode 100644 dtrace/include/uapi/linux/dtrace/helpers_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/ioctl_debug.h delete mode 100644 dtrace/include/uapi/linux/dtrace/metadesc_defines.h delete mode 100644 dtrace/include/uapi/linux/dtrace/options.h delete mode 100644 dtrace/include/x86_64/dtrace/fasttrap_arch.h delete mode 100644 dtrace/include/x86_64/dtrace/mod_arch.h delete mode 100644 dtrace/include/x86_64/dtrace/sdt_arch.h rename {dtrace/include => include}/dtrace/dtrace_impl.h (97%) rename {dtrace/include => include}/dtrace/dtrace_impl_defines.h (84%) rename {dtrace/include => include}/dtrace/provider.h (97%) create mode 100644 include/dtrace/provider_defines.h rename {dtrace/include => include}/dtrace/types.h (79%) create mode 100644 include/linux/dtrace/cpu_defines.h create mode 100644 include/uapi/linux/dtrace/Kbuild create mode 100644 include/uapi/linux/dtrace/actions.h rename {dtrace/include => include}/uapi/linux/dtrace/actions_defines.h (84%) rename {dtrace/include => include}/uapi/linux/dtrace/arg.h (59%) create mode 100644 include/uapi/linux/dtrace/arg_defines.h rename {dtrace/include => include}/uapi/linux/dtrace/buffer.h (61%) create mode 100644 include/uapi/linux/dtrace/buffer_defines.h create mode 100644 include/uapi/linux/dtrace/conf.h create mode 100644 include/uapi/linux/dtrace/conf_defines.h create mode 100644 include/uapi/linux/dtrace/cpu_defines.h rename {dtrace/include => include}/uapi/linux/dtrace/dif.h (63%) rename {dtrace/include => include}/uapi/linux/dtrace/dif_defines.h (91%) rename {dtrace/include => include}/uapi/linux/dtrace/difo.h (68%) create mode 100644 include/uapi/linux/dtrace/difo_defines.h rename {dtrace/include => include}/uapi/linux/dtrace/dof.h (90%) rename {dtrace/include => include}/uapi/linux/dtrace/dof_defines.h (88%) create mode 100644 include/uapi/linux/dtrace/dtrace.h rename {dtrace/include => include}/uapi/linux/dtrace/enabling.h (73%) create mode 100644 include/uapi/linux/dtrace/enabling_defines.h rename {dtrace/include => include}/uapi/linux/dtrace/fasttrap.h (55%) create mode 100644 include/uapi/linux/dtrace/fasttrap_defines.h create mode 100644 include/uapi/linux/dtrace/fasttrap_ioctl.h create mode 100644 include/uapi/linux/dtrace/faults.h rename {dtrace/include => include}/uapi/linux/dtrace/faults_defines.h (56%) rename {dtrace/include => include}/uapi/linux/dtrace/helpers.h (83%) create mode 100644 include/uapi/linux/dtrace/helpers_defines.h rename {dtrace/include => include}/uapi/linux/dtrace/ioctl.h (62%) rename {dtrace/include => include}/uapi/linux/dtrace/metadesc.h (76%) create mode 100644 include/uapi/linux/dtrace/metadesc_defines.h create mode 100644 include/uapi/linux/dtrace/options.h rename {dtrace/include => include}/uapi/linux/dtrace/options_defines.h (75%) rename {dtrace/include => include}/uapi/linux/dtrace/stability.h (61%) rename {dtrace/include => include}/uapi/linux/dtrace/stability_defines.h (65%) rename {dtrace/include => include}/uapi/linux/dtrace/status.h (67%) rename {dtrace/include => include}/uapi/linux/dtrace/universal.h (62%) diff --git a/Makefile b/Makefile index 3150e032c814..ba6da1cd85c9 100644 --- a/Makefile +++ b/Makefile @@ -560,6 +560,7 @@ drivers-y := drivers/ sound/ firmware/ net-y := net/ libs-y := lib/ core-y := usr/ +dtrace-y := dtrace/ endif # KBUILD_EXTMOD ifeq ($(dot-config),1) @@ -888,14 +889,17 @@ core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) + $(net-y) $(net-m) $(libs-y) $(libs-m) \ + $(dtrace-y) $(dtrace-m))) vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-) $(core-) $(drivers-) $(net-) $(libs-)))) + $(init-) $(core-) $(drivers-) $(net-) $(libs-) \ + $(dtrace-)))) init-y := $(patsubst %/, %/built-in.o, $(init-y)) core-y := $(patsubst %/, %/built-in.o, $(core-y)) drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) +dtrace-y := $(patsubst %/, %/built-in.o, $(dtrace-y)) net-y := $(patsubst %/, %/built-in.o, $(net-y)) libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) @@ -903,11 +907,11 @@ libs-y := $(libs-y1) $(libs-y2) # Externally visible symbols (used by link-vmlinux.sh) export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) -export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) +export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(dtrace-y) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux # used by scripts/pacmage/Makefile -export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt) +export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt dtrace) vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) diff --git a/arch/sparc/dtrace/Makefile.arch b/arch/sparc/dtrace/Makefile.arch new file mode 100644 index 000000000000..7f9e96904395 --- /dev/null +++ b/arch/sparc/dtrace/Makefile.arch @@ -0,0 +1,17 @@ +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# + +DTARCHDIR = ../arch/sparc/dtrace + +ccflags-y += -Iarch/sparc/dtrace/include -Idtrace + +dtrace-obj += dtrace_asm_sparc64.o dtrace_isa_sparc64.o +fasttrap-obj += fasttrap_sparc64.o +fbt-obj += fbt_sparc64.o +sdt-obj += sdt_sparc64.o + +dtrace-y += $(addprefix $(DTARCHDIR)/, $(dtrace-obj)) +fasttrap-y += $(addprefix $(DTARCHDIR)/, $(fasttrap-obj)) +fbt-y += $(addprefix $(DTARCHDIR)/, $(fbt-obj)) +sdt-y += $(addprefix $(DTARCHDIR)/, $(sdt-obj)) diff --git a/dtrace/dtrace_asm_sparc64.S b/arch/sparc/dtrace/dtrace_asm_sparc64.S similarity index 84% rename from dtrace/dtrace_asm_sparc64.S rename to arch/sparc/dtrace/dtrace_asm_sparc64.S index c0522e15b8a7..393078942c9d 100644 --- a/dtrace/dtrace_asm_sparc64.S +++ b/arch/sparc/dtrace/dtrace_asm_sparc64.S @@ -1,26 +1,17 @@ /* - * CDDL HEADER START + * Dynamic Tracing for Linux - sparc64 specific assembly * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2010-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_isa_sparc64.c b/arch/sparc/dtrace/dtrace_isa_sparc64.c similarity index 79% rename from dtrace/dtrace_isa_sparc64.c rename to arch/sparc/dtrace/dtrace_isa_sparc64.c index 66f0a9f9fcea..f191741a8d41 100644 --- a/dtrace/dtrace_isa_sparc64.c +++ b/arch/sparc/dtrace/dtrace_isa_sparc64.c @@ -1,27 +1,18 @@ /* * FILE: dtrace_isa_sparc64.c - * DESCRIPTION: Dynamic Tracing: sparc64 arch-specific support functions + * DESCRIPTION: DTrace - sparc64 architecture specific support functions * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fasttrap_sparc64.c b/arch/sparc/dtrace/fasttrap_sparc64.c similarity index 70% rename from dtrace/fasttrap_sparc64.c rename to arch/sparc/dtrace/fasttrap_sparc64.c index 732e7a2c42b5..a8e79cb3f997 100644 --- a/dtrace/fasttrap_sparc64.c +++ b/arch/sparc/dtrace/fasttrap_sparc64.c @@ -1,28 +1,18 @@ /* * FILE: fasttrap_sparc64.c - * DESCRIPTION: Fasttrap Tracing: arch support (sparc64) + * DESCRIPTION: DTrace - fasttrap provider implementation for sparc64 * - * CDDL HEADER START + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012, 2013, 2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fbt_sparc64.c b/arch/sparc/dtrace/fbt_sparc64.c similarity index 92% rename from dtrace/fbt_sparc64.c rename to arch/sparc/dtrace/fbt_sparc64.c index 3a6367cd4deb..1bc522138c4d 100644 --- a/dtrace/fbt_sparc64.c +++ b/arch/sparc/dtrace/fbt_sparc64.c @@ -1,27 +1,18 @@ /* * FILE: fbt_sparc64.c - * DESCRIPTION: Function Boundary Tracing: architecture-specific implementation + * DESCRIPTION: DTrace - FBT provider implementation for sparc64 * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/arch/sparc/dtrace/include/dtrace/fasttrap_arch.h b/arch/sparc/dtrace/include/dtrace/fasttrap_arch.h new file mode 100644 index 000000000000..eff3607afa2f --- /dev/null +++ b/arch/sparc/dtrace/include/dtrace/fasttrap_arch.h @@ -0,0 +1,27 @@ +/* + * Dynamic Tracing for Linux - Fasttrap Implementation defines + * + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _SPARC64_FASTTRAP_ARCH_H +#define _SPARC64_FASTTRAP_ARCH_H + +#define FASTTRAP_OFFSET_AFRAMES 0 + +#endif /* _SPARC64_FASTTRAP_ARCH_H */ diff --git a/dtrace/include/sparc64/dtrace/fbt_arch.h b/arch/sparc/dtrace/include/dtrace/fbt_arch.h similarity index 55% rename from dtrace/include/sparc64/dtrace/fbt_arch.h rename to arch/sparc/dtrace/include/dtrace/fbt_arch.h index 173a10734958..6cf668879f86 100644 --- a/dtrace/include/sparc64/dtrace/fbt_arch.h +++ b/arch/sparc/dtrace/include/dtrace/fbt_arch.h @@ -1,36 +1,27 @@ -#ifndef _SPARC64_FBT_ARCH_H -#define _SPARC64_FBT_ARCH_H - /* - * Function Boundary Tracing Implementation defines + * Dynamic Tracing for Linux - FBT Implementation defines * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. */ +#ifndef _SPARC64_FBT_ARCH_H +#define _SPARC64_FBT_ARCH_H + #define FBT_AFRAMES 1 typedef struct fbt_probe { diff --git a/dtrace/include/sparc64/dtrace/isa_arch.h b/arch/sparc/dtrace/include/dtrace/isa_arch.h similarity index 92% rename from dtrace/include/sparc64/dtrace/isa_arch.h rename to arch/sparc/dtrace/include/dtrace/isa_arch.h index 3a762769be3b..fc411373febc 100644 --- a/dtrace/include/sparc64/dtrace/isa_arch.h +++ b/arch/sparc/dtrace/include/dtrace/isa_arch.h @@ -1,32 +1,23 @@ -#ifndef _SPARC64_ISA_ARCH_H -#define _SPARC64_ISA_ARCH_H - /* * FILE: isa_arch.c - * DESCRIPTION: Dynamic Tracing: sparc64 ISA-specific definitions - * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * DESCRIPTION: DTrace - sparc64 ISA-specific definitions * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * CDDL HEADER END - * - * Copyrigt (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ +#ifndef _SPARC64_ISA_ARCH_H +#define _SPARC64_ISA_ARCH_H + /* Register indices */ #define ASM_REG_G0 0 diff --git a/arch/sparc/dtrace/include/dtrace/mod_arch.h b/arch/sparc/dtrace/include/dtrace/mod_arch.h new file mode 100644 index 000000000000..d461096e5ba7 --- /dev/null +++ b/arch/sparc/dtrace/include/dtrace/mod_arch.h @@ -0,0 +1,38 @@ +/* + * Dynamic Tracing for Linux - Framework per-module data + * + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _SPARC64_MOD_ARCH_H +#define _SPARC64_MOD_ARCH_H + +#include + +/* + * Structure to hold DTrace specific information about modules (including the + * core kernel module). Note that each module (and the main kernel) already + * has three fields that relate to probing: + * - sdt_probes: description of SDT probes in the module + * - sdt_probec: number of SDT probes in the module + * - pdata: pointer to a dtrace_module struct (for DTrace) + */ +typedef struct dtrace_module { + int enabled_cnt; + size_t sdt_probe_cnt; + asm_instr_t *sdt_tab; + size_t fbt_probe_cnt; + asm_instr_t *fbt_tab; +} dtrace_module_t; + +#endif /* _SPARC64_MOD_ARCH_H */ diff --git a/arch/sparc/dtrace/include/dtrace/sdt_arch.h b/arch/sparc/dtrace/include/dtrace/sdt_arch.h new file mode 100644 index 000000000000..da9571534610 --- /dev/null +++ b/arch/sparc/dtrace/include/dtrace/sdt_arch.h @@ -0,0 +1,27 @@ +/* + * Dynamic Tracing for Linux - SDT Implementation defines + * + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _SPARC64_SDT_ARCH_H +#define _SPARC64_SDT_ARCH_H + +#define SDT_AFRAMES 1 + +#endif /* _SPARC64_SDT_ARCH_H */ diff --git a/dtrace/sdt_sparc64.c b/arch/sparc/dtrace/sdt_sparc64.c similarity index 84% rename from dtrace/sdt_sparc64.c rename to arch/sparc/dtrace/sdt_sparc64.c index 3a40518bbee0..5578965c5fa1 100644 --- a/dtrace/sdt_sparc64.c +++ b/arch/sparc/dtrace/sdt_sparc64.c @@ -1,27 +1,18 @@ /* * FILE: sdt_sparc64.c - * DESCRIPTION: Statically Defined Tracing: arch support (sparc64) + * DESCRIPTION: DTrace - SDT provider implementation for sparc64 * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/arch/x86/dtrace/Makefile.arch b/arch/x86/dtrace/Makefile.arch new file mode 100644 index 000000000000..0ff2b1e8930f --- /dev/null +++ b/arch/x86/dtrace/Makefile.arch @@ -0,0 +1,17 @@ +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# + +DTARCHDIR = ../arch/x86/dtrace + +ccflags-y += -Iarch/x86/dtrace/include -Idtrace + +dtrace-obj += dtrace_asm_x86_64.o dtrace_isa_x86_64.o +fasttrap-obj += fasttrap_x86_64.o +fbt-obj += fbt_x86_64.o +sdt-obj += sdt_x86_64.o + +dtrace-y += $(addprefix $(DTARCHDIR)/, $(dtrace-obj)) +fasttrap-y += $(addprefix $(DTARCHDIR)/, $(fasttrap-obj)) +fbt-y += $(addprefix $(DTARCHDIR)/, $(fbt-obj)) +sdt-y += $(addprefix $(DTARCHDIR)/, $(sdt-obj)) diff --git a/dtrace/dtrace_asm_x86_64.S b/arch/x86/dtrace/dtrace_asm_x86_64.S similarity index 85% rename from dtrace/dtrace_asm_x86_64.S rename to arch/x86/dtrace/dtrace_asm_x86_64.S index c8b6977d8ea1..69f0cc52bc0c 100644 --- a/dtrace/dtrace_asm_x86_64.S +++ b/arch/x86/dtrace/dtrace_asm_x86_64.S @@ -1,26 +1,17 @@ /* - * CDDL HEADER START + * Dynamic Tracing for Linux - x86 specific assembly * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2010-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_isa_x86_64.c b/arch/x86/dtrace/dtrace_isa_x86_64.c similarity index 83% rename from dtrace/dtrace_isa_x86_64.c rename to arch/x86/dtrace/dtrace_isa_x86_64.c index 1e99b0653759..6b7b34cecce8 100644 --- a/dtrace/dtrace_isa_x86_64.c +++ b/arch/x86/dtrace/dtrace_isa_x86_64.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_isa_x86_64.c - * DESCRIPTION: Dynamic Tracing: x86_64 architecture specific support functions + * DESCRIPTION: DTrace - x86_64 architecture specific support functions * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fasttrap_x86_64.c b/arch/x86/dtrace/fasttrap_x86_64.c similarity index 66% rename from dtrace/fasttrap_x86_64.c rename to arch/x86/dtrace/fasttrap_x86_64.c index d48cf42a1172..054412b1a624 100644 --- a/dtrace/fasttrap_x86_64.c +++ b/arch/x86/dtrace/fasttrap_x86_64.c @@ -1,28 +1,18 @@ /* * FILE: fasttrap_x86_64.c - * DESCRIPTION: Fasttrap Tracing: arch support (x86_64) + * DESCRIPTION: DTrace - fasttrap provider implementation for x86 * - * CDDL HEADER START + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012, 2013, 2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fbt_x86_64.c b/arch/x86/dtrace/fbt_x86_64.c similarity index 75% rename from dtrace/fbt_x86_64.c rename to arch/x86/dtrace/fbt_x86_64.c index 378ff133df45..04b4e72d2745 100644 --- a/dtrace/fbt_x86_64.c +++ b/arch/x86/dtrace/fbt_x86_64.c @@ -1,27 +1,18 @@ /* * FILE: fbt_x86_64.c - * DESCRIPTION: Function Boundary Tracing: architecture-specific implementation + * DESCRIPTION: DTrace - FBT provider implementation for x86 * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/arch/x86/dtrace/include/dtrace/fasttrap_arch.h b/arch/x86/dtrace/include/dtrace/fasttrap_arch.h new file mode 100644 index 000000000000..8a00fbde8c4a --- /dev/null +++ b/arch/x86/dtrace/include/dtrace/fasttrap_arch.h @@ -0,0 +1,27 @@ +/* + * Dynamic Tracing for Linux - Fasttrap provider implementation defines + * + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _X86_64_FASTTRAP_ARCH_H +#define _X86_64_FASTTRAP_ARCH_H + +#define FASTTRAP_OFFSET_AFRAMES 3 + +#endif /* _X86_64_FASTTRAP_ARCH_H */ diff --git a/dtrace/include/x86_64/dtrace/fbt_arch.h b/arch/x86/dtrace/include/dtrace/fbt_arch.h similarity index 54% rename from dtrace/include/x86_64/dtrace/fbt_arch.h rename to arch/x86/dtrace/include/dtrace/fbt_arch.h index afda80b52389..c81ba389e89c 100644 --- a/dtrace/include/x86_64/dtrace/fbt_arch.h +++ b/arch/x86/dtrace/include/dtrace/fbt_arch.h @@ -1,36 +1,27 @@ -#ifndef _X86_64_FBT_ARCH_H -#define _X86_64_FBT_ARCH_H - /* - * Function Boundary Tracing Implementation defines + * Dynamic Tracing for Linux - FBT Implementation defines * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. */ +#ifndef _X86_64_FBT_ARCH_H +#define _X86_64_FBT_ARCH_H + #define FBT_AFRAMES 9 typedef struct fbt_probe { diff --git a/arch/x86/dtrace/include/dtrace/mod_arch.h b/arch/x86/dtrace/include/dtrace/mod_arch.h new file mode 100644 index 000000000000..2ec86c48cdd8 --- /dev/null +++ b/arch/x86/dtrace/include/dtrace/mod_arch.h @@ -0,0 +1,36 @@ +/* + * Dynamic Tracing for Linux - Framework per-module data + * + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _X86_64_MOD_ARCH_H +#define _X86_64_MOD_ARCH_H + +#include + +/* + * Structure to hold DTrace specific information about modules (including the + * core kernel module). Note that each module (and the main kernel) already + * has three fields that relate to probing: + * - sdt_probes: description of SDT probes in the module + * - sdt_probec: number of SDT probes in the module + * - pdata: pointer to a dtrace_module struct (for DTrace) + */ +typedef struct dtrace_module { + int enabled_cnt; + size_t sdt_probe_cnt; + size_t fbt_probe_cnt; +} dtrace_module_t; + +#endif /* _X86_64_MOD_ARCH_H */ diff --git a/arch/x86/dtrace/include/dtrace/sdt_arch.h b/arch/x86/dtrace/include/dtrace/sdt_arch.h new file mode 100644 index 000000000000..da9cc5c801d2 --- /dev/null +++ b/arch/x86/dtrace/include/dtrace/sdt_arch.h @@ -0,0 +1,27 @@ +/* + * Dynamic Tracing for Linux - SDT Implementation defines + * + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _X86_64_SDT_ARCH_H +#define _X86_64_SDT_ARCH_H + +#define SDT_AFRAMES 4 + +#endif /* _X86_64_SDT_ARCH_H */ diff --git a/dtrace/sdt_x86_64.c b/arch/x86/dtrace/sdt_x86_64.c similarity index 68% rename from dtrace/sdt_x86_64.c rename to arch/x86/dtrace/sdt_x86_64.c index c91019eba522..edfc30f29574 100644 --- a/dtrace/sdt_x86_64.c +++ b/arch/x86/dtrace/sdt_x86_64.c @@ -1,28 +1,18 @@ /* * FILE: sdt_dev.c - * DESCRIPTION: Statically Defined Tracing: device file handling + * DESCRIPTION: DTrace - SDT provider implementation for x86 * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/Kbuild b/dtrace/Kbuild deleted file mode 100644 index 63892057cc39..000000000000 --- a/dtrace/Kbuild +++ /dev/null @@ -1,54 +0,0 @@ -# -# Makefile for DTrace -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# Copyright 2011 -- 2013 Oracle, Inc. All rights reserved. -# Use is subject to license terms. - -EXTRA_CFLAGS := -I$(src)/include -I$(src)/include/uapi \ - -I$(src)/include/$(UTS_MACHINE) - -obj-$(CONFIG_DT_CORE) += dtrace.o -obj-$(CONFIG_DT_FASTTRAP) += fasttrap.o -obj-$(CONFIG_DT_FBT) += fbt.o -obj-$(CONFIG_DT_PROFILE) += profile.o -obj-$(CONFIG_DT_SDT) += sdt.o -obj-$(CONFIG_DT_SYSTRACE) += systrace.o -obj-$(CONFIG_DT_DT_TEST) += dt_test.o - -dtrace-y := dtrace_mod.o dtrace_dev.o \ - dtrace_asm_$(UTS_MACHINE).o \ - dtrace_isa_$(UTS_MACHINE).o \ - dtrace_actdesc.o dtrace_anon.o \ - dtrace_buffer.o dtrace_dif.o dtrace_dof.o \ - dtrace_ecb.o dtrace_enable.o \ - dtrace_fmt.o dtrace_hash.o dtrace_isa.o \ - dtrace_match.o dtrace_priv.o \ - dtrace_probe.o dtrace_probe_ctx.o \ - dtrace_ptofapi.o dtrace_predicate.o \ - dtrace_spec.o dtrace_state.o dtrace_util.o -fasttrap-y := fasttrap_mod.o fasttrap_dev.o fasttrap_$(UTS_MACHINE).o -fbt-y := fbt_mod.o fbt_dev.o fbt_$(UTS_MACHINE).o -profile-y := profile_mod.o profile_dev.o -sdt-y := sdt_mod.o sdt_dev.o sdt_$(UTS_MACHINE).o -systrace-y := systrace_mod.o systrace_dev.o -dt_test-y := dt_test_mod.o dt_test_dev.o diff --git a/dtrace/Makefile b/dtrace/Makefile index d31fdcfd77c1..e7aafa74f2ca 100644 --- a/dtrace/Makefile +++ b/dtrace/Makefile @@ -1,36 +1,29 @@ # -# Makefile for DTrace +# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. # -KERNELDIR := /lib/modules/`uname -r`/build +obj-$(CONFIG_DT_CORE) += dtrace.o +obj-$(CONFIG_DT_FASTTRAP) += fasttrap.o +obj-$(CONFIG_DT_FBT) += fbt.o +obj-$(CONFIG_DT_PROFILE) += profile.o +obj-$(CONFIG_DT_SDT) += sdt.o +obj-$(CONFIG_DT_SYSTRACE) += systrace.o +obj-$(CONFIG_DT_DT_TEST) += dt_test.o -modules:: +dtrace-y := dtrace_mod.o dtrace_dev.o \ + dtrace_actdesc.o dtrace_anon.o \ + dtrace_buffer.o dtrace_dif.o dtrace_dof.o \ + dtrace_ecb.o dtrace_enable.o \ + dtrace_fmt.o dtrace_hash.o dtrace_isa.o \ + dtrace_match.o dtrace_priv.o \ + dtrace_probe.o dtrace_probe_ctx.o \ + dtrace_ptofapi.o dtrace_predicate.o \ + dtrace_spec.o dtrace_state.o dtrace_util.o +fasttrap-y := fasttrap_mod.o fasttrap_dev.o +fbt-y := fbt_mod.o fbt_dev.o +profile-y := profile_mod.o profile_dev.o +sdt-y := sdt_mod.o sdt_dev.o +systrace-y := systrace_mod.o systrace_dev.o +dt_test-y := dt_test_mod.o dt_test_dev.o -install:: modules_install - -%:: - $(MAKE) -C $(KERNELDIR) M=`pwd` $@ - -# Headers named *_ioctl.h have to be compiled in kernel mode so that -# typechecking is enabled. The rest get compiled in user mode. We go to some -# lengths to use any ioctl() identifiers, since typechecking only kicks in at -# time of use. - -headers_check: - @for name in $(notdir $(wildcard include/uapi/linux/dtrace/*.h)); do \ - if [[ $$name =~ .*ioctl\.h$$ ]]; then \ - INC="-I../arch/x86/include -I../include -I../include/asm-generic -Iinclude -D__KERNEL__ -include linux/types.h -include dtrace/types.h"; \ - else \ - INC="-include sys/types.h -include sys/ctf_types.h -include unistd.h -I../include"; \ - fi; \ - echo -e "#include \nint main (void) { long junk[] = { $$(grep '#define ' include/uapi/linux/dtrace/$$name | grep -E 'IO[RW]' | sed 's@.*#define \([^ \t]*\).*$$@\1,@')};}" | \ - $(CC) -c -x c - -o /dev/null -D_GNU_SOURCE -DHEADERS_CHECK \ - $$INC -Iinclude/uapi $$INC -include linux/dtrace_os.h || \ - { echo "$$name is not standalone." >&2; exit 1; } \ - done - -headers_install: - mkdir -p $(INSTALL_HDR_PATH)/usr/include/linux/dtrace - for name in include/dtrace/provider*.h include/dtrace/types*.h include/uapi/linux/dtrace/*.h; do \ - install -m 0644 $$name $(INSTALL_HDR_PATH)/usr/include/linux/dtrace; \ - done +include arch/$(SRCARCH)/dtrace/Makefile.arch diff --git a/dtrace/ctf_api.h b/dtrace/ctf_api.h index 2916d0e92104..75c6a5d6ad7e 100644 --- a/dtrace/ctf_api.h +++ b/dtrace/ctf_api.h @@ -1,3 +1,19 @@ +/* + * Compact C Type format + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef __CTF_API_H_ #define __CTF_API_H_ diff --git a/dtrace/dt_perf.h b/dtrace/dt_perf.h index b708d3357db3..581c4ce3ca49 100644 --- a/dtrace/dt_perf.h +++ b/dtrace/dt_perf.h @@ -1,27 +1,18 @@ /* - * CDDL HEADER START + * Dynamic Tracing for Linux - Perf provider * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * CDDL HEADER END - */ - -/* - * Copyright 2011, 2012, 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. */ #ifndef _DT_PERF_H_ diff --git a/dtrace/dt_perf_dev.c b/dtrace/dt_perf_dev.c index 9abd15625847..109dc07b689e 100644 --- a/dtrace/dt_perf_dev.c +++ b/dtrace/dt_perf_dev.c @@ -1,28 +1,18 @@ /* * FILE: dt_pref_dev.c - * DESCRIPTION: DTrace Performance Test Probe: device file handling + * DESCRIPTION: DTrace - perf provider device driver * - * CDDL HEADER START + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2011, 2012, 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dt_perf_mod.c b/dtrace/dt_perf_mod.c index 1365cb4875fe..9feb77e39fa6 100644 --- a/dtrace/dt_perf_mod.c +++ b/dtrace/dt_perf_mod.c @@ -1,28 +1,18 @@ /* * FILE: dt_perf_mod.c - * DESCRIPTION: DTrace Performance Test Probe: module handling + * DESCRIPTION: DTrace - perf provider kernel module * - * CDDL HEADER START + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -34,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("DTrace Performance Test Probe"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static const dtrace_pattr_t dt_perf_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, diff --git a/dtrace/dt_test.h b/dtrace/dt_test.h index 4b352891c8b4..fb164c1d7edb 100644 --- a/dtrace/dt_test.h +++ b/dtrace/dt_test.h @@ -1,27 +1,17 @@ /* - * CDDL HEADER START + * Dynamic Tracing for Linux - test provider * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #ifndef _DT_TEST_H_ diff --git a/dtrace/dt_test_dev.c b/dtrace/dt_test_dev.c index 1a6405c892a2..756738eb2b77 100644 --- a/dtrace/dt_test_dev.c +++ b/dtrace/dt_test_dev.c @@ -1,28 +1,18 @@ /* * FILE: dt_test_dev.c - * DESCRIPTION: DTrace Test Probe: device file handling + * DESCRIPTION: DTrace - test provider device driver * - * CDDL HEADER START + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2011-2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dt_test_mod.c b/dtrace/dt_test_mod.c index 57ea5fe9e542..8704a24bf325 100644 --- a/dtrace/dt_test_mod.c +++ b/dtrace/dt_test_mod.c @@ -1,27 +1,18 @@ /* * FILE: dt_test_mod.c - * DESCRIPTION: DTrace Test Probe: module handling + * DESCRIPTION: DTrace - test provider kernel module * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -33,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("DTrace Test Probe"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static const dtrace_pattr_t dt_test_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, diff --git a/dtrace/dtrace-module.spec b/dtrace/dtrace-module.spec deleted file mode 100644 index a9a2dc08a9ce..000000000000 --- a/dtrace/dtrace-module.spec +++ /dev/null @@ -1,300 +0,0 @@ -%ifarch i686 -%define karch i686 -%endif -%ifarch x86_64 -%define karch x86_64 -%endif -%ifarch sparc64 -%define karch sparc64 -%endif - -# Redefine 'build_variant' at build time to create a kernel package named -# something like 'kernel-uek-dtrace'. -%define variant %{?build_variant:%{build_variant}}%{!?build_variant:-uek} - -# Set this to the version of the kernel this module is compiled against. -%define kver %{?build_kver:%{build_kver}}%{!?build_kver:4.1.12-43%{dist}uek} - -%define _signmodules %{?signmodules: %{signmodules}} %{?!signmodules: 1} - -Name: dtrace-modules-%{kver} -Summary: dtrace module -Version: 0.6.1 -Release: 3%{dist} -Provides: dtrace-modules -Requires: at -License: CDDL -Group: System Environment/Kernel -Source0: @SOURCE_TARBALL@ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: kernel%{variant}-devel = %{kver} -BuildRequires: libdtrace-ctf -ExclusiveArch: x86_64 sparc64 - -%if %{_signmodules} -Source1: mod-sign.sh -%define modsign_cmd %{SOURCE1} -%endif - -%description -DTrace kernel modules. - -This package contains the DTrace core module, and standard provider modules: -dtrace, profile, syscall, sdt (io, proc,sched), and fasttrap (USDT). - -Maintainers: ------------- -Nick Alcock -Kris Van Hees - -# If this package is not removed, but its dependent kernel is, schedule -# a later removal via at, late enough that this yum job is probably over. -%triggerun -- kernel%{variant} = %{kver} - -at now + 4 hours >/dev/null 2>&1 <<'EOF' -rpm --quiet -e dtrace-modules-%{kver} -EOF - -%package -n dtrace-modules-shared-headers -Summary: Header files for communication with the DTrace kernel module. -Obsoletes: dtrace-modules-headers -Provides: dtrace-modules-headers 1:1 - -%description -n dtrace-modules-shared-headers -This package contains header files describing the protocol used by userspace to -communicate with the DTrace kernel module. - -%package -n dtrace-modules-provider-headers -Summary: Header files for implementation of DTrace providers. -Requires: dtrace-modules-shared-headers -%{lua: - local obsoleted = {"16.1.1", "16.2.1", "16.2.2", "16.2.3", "16.3.1", - "16.3.2", "16.3.3", "16"} - - for ignore, vers in ipairs(obsoleted) do - print("Obsoletes: dtrace-modules-3.8.13-" .. vers .. - "%{dist}uek-provider-headers\n") - end -} -%description -n dtrace-modules-provider-headers -This package contains header files defining the API used to implement DTrace -providers. - -%prep -rm -rf %{BuildRoot} - -%setup -c -n %{name} - -%build -cd dtrace -KSRC=/usr/src/kernels/%{kver}.%{karch} -make KERNELDIR=$KSRC karch=%{karch} modules - -%if %{_signmodules} -%{modsign_cmd} ${RPM_BUILD_DIR}/%{name}/dtrace -%endif - -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}/lib/modules/%{kver}.%{karch}/kernel/drivers/dtrace -install -m0644 ${RPM_BUILD_DIR}/%{name}/dtrace/*.ko %{buildroot}/lib/modules/%{kver}.%{karch}/kernel/drivers/dtrace/ -mkdir -p %{buildroot}/usr/share/doc/dtrace-modules-%{kver} -install -m0644 ${RPM_BUILD_DIR}/%{name}/dtrace/NEWS %{buildroot}/usr/share/doc/dtrace-modules-%{kver} -cd dtrace -KSRC=/usr/src/kernels/%{kver}.%{karch} -make KERNELDIR=$KSRC karch=%{karch} headers_install INSTALL_HDR_PATH=%{buildroot} - -%post -depmod -a %{kver}.%{karch} > /dev/null 2> /dev/null - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root,-) -/lib/modules/%{kver}.%{karch}/kernel/drivers/dtrace* -/usr/share/doc/dtrace-modules-%{kver}* - -%files -n dtrace-modules-shared-headers -%defattr(-,root,root,-) -/usr/include/linux/dtrace -%exclude /usr/include/linux/dtrace/provider*.h -%exclude /usr/include/linux/dtrace/types.h - -%files -n dtrace-modules-provider-headers -%defattr(-,root,root,-) -/usr/include/linux/dtrace/provider*.h -/usr/include/linux/dtrace/types.h - -%changelog -* Fri Jul 14 2017 - - 0.6.1-3 -- FBT module support and SPARCs return probes [Orabug: 26384179, 26384765] -- DTrace state cleanmust use dtrace_sync() [Orabug: 26385102] -- Make dynamic variable cleanup self-throtling [Orabug: 26385177] -- Restore deadman original timing values [Orabug: 26385159] -* Wed Jun 28 2017 - - 0.6.1-2 -- Change FBT entry probes on x86 to use int3 [Orabug: 26324039] -- Support x86 CPUs with SMAP (Nick Alcock) [Orabug: 26166784] -* Wed May 24 2017 - - 0.6.1-1 -- Implement link_ntop() DTrace subroutine logic (Nick Alcock) [Orabug: 25931479] -- Add canload() for input of *_ntop(), *_nto*() (Tomas Jedlicka) -- Fix implementation of mutex_* subroutines [Orabug: 26044447] -- Improve probe execution debugging -- Support passing offset as arg0 to FBT return probes [Orabug: 25949086] -- Use different probe trigger instruction for entry vs return [Orabug: 25949048] -- Ensure FBT return probes only run with in_irq() true when in true IRQ context - [Orabug: 26089286] -- Ensure ustackdepth returns correct value [Orabug: 25949692] -* Wed Apr 12 2017 - - 0.6.0-4 -- Always inline dtrace_dif_variable to ensure consistent aframes count - [Orabug: 25872472] -* Sun Apr 2 2017 - - 0.6.0-3 -- Lockfree walltimestamp implementation (Tomas Jedlicka) [Orabug: 25715256] -- Corrected aframes values to skip DTrace frames [Orabug: 25727046] -- Bug fix for stackdepth buffer overrun [Orabug: 25559321] -* Fri Mar 3 2017 - - 0.6.0-2 -- Further implementation of FBT with fixes to ustack - [Orabug: 21220305] -- Handle modular IPv6 and introduce typedef in6_addr_t - (Nick Alcock) [Orabug: 25557554] -* Mon Dec 19 2016 - - 0.6.0-1 -- USDT for SPARC. [Orabug: 24455245] -- Is-enabled probes for SDT [Orabug: 25143173] -- Function boundary tracing (FBT) [Orabug: 21220305] -- Add improved multi-argument DTRACE_PROBE macro [Orabug: 24678897] -- Detemine SDT (including perf-event) argument types dynamically - [Orabug: 24661801] -* Wed Jul 20 2016 Nick Alcock - 0.5.3-2 -- Re-enable 0.5.3 release after bugfix [Orabug: 23344927] -* Mon May 23 2016 Kris Van Hees - 0.5.3-1 -- Provider 'perf' added to SDT for perf events. - (Nick Alcock) [Orabug: 23004534] -- Fix to ensure that pdata and sdt_tab handling works across module reloads. - [Orabug: 23331667] -- Moving pdata size assertion checking to arch-specific code. - (Nick Alcock) [Orabug: 23331667] -* Thu Feb 4 2016 Kris Van Hees - 0.5.2-1 -- Correct probe disable/enable mechanism for syscalls. - [Orabug: 22352636] -- Fix access to uregs[I_R7] for sparc64. - (Nick Alcock) [Orabug: 22602870] -- Use a more efficient, consistent, and reliable mechanism to read user - stack locations. - (Nick Alcock) [Orabug: 22629102] -* Tue Nov 17 2015 Kris Van Hees - 0.5.1-1 -- Remove explicit dependency on kernel RPM. - [Orabug: 21669543] -- Ensure safety checks are enforced on copyout() and copyoutstr(). - [Orabug: 21930954] -- Fix device file minor number for dt_perf. - [Orabug: 21814949] -* Fri Sep 18 2015 Kris Van Hees - 0.5.0-3 -- Enable building DTrace modules for SPARC64. -* Mon Aug 10 2015 Natalya Naumova - 0.5.0-2 -- modules signing support [OL6] -* Mon Aug 10 2015 Kris Van Hees - 0.5.0-1 -- Use kernel-provided SDT trampoline memory area for SPARC64. - [Orabug: 21220344] -- Add support for sparc64. - [Orabug: 19005048] -- Update uid / gid handling in view of namespaces in UEK4 kernels. - [Orabug: 20456825] -* Mon Jul 6 2015 Natalya Naumova - 0.4.5-3 -- modules signing support [OL7] -* Tue Jun 23 2015 Kris Van Hees - 0.4.5-2 -- Validate d_path() argument pointer to avoid crash. - [Orabug: 21304207] -* Wed Jun 17 2015 Kris Van Hees - 0.4.5-1 -- Support USDT for 32-bit applications on 64-bit hosts. - [Orabug: 21219315] -- Convert from sdt_instr_t to asm_instr_t. - [Orabug: 21219374] -- Restructuring to support DTrace on multiple architectures. - [Orabug: 21273259] -- Fix dtrace_helptrace_buffer memory leak. - [Orabug: 20514336] -- Add .gitignore file. - [Orabug: 20266608] -* Thu Mar 9 2015 Nick Alcock - 0.4.4-1 -- Rename dtrace-modules-headers to dtrace-modules-shared-headers. - [Orabug: 20508087] -* Fri Apr 24 2014 Kris Van Hees - 0.4.3-4 -- Updated NEWS file: test stress/buffering/tst.resize1.d is XFAIL for now. -- Align with kernel header file change: FOLL_NOFAULT -> FOLL_IMMED. - [Orabug: 18653713] -* Fri Apr 24 2014 Kris Van Hees - 0.4.3-3 -- Rebuild with cleaned up source tree. -* Thu Apr 24 2014 Nick Alcock - 0.4.3-2 -- Various fixes to handle multi-threaded processes. - [Orabug: 18412802] -* Tue Apr 15 2014 Kris Van Hees - 0.4.3-1 -- Implmentation of profile-* probes in the profile provider. - [Orabug: 18323513] -* Wed Jan 29 2014 Nick Alcock - 0.4.2-3 -- Obsolete the old provider headers package. - [Orabug: 18061595] -* Mon Jan 27 2014 Nick Alcock - 0.4.2-2 -- Change name of provider headers package, to avoid conflicts on yum update. - [Orabug: 18061595] -* Fri Dec 20 2013 Kris Van Hees - 0.4.2-1 -- Fix 'vtimestamp' implementation. - [Orabug: 17741477] -- Support SDT probes points in kernel modules. - [Orabug: 17851716] -* Wed Nov 6 2013 Kris Van Hees - 0.4.1-3 -- Fix 'errno' implementation. - [Orabug: 17704568] -* Wed Oct 26 2013 Kris Van Hees - 0.4.1-2 -- Fix lock ordering issues. - [Orabug: 17624236] -* Thu Oct 17 2013 Nick Alcock - 0.4.0-3 -- fix changelog, no code changes -* Wed Oct 16 2013 Kris Van Hees - 0.4.1-1 -- Align with new cyclic implementation in UEK3 kernel. - [Orabug: 17553446] -- Bugfix for module reference counting. -- Fix memory leak. -- Fix race condition in speculative tracing buffer cleaning. - [Orabug: 17591351] -- Ensure safe access to userspace stack memory location. - [Orabug: 17591351] -* Thu Oct 10 2013 Kris Van Hees - 0.4.0-2 -- Bugfix for ustack() to avoid using vma data. -* Wed Aug 7 2013 Kris Van Hees - 0.4.0-1 -- Bugfix for module unloading. -- Support meta-providers, USDT, and fasttrap (for USDT only). -- Export DTrace kernel headers to userspace. -- Improved ustack() robustness. - [Orabug: 17591351] -- Reimplemented ustack(). - (Nick Alcock) [Orabug: 17591351] -- Bugfixes. -* Fri Nov 2 2012 Nick Alcock - 0.3.2 -- Release for new kernel and CTF section layout -* Mon Oct 1 2012 Kris Van Hees - 0.3.1 -- Skipped version number -* Mon Sep 17 2012 Kris Van Hees - 0.3.0-2 -- Remove development-only providers because they should not be built/released. -* Fri Sep 14 2012 Kris Van Hees - 0.3.0 -- Release of the DTrace kernel modules for UEK2 2.6.39-201.0.1 (DTrace kernel). -* Mon Mar 19 2012 Nick Alcock - 0.2.5-2 -- Fix typo causing unconditional depmod at postinstall time -* Tue Mar 13 2012 Nick Alcock - 0.2.5 -- New kernel, new userspace: no module changes. -* Wed Feb 15 2012 Kris van Hees - 0.2.4 -- Ban unloading of in-use dtrace modules while dtrace is running. -* Thu Feb 9 2012 Nick Alcock - 0.2.3 -- There is one new DTrace option now, used internally by the - testsuite. -* Tue Feb 7 2012 Kris Van Hees - 0.2.2 -- Switch MUTEX_HELD() from using mutex_is_locked() to new mutex_owned(). -* Mon Jan 23 2012 Kris Van Hees - 0.2.1 -- Ensure that allocation attempts are done in atomic fashion so that a failing - allocation attempt won't interfere with other allocations. -- Surpress OOM warnings. -* Mon Jan 23 2012 Kris Van Hees - 0.2.0 -- Release of the DTrace kernel modules for UEK2 2.6.39-101.0.1 (DTrace kernel). -* Wed Oct 19 2011 Kris Van Hees - 0.1.0-1.el6 -- Disable stub-based syscalls in the release pending merging in fixes. -* Thu Sep 29 2011 Maxim Uvarov - 0.1 -- Initial release. diff --git a/dtrace/dtrace.h b/dtrace/dtrace.h index c3daaa96a018..7dbe2bb36f5d 100644 --- a/dtrace/dtrace.h +++ b/dtrace/dtrace.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _DTRACE_H_ #define _DTRACE_H_ diff --git a/dtrace/dtrace_actdesc.c b/dtrace/dtrace_actdesc.c index 75a96eddf26a..340709cf3d66 100644 --- a/dtrace/dtrace_actdesc.c +++ b/dtrace/dtrace_actdesc.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_actdesc.c - * DESCRIPTION: Dynamic Tracing: action description functions + * DESCRIPTION: DTrace - action implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_anon.c b/dtrace/dtrace_anon.c index 67fc30b684ae..f1516d144794 100644 --- a/dtrace/dtrace_anon.c +++ b/dtrace/dtrace_anon.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_anon.c - * DESCRIPTION: Dynamic Tracing: anonymous enabling functions + * DESCRIPTION: DTrace - Anonymous state implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include "dtrace.h" diff --git a/dtrace/dtrace_buffer.c b/dtrace/dtrace_buffer.c index 9722f860b8d4..3f3717a5142c 100644 --- a/dtrace/dtrace_buffer.c +++ b/dtrace/dtrace_buffer.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_buffer.c - * DESCRIPTION: Dynamic Tracing: buffer functions + * DESCRIPTION: DTrace - buffer implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_debug.h b/dtrace/dtrace_debug.h index 81d04650cbe1..fce4cf02578e 100644 --- a/dtrace/dtrace_debug.h +++ b/dtrace/dtrace_debug.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _DTRACE_DEBUG_H_ #define _DTRACE_DEBUG_H_ diff --git a/dtrace/dtrace_dev.c b/dtrace/dtrace_dev.c index 08006eaa0720..e399888071e2 100644 --- a/dtrace/dtrace_dev.c +++ b/dtrace/dtrace_dev.c @@ -1,27 +1,18 @@ /* * FILE: dtrace_dev.c - * DESCRIPTION: Dynamic Tracing: device file handling + * DESCRIPTION: DTrace - Framework device driver * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -38,7 +29,6 @@ #include "ctf_api.h" #include "dtrace.h" #include "dtrace_dev.h" -#include extern char *dtrace_helptrace_buffer; extern int dtrace_helptrace_bufsize; @@ -91,6 +81,27 @@ int dtrace_enable_nullop(void) return 0; } + +#ifdef CONFIG_DT_DEBUG +static void dtrace_ioctl_sizes(void) +{ +#define DBG_PRINT(x) dt_dbg_ioctl("Size of %s: %lx\n", #x, sizeof(x)) + DBG_PRINT(dtrace_providerdesc_t); + DBG_PRINT(dtrace_probedesc_t); + DBG_PRINT(dtrace_bufdesc_t); + DBG_PRINT(dtrace_eprobedesc_t); + DBG_PRINT(dtrace_argdesc_t); + DBG_PRINT(dtrace_conf_t); + DBG_PRINT(dtrace_status_t); + DBG_PRINT(processorid_t); + DBG_PRINT(dtrace_aggdesc_t); + DBG_PRINT(dtrace_fmtdesc_t); + DBG_PRINT(dof_hdr_t); +#undef DBG_PRINT +} + +#endif + static int dtrace_open(struct inode *inode, struct file *file) { dtrace_state_t *state; @@ -958,15 +969,6 @@ static long dtrace_ioctl(struct file *file, return -ENOTTY; } -#ifdef CONFIG_DT_DEBUG - -void dtrace_size_dbg_print(const char *type, size_t size) -{ - dt_dbg_ioctl("Size of %s: %lx\n", type, size); -} - -#endif - static int dtrace_close(struct inode *inode, struct file *file) { dtrace_state_t *state = file->private_data; diff --git a/dtrace/dtrace_dev.h b/dtrace/dtrace_dev.h index 670c77169ee1..a7629a1ea63a 100644 --- a/dtrace/dtrace_dev.h +++ b/dtrace/dtrace_dev.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _DTRACE_DEV_H_ #define _DTRACE_DEV_H_ diff --git a/dtrace/dtrace_dif.c b/dtrace/dtrace_dif.c index 62a66c155f65..78d288b348d7 100644 --- a/dtrace/dtrace_dif.c +++ b/dtrace/dtrace_dif.c @@ -1,27 +1,18 @@ /* * FILE: dtrace_dif.c - * DESCRIPTION: Dynamic Tracing: DIF object functions + * DESCRIPTION: DTrace - DIF object implementation * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_dof.c b/dtrace/dtrace_dof.c index 4207fcea2b81..e99772ea546f 100644 --- a/dtrace/dtrace_dof.c +++ b/dtrace/dtrace_dof.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_dof.c - * DESCRIPTION: Dynamic Tracing: DOF object functions + * DESCRIPTION: DTrace - DOF implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_ecb.c b/dtrace/dtrace_ecb.c index 6eaaa3c47bec..f26c85213aba 100644 --- a/dtrace/dtrace_ecb.c +++ b/dtrace/dtrace_ecb.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_ecb.c - * DESCRIPTION: Dynamic Tracing: ECB functions + * DESCRIPTION: DTrace - ECB implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_enable.c b/dtrace/dtrace_enable.c index 7fe1ad10be41..00da5ed0a512 100644 --- a/dtrace/dtrace_enable.c +++ b/dtrace/dtrace_enable.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_enable.c - * DESCRIPTION: Dynamic Tracing: enabling functions + * DESCRIPTION: DTrace - probe enabling implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_fmt.c b/dtrace/dtrace_fmt.c index 939333b5846b..245da55bd7d1 100644 --- a/dtrace/dtrace_fmt.c +++ b/dtrace/dtrace_fmt.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_fmt.c - * DESCRIPTION: Dynamic Tracing: format functions + * DESCRIPTION: DTrace - format string implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_hash.c b/dtrace/dtrace_hash.c index 0ae9dac957d7..79b907757221 100644 --- a/dtrace/dtrace_hash.c +++ b/dtrace/dtrace_hash.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_hash.c - * DESCRIPTION: Dynamic Tracing: probe hashing functions + * DESCRIPTION: DTrace - hash table implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_isa.c b/dtrace/dtrace_isa.c index f2dcd5123886..a0fe47b48f7b 100644 --- a/dtrace/dtrace_isa.c +++ b/dtrace/dtrace_isa.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_isa.c - * DESCRIPTION: Dynamic Tracing: architecture specific support functions + * DESCRIPTION: DTrace - architecture specific code * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_match.c b/dtrace/dtrace_match.c index 12f8be8ad006..e95e69cfb93f 100644 --- a/dtrace/dtrace_match.c +++ b/dtrace/dtrace_match.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_match.c - * DESCRIPTION: Dynamic Tracing: matching functions + * DESCRIPTION: DTrace - probe match implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include "dtrace.h" diff --git a/dtrace/dtrace_mod.c b/dtrace/dtrace_mod.c index f5fcace3c2bc..bc9e49fa4bb4 100644 --- a/dtrace/dtrace_mod.c +++ b/dtrace/dtrace_mod.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_mod.c - * DESCRIPTION: Dynamic Tracing: module handling + * DESCRIPTION: DTrace - framework kernel module * - * CDDL HEADER START + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -32,7 +22,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("Dynamic Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); /* * Initialize the module. diff --git a/dtrace/dtrace_predicate.c b/dtrace/dtrace_predicate.c index c7fa70af4154..5a5e5a826359 100644 --- a/dtrace/dtrace_predicate.c +++ b/dtrace/dtrace_predicate.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_predicate.c - * DESCRIPTION: Dynamic Tracing: predicate functions + * DESCRIPTION: DTrace - predicate cache implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_priv.c b/dtrace/dtrace_priv.c index 79930a57eb3d..716383511450 100644 --- a/dtrace/dtrace_priv.c +++ b/dtrace/dtrace_priv.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_priv.c - * DESCRIPTION: Dynamic Tracing: privilege check functions + * DESCRIPTION: DTrace - privilege support implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_probe.c b/dtrace/dtrace_probe.c index 08d23e87fc3f..7b97f55f0446 100644 --- a/dtrace/dtrace_probe.c +++ b/dtrace/dtrace_probe.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_probe.c - * DESCRIPTION: Dynamic Tracing: probe management functions + * DESCRIPTION: DTrace - probe implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_probe_ctx.c b/dtrace/dtrace_probe_ctx.c index 3d92503f72a8..40e8f5c1d529 100644 --- a/dtrace/dtrace_probe_ctx.c +++ b/dtrace/dtrace_probe_ctx.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_probe_ctx.c - * DESCRIPTION: Dynamic Tracing: probe context functions + * DESCRIPTION: DTrace - probe context safe functions * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012, 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_ptofapi.c b/dtrace/dtrace_ptofapi.c index d5e05cd97c8d..4a523167796d 100644 --- a/dtrace/dtrace_ptofapi.c +++ b/dtrace/dtrace_ptofapi.c @@ -1,27 +1,18 @@ /* * FILE: dtrace_ptofapi.c - * DESCRIPTION: Dynamic Tracing: (meta) provider-to-framework API + * DESCRIPTION: DTrace - (meta) provider-to-framework API * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_spec.c b/dtrace/dtrace_spec.c index de124fc81375..03d8d2845746 100644 --- a/dtrace/dtrace_spec.c +++ b/dtrace/dtrace_spec.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_spec.c - * DESCRIPTION: Dynamic Tracing: speculation functions + * DESCRIPTION: DTrace - speculation implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_state.c b/dtrace/dtrace_state.c index 95455bd27b84..9c6ec36aaef7 100644 --- a/dtrace/dtrace_state.c +++ b/dtrace/dtrace_state.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_state.c - * DESCRIPTION: Dynamic Tracing: consumer state functions + * DESCRIPTION: DTrace - consumer state implementation * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/dtrace_util.c b/dtrace/dtrace_util.c index c3ff4b6a0a7b..a4c636a51bca 100644 --- a/dtrace/dtrace_util.c +++ b/dtrace/dtrace_util.c @@ -1,28 +1,18 @@ /* * FILE: dtrace_util.c - * DESCRIPTION: DTrace utility functions + * DESCRIPTION: DTrace - utility functions * - * CDDL HEADER START + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fasttrap_dev.c b/dtrace/fasttrap_dev.c index 25201f41585b..bdb28aec3c97 100644 --- a/dtrace/fasttrap_dev.c +++ b/dtrace/fasttrap_dev.c @@ -1,27 +1,18 @@ /* * FILE: fasttrap_dev.c - * DESCRIPTION: Fasttrap Tracing: device file handling + * DESCRIPTION: DTrace - fasttrap provider device driver * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fasttrap_impl.h b/dtrace/fasttrap_impl.h index d2992fa1f71e..75bfd788fcc6 100644 --- a/dtrace/fasttrap_impl.h +++ b/dtrace/fasttrap_impl.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux - fasttrap provider + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _FASTTRAP_IMPL_H_ #define _FASTTRAP_IMPL_H_ diff --git a/dtrace/fasttrap_mod.c b/dtrace/fasttrap_mod.c index fc85d48405d5..7a813eedf95c 100644 --- a/dtrace/fasttrap_mod.c +++ b/dtrace/fasttrap_mod.c @@ -1,28 +1,18 @@ /* * FILE: fasttrap_mod.c - * DESCRIPTION: Fasttrap Tracing: module handling + * DESCRIPTION: DTrace - fasttrap provider kernel module * - * CDDL HEADER START + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010, 2011, 2012, 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -34,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("Fasttrap Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static dtrace_mops_t fasttrap_mops = { fasttrap_meta_create_probe, diff --git a/dtrace/fbt_dev.c b/dtrace/fbt_dev.c index d2014cac130f..67d487e7cd6b 100644 --- a/dtrace/fbt_dev.c +++ b/dtrace/fbt_dev.c @@ -1,27 +1,18 @@ /* * FILE: fbt_dev.c - * DESCRIPTION: Function Boundary Tracing: device file handling + * DESCRIPTION: DTrace - FBT provider device driver * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/fbt_impl.h b/dtrace/fbt_impl.h index bda21e096ce7..8c6b052b22f1 100644 --- a/dtrace/fbt_impl.h +++ b/dtrace/fbt_impl.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux - Function Boundary Tracing provider + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _FBT_H_ #define _FBT_H_ diff --git a/dtrace/fbt_mod.c b/dtrace/fbt_mod.c index e7d6fd18f30a..22a89ae84445 100644 --- a/dtrace/fbt_mod.c +++ b/dtrace/fbt_mod.c @@ -1,27 +1,18 @@ /* * FILE: fbt_mod.c - * DESCRIPTION: Function Boundary Tracing: module handling + * DESCRIPTION: DTrace - FBT provider kernel module * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -33,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("Function Boundary Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static const dtrace_pattr_t fbt_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, diff --git a/dtrace/include/dtrace/provider_defines.h b/dtrace/include/dtrace/provider_defines.h deleted file mode 100644 index a21b05930a7d..000000000000 --- a/dtrace/include/dtrace/provider_defines.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _DTRACE_PROVIDER_DEFINES_H -#define _DTRACE_PROVIDER_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Provider defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include - -typedef uintptr_t dtrace_provider_id_t; -typedef uintptr_t dtrace_meta_provider_id_t; -typedef struct cred cred_t; -typedef __be32 ipaddr_t; -typedef struct in6_addr in6_addr_t; - -struct dtrace_pops; -struct dtrace_helper_probedesc; -struct dtrace_helper_provdesc; -struct dtrace_mops; -struct dtrace_meta; - -#endif /* _DTRACE_PROVIDER_DEFINES_H */ diff --git a/dtrace/include/sparc64/dtrace/fasttrap_arch.h b/dtrace/include/sparc64/dtrace/fasttrap_arch.h deleted file mode 100644 index c2dd1f198901..000000000000 --- a/dtrace/include/sparc64/dtrace/fasttrap_arch.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _SPARC64_FASTTRAP_ARCH_H -#define _SPARC64_FASTTRAP_ARCH_H - -/* - * Fasttrap Tracing Implementation defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#define FASTTRAP_OFFSET_AFRAMES 0 - -#endif /* _SPARC64_FASTTRAP_ARCH_H */ diff --git a/dtrace/include/sparc64/dtrace/mod_arch.h b/dtrace/include/sparc64/dtrace/mod_arch.h deleted file mode 100644 index b61fc3e04683..000000000000 --- a/dtrace/include/sparc64/dtrace/mod_arch.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _SPARC64_MOD_ARCH_H -#define _SPARC64_MOD_ARCH_H - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -/* - * Structure to hold DTrace specific information about modules (including the - * core kernel module). Note that each module (and the main kernel) already - * has three fields that relate to probing: - * - sdt_probes: description of SDT probes in the module - * - sdt_probec: number of SDT probes in the module - * - pdata: pointer to a dtrace_module struct (for DTrace) - */ -typedef struct dtrace_module { - int enabled_cnt; - size_t sdt_probe_cnt; - asm_instr_t *sdt_tab; - size_t fbt_probe_cnt; - asm_instr_t *fbt_tab; -} dtrace_module_t; - -#endif /* _SPARC64_MOD_ARCH_H */ diff --git a/dtrace/include/sparc64/dtrace/sdt_arch.h b/dtrace/include/sparc64/dtrace/sdt_arch.h deleted file mode 100644 index 096b9ae944b7..000000000000 --- a/dtrace/include/sparc64/dtrace/sdt_arch.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _SPARC64_SDT_ARCH_H -#define _SPARC64_SDT_ARCH_H - -/* - * Statically Defined Tracing Implementation defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#define SDT_AFRAMES 1 - -#endif /* _SPARC64_SDT_ARCH_H */ diff --git a/dtrace/include/uapi/linux/dtrace/actions.h b/dtrace/include/uapi/linux/dtrace/actions.h deleted file mode 100644 index 304c01d59275..000000000000 --- a/dtrace/include/uapi/linux/dtrace/actions.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _LINUX_DTRACE_ACTIONS_H -#define _LINUX_DTRACE_ACTIONS_H - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -#endif /* _LINUX_DTRACE_ACTIONS_H */ diff --git a/dtrace/include/uapi/linux/dtrace/arg_defines.h b/dtrace/include/uapi/linux/dtrace/arg_defines.h deleted file mode 100644 index 28dad982ad39..000000000000 --- a/dtrace/include/uapi/linux/dtrace/arg_defines.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _LINUX_DTRACE_ARG_DEFINES_H -#define _LINUX_DTRACE_ARG_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Argument Types defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_argdesc; - -#endif /* _LINUX_DTRACE_ARG_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/buffer_defines.h b/dtrace/include/uapi/linux/dtrace/buffer_defines.h deleted file mode 100644 index eaa12ab96505..000000000000 --- a/dtrace/include/uapi/linux/dtrace/buffer_defines.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _LINUX_DTRACE_BUFFER_DEFINES_H -#define _LINUX_DTRACE_BUFFER_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Buffer Interface - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_bufdesc; - -#endif /* _LINUX_DTRACE_BUFFER_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/conf.h b/dtrace/include/uapi/linux/dtrace/conf.h deleted file mode 100644 index 06bcdc0641a6..000000000000 --- a/dtrace/include/uapi/linux/dtrace/conf.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _LINUX_DTRACE_CONF_H -#define _LINUX_DTRACE_CONF_H - -/* - * DTrace Dynamic Tracing Software: DTrace Configuration - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include - -/* - * User-level may need to understand some elements of the kernel DTrace - * configuration in order to generate correct DIF. This information is - * conveyed via the dtrace_conf structure. - */ -typedef struct dtrace_conf { - uint_t dtc_difversion; /* supported DIF version */ - uint_t dtc_difintregs; /* # of DIF integer registers */ - uint_t dtc_diftupregs; /* # of DIF tuple registers */ - uint_t dtc_ctfmodel; /* CTF data model */ - /* Deviation from Solaris... Used to just be 8 padding entries. */ - uint_t dtc_maxbufs; /* max # of buffers */ - uint_t dtc_pad[7]; /* reserved for future use */ -} dtrace_conf_t; - -#endif /* _LINUX_DTRACE_CONF_H */ diff --git a/dtrace/include/uapi/linux/dtrace/conf_defines.h b/dtrace/include/uapi/linux/dtrace/conf_defines.h deleted file mode 100644 index 950b3475a467..000000000000 --- a/dtrace/include/uapi/linux/dtrace/conf_defines.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _LINUX_DTRACE_CONF_DEFINES_H -#define _LINUX_DTRACE_CONF_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Configuration defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_conf; - -#endif /* _LINUX_DTRACE_CONF_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/difo_defines.h b/dtrace/include/uapi/linux/dtrace/difo_defines.h deleted file mode 100644 index ee5a854fd6af..000000000000 --- a/dtrace/include/uapi/linux/dtrace/difo_defines.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _LINUX_DTRACE_DIFO_DEFINES_H -#define _LINUX_DTRACE_DIFO_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Intermediate Format Object (DIFO) defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_difo; - -#endif /* _LINUX_DTRACE_DIFO_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/dtrace.h b/dtrace/include/uapi/linux/dtrace/dtrace.h deleted file mode 100644 index 6f30bc429764..000000000000 --- a/dtrace/include/uapi/linux/dtrace/dtrace.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _LINUX_DTRACE_H_ -#define _LINUX_DTRACE_H_ - -/* - * DTrace Dynamic Tracing Software: Kernel Interfaces - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif /* _LINUX_DTRACE_H_ */ diff --git a/dtrace/include/uapi/linux/dtrace/enabling_defines.h b/dtrace/include/uapi/linux/dtrace/enabling_defines.h deleted file mode 100644 index 68824148421f..000000000000 --- a/dtrace/include/uapi/linux/dtrace/enabling_defines.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _LINUX_DTRACE_ENABLING_DEFINES_H -#define _LINUX_DTRACE_ENABLING_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Enabling Description Structures - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_probedesc; -struct dtrace_repldesc; -struct dtrace_preddesc; -struct dtrace_actdesc; -struct dtrace_ecbdesc; - -#endif /* _LINUX_DTRACE_ENABLING_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/fasttrap_defines.h b/dtrace/include/uapi/linux/dtrace/fasttrap_defines.h deleted file mode 100644 index 69e5329303b2..000000000000 --- a/dtrace/include/uapi/linux/dtrace/fasttrap_defines.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _LINUX_DTRACE_FASTTRAP_DEFINES_H -#define _LINUX_DTRACE_FASTTRAP_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: Fasttrap Provider - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -enum fasttrap_probe_type; -struct fasttrap_probe_spec; -struct fasttrap_instr_query; - -#endif /* _LINUX_DTRACE_FASTTRAP_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/fasttrap_ioctl.h b/dtrace/include/uapi/linux/dtrace/fasttrap_ioctl.h deleted file mode 100644 index 556563a7c536..000000000000 --- a/dtrace/include/uapi/linux/dtrace/fasttrap_ioctl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2011, 2012, 2013 Oracle, Inc. */ - -#ifndef _LINUX_DTRACE_FASTRRAP_IOCTL_H_ -#define _LINUX_DTRACE_FASTTRAP_IOCTL_H_ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include - -#define FASTTRAPIOC 0xf4 -#define FASTTRAPIOC_MAKEPROBE _IOW(FASTTRAPIOC, 1, fasttrap_probe_spec_t) -#define FASTTRAPIOC_GETINSTR _IOR(FASTTRAPIOC, 2, fasttrap_instr_query_t) - -#endif /* _LINUX_DTRACE_FASTTRAP_IOCTL_H_ */ diff --git a/dtrace/include/uapi/linux/dtrace/faults.h b/dtrace/include/uapi/linux/dtrace/faults.h deleted file mode 100644 index abcbe8ed023a..000000000000 --- a/dtrace/include/uapi/linux/dtrace/faults.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _LINUX_DTRACE_FAULTS_H -#define _LINUX_DTRACE_FAULTS_H - -/* - * DTrace Dynamic Tracing Software: DTrace Faults - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include - -#endif /* _LINUX_DTRACE_FAULTS_H */ diff --git a/dtrace/include/uapi/linux/dtrace/helpers_defines.h b/dtrace/include/uapi/linux/dtrace/helpers_defines.h deleted file mode 100644 index e8c4aa29d405..000000000000 --- a/dtrace/include/uapi/linux/dtrace/helpers_defines.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _LINUX_DTRACE_HELPERS_DEFINES_H -#define _LINUX_DTRACE_HELPERS_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Helpers defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dof_helper; - -#endif /* _LINUX_DTRACE_HELPERS_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/ioctl_debug.h b/dtrace/include/uapi/linux/dtrace/ioctl_debug.h deleted file mode 100644 index 90c326b30de7..000000000000 --- a/dtrace/include/uapi/linux/dtrace/ioctl_debug.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2013 Oracle, Inc. */ - -#ifndef _LINUX_DTRACE_IOCTL_DEBUG_H_ -#define _LINUX_DTRACE_IOCTL_DEBUG_H_ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -void dtrace_size_dbg_print(const char *type, size_t size); - -static void dtrace_ioctl_sizes(void) { -#define DBG_PRINT(x) dtrace_size_dbg_print(#x, sizeof(x)) - DBG_PRINT(dtrace_providerdesc_t); - DBG_PRINT(dtrace_probedesc_t); - DBG_PRINT(dtrace_bufdesc_t); - DBG_PRINT(dtrace_eprobedesc_t); - DBG_PRINT(dtrace_argdesc_t); - DBG_PRINT(dtrace_conf_t); - DBG_PRINT(dtrace_status_t); - DBG_PRINT(processorid_t); - DBG_PRINT(dtrace_aggdesc_t); - DBG_PRINT(dtrace_fmtdesc_t); - DBG_PRINT(dof_hdr_t); -#undef DBG_PRINT -} - -#endif /* _LINUX_DTRACE_IOCTL_DEBUG_H */ diff --git a/dtrace/include/uapi/linux/dtrace/metadesc_defines.h b/dtrace/include/uapi/linux/dtrace/metadesc_defines.h deleted file mode 100644 index 16cb16fe0860..000000000000 --- a/dtrace/include/uapi/linux/dtrace/metadesc_defines.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _LINUX_DTRACE_METADESC_DEFINES_H -#define _LINUX_DTRACE_METADESC_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Metadata Description Structures defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -struct dtrace_recdesc; -struct dtrace_eprobedesc; -struct dtrace_aggdesc; -struct dtrace_fmtdesc; - -#endif /* _LINUX_DTRACE_METADESC_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/options.h b/dtrace/include/uapi/linux/dtrace/options.h deleted file mode 100644 index ef3bf0a2048d..000000000000 --- a/dtrace/include/uapi/linux/dtrace/options.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _LINUX_DTRACE_OPTIONS_H -#define _LINUX_DTRACE_OPTIONS_H - -/* - * DTrace Dynamic Tracing Software: DTrace Option Interface - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include - -#endif /* _LINUX_DTRACE_OPTIONS_H */ diff --git a/dtrace/include/x86_64/dtrace/fasttrap_arch.h b/dtrace/include/x86_64/dtrace/fasttrap_arch.h deleted file mode 100644 index a839c9e860b7..000000000000 --- a/dtrace/include/x86_64/dtrace/fasttrap_arch.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _X86_64_FASTTRAP_ARCH_H -#define _X86_64_FASTTRAP_ARCH_H - -/* - * Fasttrap Tracing Implementation defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2016 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#define FASTTRAP_OFFSET_AFRAMES 3 - -#endif /* _X86_64_FASTTRAP_ARCH_H */ diff --git a/dtrace/include/x86_64/dtrace/mod_arch.h b/dtrace/include/x86_64/dtrace/mod_arch.h deleted file mode 100644 index 2aa222011f13..000000000000 --- a/dtrace/include/x86_64/dtrace/mod_arch.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _X86_64_MOD_ARCH_H -#define _X86_64_MOD_ARCH_H - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include - -/* - * Structure to hold DTrace specific information about modules (including the - * core kernel module). Note that each module (and the main kernel) already - * has three fields that relate to probing: - * - sdt_probes: description of SDT probes in the module - * - sdt_probec: number of SDT probes in the module - * - pdata: pointer to a dtrace_module struct (for DTrace) - */ -typedef struct dtrace_module { - int enabled_cnt; - size_t sdt_probe_cnt; - size_t fbt_probe_cnt; -} dtrace_module_t; - -#endif /* _X86_64_MOD_ARCH_H */ diff --git a/dtrace/include/x86_64/dtrace/sdt_arch.h b/dtrace/include/x86_64/dtrace/sdt_arch.h deleted file mode 100644 index a24ec3c7e3e5..000000000000 --- a/dtrace/include/x86_64/dtrace/sdt_arch.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _X86_64_SDT_ARCH_H -#define _X86_64_SDT_ARCH_H - -/* - * Statically Defined Tracing Implementation defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#define SDT_AFRAMES 4 - -#endif /* _X86_64_SDT_ARCH_H */ diff --git a/dtrace/profile.h b/dtrace/profile.h index 40949f8dce12..9fd8ed3c081f 100644 --- a/dtrace/profile.h +++ b/dtrace/profile.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux - profile provider + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _PROFILE_H_ #define _PROFILE_H_ diff --git a/dtrace/profile_dev.c b/dtrace/profile_dev.c index f855ed805db3..f2abd275f201 100644 --- a/dtrace/profile_dev.c +++ b/dtrace/profile_dev.c @@ -1,28 +1,18 @@ /* * FILE: profile_dev.c - * DESCRIPTION: Profile Interrupt Tracing: device file handling + * DESCRIPTION: DTrace - profile provider device driver * - * CDDL HEADER START + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/profile_mod.c b/dtrace/profile_mod.c index a2d9f10519ce..d9eb66c283b9 100644 --- a/dtrace/profile_mod.c +++ b/dtrace/profile_mod.c @@ -1,27 +1,18 @@ /* * FILE: profile_mod.c - * DESCRIPTION: Profile Interrupt Tracing: module handling + * DESCRIPTION: DTrace - Profile provider kernel module * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -33,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("Profile Interrupt Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static const dtrace_pattr_t profile_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, diff --git a/dtrace/sdt_dev.c b/dtrace/sdt_dev.c index 01a5e16c7557..e57f85bfb1ea 100644 --- a/dtrace/sdt_dev.c +++ b/dtrace/sdt_dev.c @@ -1,27 +1,18 @@ /* * FILE: sdt_dev.c - * DESCRIPTION: Statically Defined Tracing: device file handling + * DESCRIPTION: DTrace - SDT provider device driver * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/sdt_impl.h b/dtrace/sdt_impl.h index 70cd704612cd..4ad25847b004 100644 --- a/dtrace/sdt_impl.h +++ b/dtrace/sdt_impl.h @@ -1,3 +1,19 @@ +/* + * Dynamic Tracing for Linux - Statically Defined Tracing provider + * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _SDT_IMPL_H_ #define _SDT_IMPL_H_ diff --git a/dtrace/sdt_mod.c b/dtrace/sdt_mod.c index aa45e0c0c72e..8203878b3b25 100644 --- a/dtrace/sdt_mod.c +++ b/dtrace/sdt_mod.c @@ -1,28 +1,18 @@ /* * FILE: sdt_mod.c - * DESCRIPTION: Statically Defined Tracing: module handling + * DESCRIPTION: DTrace - SDT provider kernel module * + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -34,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("Profile Interrupt Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static dtrace_pattr_t vtrace_attr = { { DTRACE_STABILITY_UNSTABLE, DTRACE_STABILITY_UNSTABLE, DTRACE_CLASS_ISA }, diff --git a/dtrace/systrace.h b/dtrace/systrace.h index d726cb3a3282..c4366018c537 100644 --- a/dtrace/systrace.h +++ b/dtrace/systrace.h @@ -1,26 +1,19 @@ /* - * CDDL HEADER START + * Dynamic Tracing for Linux - syscall tracing provider * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ -/* Copyright (C) 2011 Oracle Corporation */ - #ifndef _SYSTRACE_H_ #define _SYSTRACE_H_ diff --git a/dtrace/systrace_dev.c b/dtrace/systrace_dev.c index 49ebb4040ce8..d34e19fb2f43 100644 --- a/dtrace/systrace_dev.c +++ b/dtrace/systrace_dev.c @@ -1,28 +1,18 @@ /* * FILE: systrace_dev.c - * DESCRIPTION: System Call Tracing: device file handling + * DESCRIPTION: DTrace - systrace provider device driver * - * CDDL HEADER START + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2010-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/dtrace/systrace_mod.c b/dtrace/systrace_mod.c index 3d1f258f7455..020ef70c0d06 100644 --- a/dtrace/systrace_mod.c +++ b/dtrace/systrace_mod.c @@ -1,27 +1,18 @@ /* * FILE: systrace_mod.c - * DESCRIPTION: System Call Tracing: module handling + * DESCRIPTION: DTrace - systrace provider kernel module * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include @@ -33,7 +24,7 @@ MODULE_AUTHOR("Kris Van Hees (kris.van.hees@oracle.com)"); MODULE_DESCRIPTION("System Call Tracing"); MODULE_VERSION("v0.1"); -MODULE_LICENSE("CDDL"); +MODULE_LICENSE("GPL"); static const dtrace_pattr_t syscall_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, diff --git a/dtrace/include/dtrace/dtrace_impl.h b/include/dtrace/dtrace_impl.h similarity index 97% rename from dtrace/include/dtrace/dtrace_impl.h rename to include/dtrace/dtrace_impl.h index 0eac655974dc..6df1220fc731 100644 --- a/dtrace/include/dtrace/dtrace_impl.h +++ b/include/dtrace/dtrace_impl.h @@ -1,37 +1,27 @@ -#ifndef _LINUX_DTRACE_IMPL_H -#define _LINUX_DTRACE_IMPL_H - -/* - * DTrace Dynamic Tracing Software: DTrace Implementation - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * Dynamic Tracing for Linux - Implementation * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright 2009-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_IMPL_H +#define _LINUX_DTRACE_IMPL_H + #include #include diff --git a/dtrace/include/dtrace/dtrace_impl_defines.h b/include/dtrace/dtrace_impl_defines.h similarity index 84% rename from dtrace/include/dtrace/dtrace_impl_defines.h rename to include/dtrace/dtrace_impl_defines.h index 443df6bffc85..1880401bb89f 100644 --- a/dtrace/include/dtrace/dtrace_impl_defines.h +++ b/include/dtrace/dtrace_impl_defines.h @@ -1,37 +1,27 @@ -#ifndef _LINUX_DTRACE_IMPL_DEFINES_H -#define _LINUX_DTRACE_IMPL_DEFINES_H - -/* - * DTrace Dynamic Tracing Software: DTrace Implementation defines - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * Dynamic Tracing for Linux - Implementation Defines * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * - * CDDL HEADER END + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * Copyright 2009-2014 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_IMPL_DEFINES_H +#define _LINUX_DTRACE_IMPL_DEFINES_H + #include #include #include diff --git a/dtrace/include/dtrace/provider.h b/include/dtrace/provider.h similarity index 97% rename from dtrace/include/dtrace/provider.h rename to include/dtrace/provider.h index 7c2a91b35dff..a3c13779c67b 100644 --- a/dtrace/include/dtrace/provider.h +++ b/include/dtrace/provider.h @@ -1,36 +1,27 @@ -#ifndef _DTRACE_PROVIDER_H -#define _DTRACE_PROVIDER_H - /* - * DTrace Dynamic Tracing Software: DTrace Provider API + * Dynamic Tracing for Linux - Provider API * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. */ +#ifndef _DTRACE_PROVIDER_H +#define _DTRACE_PROVIDER_H + /* * The following functions are implemented by the DTrace framework and are * used to implement separate in-kernel DTrace providers. diff --git a/include/dtrace/provider_defines.h b/include/dtrace/provider_defines.h new file mode 100644 index 000000000000..a4c7c60cfc41 --- /dev/null +++ b/include/dtrace/provider_defines.h @@ -0,0 +1,41 @@ +/* + * Dynamic Tracing for Linux - Provider defines + * + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _DTRACE_PROVIDER_DEFINES_H +#define _DTRACE_PROVIDER_DEFINES_H + +#include +#include +#include + +typedef uintptr_t dtrace_provider_id_t; +typedef uintptr_t dtrace_meta_provider_id_t; +typedef struct cred cred_t; +typedef __be32 ipaddr_t; +typedef struct in6_addr in6_addr_t; + +struct dtrace_pops; +struct dtrace_helper_probedesc; +struct dtrace_helper_provdesc; +struct dtrace_mops; +struct dtrace_meta; + +#endif /* _DTRACE_PROVIDER_DEFINES_H */ diff --git a/dtrace/include/dtrace/types.h b/include/dtrace/types.h similarity index 79% rename from dtrace/include/dtrace/types.h rename to include/dtrace/types.h index 58f0331b9475..367406f22eae 100644 --- a/dtrace/include/dtrace/types.h +++ b/include/dtrace/types.h @@ -1,37 +1,27 @@ -#ifndef _DTRACE_TYPES_H -#define _DTRACE_TYPES_H - -/* - * DTrace Dynamic Tracing Software: DTrace kernel types - * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. - */ - /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Dynamic Tracing for Linux - Kernel Types * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * CDDL HEADER END - * - * Copyright 2009-2017 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _DTRACE_TYPES_H +#define _DTRACE_TYPES_H + /* * This file contains types needed to parse the DTrace shared userspace/ kernel * headers, and a few others (it has not been gardened to remove constants used diff --git a/include/linux/dtrace/cpu_defines.h b/include/linux/dtrace/cpu_defines.h new file mode 100644 index 000000000000..b6f87bd05bf5 --- /dev/null +++ b/include/linux/dtrace/cpu_defines.h @@ -0,0 +1,62 @@ +/* Copyright (C) 2011-2014 Oracle, Inc. */ + +#ifndef _LINUX_DTRACE_CPU_DEFINES_H_ +#define _LINUX_DTRACE_CPU_DEFINES_H_ + +#include + +#define CPUC_SIZE (sizeof (uint16_t) + sizeof(uint8_t) + \ + sizeof(uintptr_t) + sizeof(struct mutex)) +#define CPUC_PADSIZE (192 - CPUC_SIZE) + +#define per_cpu_core(cpu) (&per_cpu(dtrace_cpu_core, (cpu))) +#if 0 +# define this_cpu_core (this_cpu_ptr(&dtrace_cpu_core)) +#else +# define this_cpu_core (per_cpu_core(smp_processor_id())) +#endif + +#define DTRACE_CPUFLAG_ISSET(flag) \ + (this_cpu_core->cpuc_dtrace_flags & (flag)) + +#define DTRACE_CPUFLAG_SET(flag) \ + (this_cpu_core->cpuc_dtrace_flags |= (flag)) + +#define DTRACE_CPUFLAG_CLEAR(flag) \ + (this_cpu_core->cpuc_dtrace_flags &= ~(flag)) + +#define CPU_DTRACE_NOFAULT 0x0001 +#define CPU_DTRACE_DROP 0x0002 +#define CPU_DTRACE_BADADDR 0x0004 +#define CPU_DTRACE_BADALIGN 0x0008 +#define CPU_DTRACE_DIVZERO 0x0010 +#define CPU_DTRACE_ILLOP 0x0020 +#define CPU_DTRACE_NOSCRATCH 0x0040 +#define CPU_DTRACE_KPRIV 0x0080 +#define CPU_DTRACE_UPRIV 0x0100 +#define CPU_DTRACE_TUPOFLOW 0x0200 +#define CPU_DTRACE_ENTRY 0x0800 +#define CPU_DTRACE_BADSTACK 0x1000 +#define CPU_DTRACE_NOPF 0x2000 +#define CPU_DTRACE_PF_TRAPPED 0x4000 +#define CPU_DTRACE_PROBE_CTX 0x8000 + +#define CPU_DTRACE_FAULT (CPU_DTRACE_BADADDR | CPU_DTRACE_BADALIGN | \ + CPU_DTRACE_DIVZERO | CPU_DTRACE_ILLOP | \ + CPU_DTRACE_NOSCRATCH | CPU_DTRACE_KPRIV | \ + CPU_DTRACE_UPRIV | CPU_DTRACE_TUPOFLOW | \ + CPU_DTRACE_BADSTACK | CPU_DTRACE_PF_TRAPPED) +#define CPU_DTRACE_ERROR (CPU_DTRACE_FAULT | CPU_DTRACE_DROP) + +typedef uint32_t processorid_t; +typedef uint32_t psetid_t; +typedef uint32_t chipid_t; +typedef uint32_t lgrp_id_t; + +struct cpu_core; +struct cpuinfo; + +#define per_cpu_info(cpu) (&per_cpu(dtrace_cpu_info, (cpu))) +#define this_cpu_info (this_cpu_ptr(&dtrace_cpu_info)) + +#endif /* _LINUX_DTRACE_CPU_DEFINES_H_ */ diff --git a/include/linux/dtrace_cpu_defines.h b/include/linux/dtrace_cpu_defines.h index 52e777291788..2b8305a2db4b 100644 --- a/include/linux/dtrace_cpu_defines.h +++ b/include/linux/dtrace_cpu_defines.h @@ -1,62 +1 @@ -/* Copyright (C) 2011-2014 Oracle, Inc. */ - -#ifndef _LINUX_DTRACE_CPU_DEFINES_H_ -#define _LINUX_DTRACE_CPU_DEFINES_H_ - -#include - -#define CPUC_SIZE (sizeof (uint16_t) + sizeof(uint8_t) + \ - sizeof(uintptr_t) + sizeof(struct mutex)) -#define CPUC_PADSIZE (192 - CPUC_SIZE) - -#define per_cpu_core(cpu) (&per_cpu(dtrace_cpu_core, (cpu))) -#if 0 -# define this_cpu_core (this_cpu_ptr(&dtrace_cpu_core)) -#else -# define this_cpu_core (per_cpu_core(smp_processor_id())) -#endif - -#define DTRACE_CPUFLAG_ISSET(flag) \ - (this_cpu_core->cpuc_dtrace_flags & (flag)) - -#define DTRACE_CPUFLAG_SET(flag) \ - (this_cpu_core->cpuc_dtrace_flags |= (flag)) - -#define DTRACE_CPUFLAG_CLEAR(flag) \ - (this_cpu_core->cpuc_dtrace_flags &= ~(flag)) - -#define CPU_DTRACE_NOFAULT 0x0001 -#define CPU_DTRACE_DROP 0x0002 -#define CPU_DTRACE_BADADDR 0x0004 -#define CPU_DTRACE_BADALIGN 0x0008 -#define CPU_DTRACE_DIVZERO 0x0010 -#define CPU_DTRACE_ILLOP 0x0020 -#define CPU_DTRACE_NOSCRATCH 0x0040 -#define CPU_DTRACE_KPRIV 0x0080 -#define CPU_DTRACE_UPRIV 0x0100 -#define CPU_DTRACE_TUPOFLOW 0x0200 -#define CPU_DTRACE_ENTRY 0x0800 -#define CPU_DTRACE_BADSTACK 0x1000 -#define CPU_DTRACE_NOPF 0x2000 -#define CPU_DTRACE_PF_TRAPPED 0x4000 -#define CPU_DTRACE_PROBE_CTX 0x8000 - -#define CPU_DTRACE_FAULT (CPU_DTRACE_BADADDR | CPU_DTRACE_BADALIGN | \ - CPU_DTRACE_DIVZERO | CPU_DTRACE_ILLOP | \ - CPU_DTRACE_NOSCRATCH | CPU_DTRACE_KPRIV | \ - CPU_DTRACE_UPRIV | CPU_DTRACE_TUPOFLOW | \ - CPU_DTRACE_BADSTACK | CPU_DTRACE_PF_TRAPPED) -#define CPU_DTRACE_ERROR (CPU_DTRACE_FAULT | CPU_DTRACE_DROP) - -typedef uint32_t processorid_t; -typedef uint32_t psetid_t; -typedef uint32_t chipid_t; -typedef uint32_t lgrp_id_t; - -struct cpu_core; -struct cpuinfo; - -#define per_cpu_info(cpu) (&per_cpu(dtrace_cpu_info, (cpu))) -#define this_cpu_info (this_cpu_ptr(&dtrace_cpu_info)) - -#endif /* _LINUX_DTRACE_CPU_DEFINES_H_ */ +#include diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 1a0006a76b00..3b83b8ebf0b6 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -23,6 +23,8 @@ header-y += netfilter_ipv6/ header-y += usb/ header-y += wimax/ +header-y += dtrace/ + genhdr-y += version.h ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \ diff --git a/include/uapi/linux/dtrace/Kbuild b/include/uapi/linux/dtrace/Kbuild new file mode 100644 index 000000000000..0cb5b941b72b --- /dev/null +++ b/include/uapi/linux/dtrace/Kbuild @@ -0,0 +1,35 @@ +# UAPI Header export list +header-y += actions_defines.h +header-y += actions.h +header-y += arg_defines.h +header-y += arg.h +header-y += buffer_defines.h +header-y += buffer.h +header-y += conf_defines.h +header-y += conf.h +header-y += cpu_defines.h +header-y += dif_defines.h +header-y += dif.h +header-y += difo_defines.h +header-y += difo.h +header-y += dof_defines.h +header-y += dof.h +header-y += dtrace.h +header-y += enabling_defines.h +header-y += enabling.h +header-y += fasttrap_defines.h +header-y += fasttrap.h +header-y += fasttrap_ioctl.h +header-y += faults_defines.h +header-y += faults.h +header-y += helpers_defines.h +header-y += helpers.h +header-y += ioctl.h +header-y += metadesc_defines.h +header-y += metadesc.h +header-y += options_defines.h +header-y += options.h +header-y += stability_defines.h +header-y += stability.h +header-y += status.h +header-y += universal.h diff --git a/include/uapi/linux/dtrace/actions.h b/include/uapi/linux/dtrace/actions.h new file mode 100644 index 000000000000..51edbc75aa63 --- /dev/null +++ b/include/uapi/linux/dtrace/actions.h @@ -0,0 +1,13 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +#ifndef _LINUX_DTRACE_ACTIONS_H +#define _LINUX_DTRACE_ACTIONS_H + +#include + +#endif /* _LINUX_DTRACE_ACTIONS_H */ diff --git a/dtrace/include/uapi/linux/dtrace/actions_defines.h b/include/uapi/linux/dtrace/actions_defines.h similarity index 84% rename from dtrace/include/uapi/linux/dtrace/actions_defines.h rename to include/uapi/linux/dtrace/actions_defines.h index 05a5e28518be..8a943bfcb7c2 100644 --- a/dtrace/include/uapi/linux/dtrace/actions_defines.h +++ b/include/uapi/linux/dtrace/actions_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_ACTIONS_DEFINES_H -#define _LINUX_DTRACE_ACTIONS_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Actions defines - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_ACTIONS_DEFINES_H +#define _LINUX_DTRACE_ACTIONS_DEFINES_H #include diff --git a/dtrace/include/uapi/linux/dtrace/arg.h b/include/uapi/linux/dtrace/arg.h similarity index 59% rename from dtrace/include/uapi/linux/dtrace/arg.h rename to include/uapi/linux/dtrace/arg.h index 1ee5fc4f01e4..fdc959b8ea56 100644 --- a/dtrace/include/uapi/linux/dtrace/arg.h +++ b/include/uapi/linux/dtrace/arg.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_ARG_H -#define _LINUX_DTRACE_ARG_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Argument Types - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_ARG_H +#define _LINUX_DTRACE_ARG_H #include #include diff --git a/include/uapi/linux/dtrace/arg_defines.h b/include/uapi/linux/dtrace/arg_defines.h new file mode 100644 index 000000000000..c8eab9d72b2a --- /dev/null +++ b/include/uapi/linux/dtrace/arg_defines.h @@ -0,0 +1,20 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_ARG_DEFINES_H +#define _LINUX_DTRACE_ARG_DEFINES_H + +#include + +struct dtrace_argdesc; + +#endif /* _LINUX_DTRACE_ARG_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/buffer.h b/include/uapi/linux/dtrace/buffer.h similarity index 61% rename from dtrace/include/uapi/linux/dtrace/buffer.h rename to include/uapi/linux/dtrace/buffer.h index d00cced2cc4d..31a8a12df968 100644 --- a/dtrace/include/uapi/linux/dtrace/buffer.h +++ b/include/uapi/linux/dtrace/buffer.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_BUFFER_H -#define _LINUX_DTRACE_BUFFER_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Buffer Interface - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_BUFFER_H +#define _LINUX_DTRACE_BUFFER_H #include #include diff --git a/include/uapi/linux/dtrace/buffer_defines.h b/include/uapi/linux/dtrace/buffer_defines.h new file mode 100644 index 000000000000..136190d33e8f --- /dev/null +++ b/include/uapi/linux/dtrace/buffer_defines.h @@ -0,0 +1,20 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_BUFFER_DEFINES_H +#define _LINUX_DTRACE_BUFFER_DEFINES_H + +#include + +struct dtrace_bufdesc; + +#endif /* _LINUX_DTRACE_BUFFER_DEFINES_H */ diff --git a/include/uapi/linux/dtrace/conf.h b/include/uapi/linux/dtrace/conf.h new file mode 100644 index 000000000000..1a6cc9f61a07 --- /dev/null +++ b/include/uapi/linux/dtrace/conf.h @@ -0,0 +1,34 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_CONF_H +#define _LINUX_DTRACE_CONF_H + +#include +#include + +/* + * User-level may need to understand some elements of the kernel DTrace + * configuration in order to generate correct DIF. This information is + * conveyed via the dtrace_conf structure. + */ +typedef struct dtrace_conf { + uint_t dtc_difversion; /* supported DIF version */ + uint_t dtc_difintregs; /* # of DIF integer registers */ + uint_t dtc_diftupregs; /* # of DIF tuple registers */ + uint_t dtc_ctfmodel; /* CTF data model */ + /* Deviation from Solaris... Used to just be 8 padding entries. */ + uint_t dtc_maxbufs; /* max # of buffers */ + uint_t dtc_pad[7]; /* reserved for future use */ +} dtrace_conf_t; + +#endif /* _LINUX_DTRACE_CONF_H */ diff --git a/include/uapi/linux/dtrace/conf_defines.h b/include/uapi/linux/dtrace/conf_defines.h new file mode 100644 index 000000000000..18c525beac00 --- /dev/null +++ b/include/uapi/linux/dtrace/conf_defines.h @@ -0,0 +1,20 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_CONF_DEFINES_H +#define _LINUX_DTRACE_CONF_DEFINES_H + +#include + +struct dtrace_conf; + +#endif /* _LINUX_DTRACE_CONF_DEFINES_H */ diff --git a/include/uapi/linux/dtrace/cpu_defines.h b/include/uapi/linux/dtrace/cpu_defines.h new file mode 100644 index 000000000000..1a4d4210665e --- /dev/null +++ b/include/uapi/linux/dtrace/cpu_defines.h @@ -0,0 +1,16 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +#ifndef _LINUX_DTRACE_CPU_DEFINES_H_ +#define _LINUX_DTRACE_CPU_DEFINES_H_ + +typedef uint32_t processorid_t; +typedef uint32_t psetid_t; +typedef uint32_t chipid_t; +typedef uint32_t lgrp_id_t; + +#endif /* _LINUX_DTRACE_CPU_DEFINES_H_ */ diff --git a/dtrace/include/uapi/linux/dtrace/dif.h b/include/uapi/linux/dtrace/dif.h similarity index 63% rename from dtrace/include/uapi/linux/dtrace/dif.h rename to include/uapi/linux/dtrace/dif.h index 80c115699dc0..e04f498c3c54 100644 --- a/dtrace/include/uapi/linux/dtrace/dif.h +++ b/include/uapi/linux/dtrace/dif.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_DIF_H -#define _LINUX_DTRACE_DIF_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Intermediate Format (DIF) - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_DIF_H +#define _LINUX_DTRACE_DIF_H #include #include diff --git a/dtrace/include/uapi/linux/dtrace/dif_defines.h b/include/uapi/linux/dtrace/dif_defines.h similarity index 91% rename from dtrace/include/uapi/linux/dtrace/dif_defines.h rename to include/uapi/linux/dtrace/dif_defines.h index ea77988b788e..6538a352e81f 100644 --- a/dtrace/include/uapi/linux/dtrace/dif_defines.h +++ b/include/uapi/linux/dtrace/dif_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_DIF_DEFINES_H -#define _LINUX_DTRACE_DIF_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Intermediate Format (DIF) defines - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_DIF_DEFINES_H +#define _LINUX_DTRACE_DIF_DEFINES_H #include diff --git a/dtrace/include/uapi/linux/dtrace/difo.h b/include/uapi/linux/dtrace/difo.h similarity index 68% rename from dtrace/include/uapi/linux/dtrace/difo.h rename to include/uapi/linux/dtrace/difo.h index 10922263f8f2..d2c1144fbda2 100644 --- a/dtrace/include/uapi/linux/dtrace/difo.h +++ b/include/uapi/linux/dtrace/difo.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_DIFO_H -#define _LINUX_DTRACE_DIFO_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Intermediate Format Object (DIFO) - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_DIFO_H +#define _LINUX_DTRACE_DIFO_H #include #include diff --git a/include/uapi/linux/dtrace/difo_defines.h b/include/uapi/linux/dtrace/difo_defines.h new file mode 100644 index 000000000000..3e95590d8903 --- /dev/null +++ b/include/uapi/linux/dtrace/difo_defines.h @@ -0,0 +1,20 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_DIFO_DEFINES_H +#define _LINUX_DTRACE_DIFO_DEFINES_H + +#include + +struct dtrace_difo; + +#endif /* _LINUX_DTRACE_DIFO_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/dof.h b/include/uapi/linux/dtrace/dof.h similarity index 90% rename from dtrace/include/uapi/linux/dtrace/dof.h rename to include/uapi/linux/dtrace/dof.h index e6521891d90e..e5dce0b18566 100644 --- a/dtrace/include/uapi/linux/dtrace/dof.h +++ b/include/uapi/linux/dtrace/dof.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_DOF_H -#define _LINUX_DTRACE_DOF_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Object Format (DOF) - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_DOF_H +#define _LINUX_DTRACE_DOF_H #include #include diff --git a/dtrace/include/uapi/linux/dtrace/dof_defines.h b/include/uapi/linux/dtrace/dof_defines.h similarity index 88% rename from dtrace/include/uapi/linux/dtrace/dof_defines.h rename to include/uapi/linux/dtrace/dof_defines.h index 68d7e69f7dc7..15a508af6d01 100644 --- a/dtrace/include/uapi/linux/dtrace/dof_defines.h +++ b/include/uapi/linux/dtrace/dof_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_DOF_DEFINES_H -#define _LINUX_DTRACE_DOF_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Object Format (DOF) defines - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_DOF_DEFINES_H +#define _LINUX_DTRACE_DOF_DEFINES_H #include diff --git a/include/uapi/linux/dtrace/dtrace.h b/include/uapi/linux/dtrace/dtrace.h new file mode 100644 index 000000000000..09d33e54e923 --- /dev/null +++ b/include/uapi/linux/dtrace/dtrace.h @@ -0,0 +1,32 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_H_ +#define _LINUX_DTRACE_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _LINUX_DTRACE_H_ */ diff --git a/dtrace/include/uapi/linux/dtrace/enabling.h b/include/uapi/linux/dtrace/enabling.h similarity index 73% rename from dtrace/include/uapi/linux/dtrace/enabling.h rename to include/uapi/linux/dtrace/enabling.h index 44c00688409c..13d0e727b57c 100644 --- a/dtrace/include/uapi/linux/dtrace/enabling.h +++ b/include/uapi/linux/dtrace/enabling.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_ENABLING_H -#define _LINUX_DTRACE_ENABLING_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Enabling Description Structures - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_ENABLING_H +#define _LINUX_DTRACE_ENABLING_H #include #include diff --git a/include/uapi/linux/dtrace/enabling_defines.h b/include/uapi/linux/dtrace/enabling_defines.h new file mode 100644 index 000000000000..c8c7f3296ed2 --- /dev/null +++ b/include/uapi/linux/dtrace/enabling_defines.h @@ -0,0 +1,24 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_ENABLING_DEFINES_H +#define _LINUX_DTRACE_ENABLING_DEFINES_H + +#include + +struct dtrace_probedesc; +struct dtrace_repldesc; +struct dtrace_preddesc; +struct dtrace_actdesc; +struct dtrace_ecbdesc; + +#endif /* _LINUX_DTRACE_ENABLING_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/fasttrap.h b/include/uapi/linux/dtrace/fasttrap.h similarity index 55% rename from dtrace/include/uapi/linux/dtrace/fasttrap.h rename to include/uapi/linux/dtrace/fasttrap.h index f707ed3d67e3..41a1cd08af7d 100644 --- a/dtrace/include/uapi/linux/dtrace/fasttrap.h +++ b/include/uapi/linux/dtrace/fasttrap.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_FASTTRAP_H -#define _LINUX_DTRACE_FASTTRAP_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: Fasttrap Provider - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_FASTTRAP_H +#define _LINUX_DTRACE_FASTTRAP_H #include #include diff --git a/include/uapi/linux/dtrace/fasttrap_defines.h b/include/uapi/linux/dtrace/fasttrap_defines.h new file mode 100644 index 000000000000..905a8c293576 --- /dev/null +++ b/include/uapi/linux/dtrace/fasttrap_defines.h @@ -0,0 +1,22 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_FASTTRAP_DEFINES_H +#define _LINUX_DTRACE_FASTTRAP_DEFINES_H + +#include + +enum fasttrap_probe_type; +struct fasttrap_probe_spec; +struct fasttrap_instr_query; + +#endif /* _LINUX_DTRACE_FASTTRAP_DEFINES_H */ diff --git a/include/uapi/linux/dtrace/fasttrap_ioctl.h b/include/uapi/linux/dtrace/fasttrap_ioctl.h new file mode 100644 index 000000000000..1308d672196e --- /dev/null +++ b/include/uapi/linux/dtrace/fasttrap_ioctl.h @@ -0,0 +1,18 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +#ifndef _LINUX_DTRACE_FASTRRAP_IOCTL_H_ +#define _LINUX_DTRACE_FASTTRAP_IOCTL_H_ + +#include +#include + +#define FASTTRAPIOC 0xf4 +#define FASTTRAPIOC_MAKEPROBE _IOW(FASTTRAPIOC, 1, fasttrap_probe_spec_t) +#define FASTTRAPIOC_GETINSTR _IOR(FASTTRAPIOC, 2, fasttrap_instr_query_t) + +#endif /* _LINUX_DTRACE_FASTTRAP_IOCTL_H_ */ diff --git a/include/uapi/linux/dtrace/faults.h b/include/uapi/linux/dtrace/faults.h new file mode 100644 index 000000000000..c4e565875c8f --- /dev/null +++ b/include/uapi/linux/dtrace/faults.h @@ -0,0 +1,19 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_FAULTS_H +#define _LINUX_DTRACE_FAULTS_H + +#include +#include + +#endif /* _LINUX_DTRACE_FAULTS_H */ diff --git a/dtrace/include/uapi/linux/dtrace/faults_defines.h b/include/uapi/linux/dtrace/faults_defines.h similarity index 56% rename from dtrace/include/uapi/linux/dtrace/faults_defines.h rename to include/uapi/linux/dtrace/faults_defines.h index 4531ced2aeb3..88f0fc6c7cb0 100644 --- a/dtrace/include/uapi/linux/dtrace/faults_defines.h +++ b/include/uapi/linux/dtrace/faults_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_FAULTS_DEFINES_H -#define _LINUX_DTRACE_FAULTS_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Faults - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_FAULTS_DEFINES_H +#define _LINUX_DTRACE_FAULTS_DEFINES_H #include diff --git a/dtrace/include/uapi/linux/dtrace/helpers.h b/include/uapi/linux/dtrace/helpers.h similarity index 83% rename from dtrace/include/uapi/linux/dtrace/helpers.h rename to include/uapi/linux/dtrace/helpers.h index 5e61b6f8f494..ee0336a27b40 100644 --- a/dtrace/include/uapi/linux/dtrace/helpers.h +++ b/include/uapi/linux/dtrace/helpers.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_HELPERS_H -#define _LINUX_DTRACE_HELPERS_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Helpers - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_HELPERS_H +#define _LINUX_DTRACE_HELPERS_H #include #include diff --git a/include/uapi/linux/dtrace/helpers_defines.h b/include/uapi/linux/dtrace/helpers_defines.h new file mode 100644 index 000000000000..d853e42556a4 --- /dev/null +++ b/include/uapi/linux/dtrace/helpers_defines.h @@ -0,0 +1,20 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_HELPERS_DEFINES_H +#define _LINUX_DTRACE_HELPERS_DEFINES_H + +#include + +struct dof_helper; + +#endif /* _LINUX_DTRACE_HELPERS_DEFINES_H */ diff --git a/dtrace/include/uapi/linux/dtrace/ioctl.h b/include/uapi/linux/dtrace/ioctl.h similarity index 62% rename from dtrace/include/uapi/linux/dtrace/ioctl.h rename to include/uapi/linux/dtrace/ioctl.h index 80f2cf40ea9c..481ecb2b245d 100644 --- a/dtrace/include/uapi/linux/dtrace/ioctl.h +++ b/include/uapi/linux/dtrace/ioctl.h @@ -1,32 +1,13 @@ -/* Copyright (C) 2011, 2012, 2013 Oracle, Inc. */ - -#ifndef _LINUX_DTRACE_IOCTL_H_ -#define _LINUX_DTRACE_IOCTL_H_ - /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. */ +#ifndef _LINUX_DTRACE_IOCTL_H_ +#define _LINUX_DTRACE_IOCTL_H_ + #include #include #include @@ -37,7 +18,7 @@ #include #include #include -#include +#include #define DTRACEIOC 0xd4 #define DTRACEIOC_PROVIDER _IOR(DTRACEIOC, 1, dtrace_providerdesc_t) diff --git a/dtrace/include/uapi/linux/dtrace/metadesc.h b/include/uapi/linux/dtrace/metadesc.h similarity index 76% rename from dtrace/include/uapi/linux/dtrace/metadesc.h rename to include/uapi/linux/dtrace/metadesc.h index ce09f865afac..193b68f22b6a 100644 --- a/dtrace/include/uapi/linux/dtrace/metadesc.h +++ b/include/uapi/linux/dtrace/metadesc.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_METADESC_H -#define _LINUX_DTRACE_METADESC_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Metadata Description Structures - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_METADESC_H +#define _LINUX_DTRACE_METADESC_H #include #include diff --git a/include/uapi/linux/dtrace/metadesc_defines.h b/include/uapi/linux/dtrace/metadesc_defines.h new file mode 100644 index 000000000000..52419cf2f4c7 --- /dev/null +++ b/include/uapi/linux/dtrace/metadesc_defines.h @@ -0,0 +1,23 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_METADESC_DEFINES_H +#define _LINUX_DTRACE_METADESC_DEFINES_H + +#include + +struct dtrace_recdesc; +struct dtrace_eprobedesc; +struct dtrace_aggdesc; +struct dtrace_fmtdesc; + +#endif /* _LINUX_DTRACE_METADESC_DEFINES_H */ diff --git a/include/uapi/linux/dtrace/options.h b/include/uapi/linux/dtrace/options.h new file mode 100644 index 000000000000..5c7db1a8c3fe --- /dev/null +++ b/include/uapi/linux/dtrace/options.h @@ -0,0 +1,19 @@ +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. + */ + +#ifndef _LINUX_DTRACE_OPTIONS_H +#define _LINUX_DTRACE_OPTIONS_H + +#include +#include + +#endif /* _LINUX_DTRACE_OPTIONS_H */ diff --git a/dtrace/include/uapi/linux/dtrace/options_defines.h b/include/uapi/linux/dtrace/options_defines.h similarity index 75% rename from dtrace/include/uapi/linux/dtrace/options_defines.h rename to include/uapi/linux/dtrace/options_defines.h index c6c4cd13245a..69b93cadf238 100644 --- a/dtrace/include/uapi/linux/dtrace/options_defines.h +++ b/include/uapi/linux/dtrace/options_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_OPTIONS_DEFINES_H -#define _LINUX_DTRACE_OPTIONS_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Option Interface defines - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_OPTIONS_DEFINES_H +#define _LINUX_DTRACE_OPTIONS_DEFINES_H #include diff --git a/dtrace/include/uapi/linux/dtrace/stability.h b/include/uapi/linux/dtrace/stability.h similarity index 61% rename from dtrace/include/uapi/linux/dtrace/stability.h rename to include/uapi/linux/dtrace/stability.h index 9b9eb142dcc8..a9d3a96d7fa9 100644 --- a/dtrace/include/uapi/linux/dtrace/stability.h +++ b/include/uapi/linux/dtrace/stability.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_STABILITY_H -#define _LINUX_DTRACE_STABILITY_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Stability Attributes - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_STABILITY_H +#define _LINUX_DTRACE_STABILITY_H #include #include diff --git a/dtrace/include/uapi/linux/dtrace/stability_defines.h b/include/uapi/linux/dtrace/stability_defines.h similarity index 65% rename from dtrace/include/uapi/linux/dtrace/stability_defines.h rename to include/uapi/linux/dtrace/stability_defines.h index 64f0449a9e3c..c7b3381f4eae 100644 --- a/dtrace/include/uapi/linux/dtrace/stability_defines.h +++ b/include/uapi/linux/dtrace/stability_defines.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_STABILITY_DEFINES_H -#define _LINUX_DTRACE_STABILITY_DEFINES_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Stability Attributes - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_STABILITY_DEFINES_H +#define _LINUX_DTRACE_STABILITY_DEFINES_H #include diff --git a/dtrace/include/uapi/linux/dtrace/status.h b/include/uapi/linux/dtrace/status.h similarity index 67% rename from dtrace/include/uapi/linux/dtrace/status.h rename to include/uapi/linux/dtrace/status.h index e9f04af75876..44df7c5bc23e 100644 --- a/dtrace/include/uapi/linux/dtrace/status.h +++ b/include/uapi/linux/dtrace/status.h @@ -1,36 +1,17 @@ -#ifndef _LINUX_DTRACE_STATUS_H -#define _LINUX_DTRACE_STATUS_H +/* + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. + * + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + */ -/* - * DTrace Dynamic Tracing Software: DTrace Status - * +/* * Note: The contents of this file are private to the implementation of the * DTrace subsystem and are subject to change at any time without notice. */ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. - */ +#ifndef _LINUX_DTRACE_STATUS_H +#define _LINUX_DTRACE_STATUS_H #include diff --git a/dtrace/include/uapi/linux/dtrace/universal.h b/include/uapi/linux/dtrace/universal.h similarity index 62% rename from dtrace/include/uapi/linux/dtrace/universal.h rename to include/uapi/linux/dtrace/universal.h index 808cdcf931f3..59ca59b2072a 100644 --- a/dtrace/include/uapi/linux/dtrace/universal.h +++ b/include/uapi/linux/dtrace/universal.h @@ -1,37 +1,18 @@ -#ifndef _LINUX_DTRACE_UNIVERSAL_H_ -#define _LINUX_DTRACE_UNIVERSAL_H_ - /* - * DTrace Dynamic Tracing Software: Universal Constants and Typedefs + * Licensed under the Universal Permissive License v 1.0 as shown at + * http://oss.oracle.com/licenses/upl. * - * Note: The contents of this file are private to the implementation of the - * DTrace subsystem and are subject to change at any time without notice. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. */ /* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - * - * Copyright 2009 -- 2013 Oracle, Inc. All rights reserved. - * Use is subject to license terms. + * Note: The contents of this file are private to the implementation of the + * DTrace subsystem and are subject to change at any time without notice. */ +#ifndef _LINUX_DTRACE_UNIVERSAL_H_ +#define _LINUX_DTRACE_UNIVERSAL_H_ + #define DTRACE_CPUALL -1 /* all CPUs */ #define DTRACE_IDNONE 0 /* invalid probe identifier */ #define DTRACE_EPIDNONE 0 /* invalid enabled probe identifier */ diff --git a/kernel/ctf/Kconfig b/kernel/ctf/Kconfig index 692258af194c..9aa936eaedb2 100644 --- a/kernel/ctf/Kconfig +++ b/kernel/ctf/Kconfig @@ -2,7 +2,7 @@ config CTF bool "Compact Type Format generation" default n select STRIP_ASM_SYMS - depends on DEBUG_INFO && !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT && !DEBUG_INFO_DWARF4 && !DT_DISABLE_CTF + depends on DEBUG_INFO && !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT && !DEBUG_INFO_DWARF4 && !DT_DISABLE_CTF && DTRACE help Emit a compact, compressed description of the kernel's datatypes and global variables into .ctf sections in kernel modules. A module diff --git a/kernel/dtrace/Kconfig b/kernel/dtrace/Kconfig index 60ec8fcd6c16..6f41b2dfbf87 100644 --- a/kernel/dtrace/Kconfig +++ b/kernel/dtrace/Kconfig @@ -1,6 +1,5 @@ # -# DTrace Configuration -# Copyright (C) 2010, 2011, 2012 Oracle Corporation +# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. # menuconfig DTRACE diff --git a/kernel/dtrace/Makefile b/kernel/dtrace/Makefile index 066bbace9572..a0aeb236a424 100644 --- a/kernel/dtrace/Makefile +++ b/kernel/dtrace/Makefile @@ -1,5 +1,5 @@ # -# Makefile for DTrace +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # GCOV_PROFILE := y diff --git a/kernel/dtrace/cyclic.c b/kernel/dtrace/cyclic.c index 99b23ccf22a5..953245b6ee67 100644 --- a/kernel/dtrace/cyclic.c +++ b/kernel/dtrace/cyclic.c @@ -3,6 +3,16 @@ * DESCRIPTION: Minimal cyclic implementation * * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/kernel/dtrace/dtrace_cpu.c b/kernel/dtrace/dtrace_cpu.c index 09a05c7d8630..5187e2909c27 100644 --- a/kernel/dtrace/dtrace_cpu.c +++ b/kernel/dtrace/dtrace_cpu.c @@ -1,8 +1,18 @@ /* * FILE: dtrace_cpu.c - * DESCRIPTION: Dynamic Tracing: CPU info - part of kernel core + * DESCRIPTION: DTrce - per-CPU state * - * Copyright (C) 2010, 2011 Oracle Corporation + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/kernel/dtrace/dtrace_fbt_core.c b/kernel/dtrace/dtrace_fbt_core.c index 3b2ca4432dc5..4d4d9c293492 100644 --- a/kernel/dtrace/dtrace_fbt_core.c +++ b/kernel/dtrace/dtrace_fbt_core.c @@ -1,8 +1,18 @@ /* * FILE: dtrace_fbt_core.c - * DESCRIPTION: Dynamic Tracing: FBT common code + * DESCRIPTION: DTrace - FBT common code * - * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index 547c6ad8c1b8..c6962922b8e7 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -1,8 +1,18 @@ /* * FILE: dtrace_os.c - * DESCRIPTION: Dynamic Tracing: OS support functions - part of kernel core + * DESCRIPTION: DTrace - OS support functions * * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/kernel/dtrace/dtrace_sdt_core.c b/kernel/dtrace/dtrace_sdt_core.c index e80bd6352d1c..28fbab2cd655 100644 --- a/kernel/dtrace/dtrace_sdt_core.c +++ b/kernel/dtrace/dtrace_sdt_core.c @@ -1,8 +1,18 @@ /* * FILE: dtrace_sdt_core.c - * DESCRIPTION: Dynamic Tracing: SDT probe point registration + * DESCRIPTION: DTrace - SDT probes * - * Copyright (C) 2010-2016 Oracle Corporation + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include diff --git a/scripts/package/mkspec b/scripts/package/mkspec index d9ab94b17de0..7fff59c5f93f 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -21,6 +21,13 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then PROVIDES=kernel-drm fi +# +if [ "`grep CONFIG_CTF=y .config | cut -f2 -d\=`" = "y" ]; then + CTF=true +else + CTF=false +fi + PROVIDES="$PROVIDES kernel-$KERNELRELEASE" __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` @@ -40,6 +47,12 @@ echo "Source: kernel-$__KERNELRELEASE.tar.gz" fi echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root" + +if $CTF; then +echo "BuildRequires: libdtrace-ctf >= 0.5.0" +echo "BuildRequires: libdtrace-ctf-devel >= 0.5.0" +fi + echo "Provides: $PROVIDES" echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" echo "%define debug_package %{nil}" @@ -66,6 +79,11 @@ echo "AutoReqProv: no" echo "%description -n kernel-devel" echo "This package provides kernel headers and makefiles sufficient to build modules" echo "against the $__KERNELRELEASE kernel package." + +if $CTF; then +echo "Requires: libdtrace-ctf >= 0.5.0" +fi + echo "" if ! $PREBUILT; then @@ -152,6 +170,7 @@ echo "" echo "%files headers" echo '%defattr (-, root, root)' echo "/usr/include" +echo "%exclude /usr/include/linux/dtrace" echo "" if ! $PREBUILT; then echo "%files devel" -- 2.50.1