net-y := net/
libs-y := lib/
core-y := usr/
+dtrace-y := dtrace/
endif # KBUILD_EXTMOD
ifeq ($(dot-config),1)
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))
# 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)
--- /dev/null
+#
+# 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))
/*
- * 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 <linux/linkage.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/uaccess.h>
/*
* 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 <linux/vmalloc.h>
--- /dev/null
+/*
+ * 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 */
-#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 {
-#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
--- /dev/null
+/*
+ * 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 <asm/dtrace_arch.h>
+
+/*
+ * 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 */
--- /dev/null
+/*
+ * 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 */
/*
* 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 <linux/sdt.h>
--- /dev/null
+#
+# 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))
/*
- * 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 <linux/linkage.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/uaccess.h>
/*
* 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 <linux/dtrace_fbt.h>
--- /dev/null
+/*
+ * 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 */
-#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 {
--- /dev/null
+/*
+ * 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 <asm/dtrace_arch.h>
+
+/*
+ * 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 */
--- /dev/null
+/*
+ * 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 */
/*
* 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 <linux/sdt.h>
+++ /dev/null
-#
-# 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
#
-# 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 <linux/dtrace/$$name>\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
+/*
+ * 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_
/*
- * 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_
/*
* 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 <linux/fs.h>
/*
* 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 <linux/module.h>
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 },
/*
- * 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_
/*
* 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 <linux/fs.h>
/*
* 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 <linux/module.h>
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 },
+++ /dev/null
-%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 <nick.alcock@oracle.com>
-Kris Van Hees <kris.van.hees@oracle.com>
-
-# 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 - <tomas.jedlicka@oracle.com> - 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 - <kris.van.hees@oracle.com> - 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 - <kris.van.hees@oracle.com> - 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 - <kris.van.hees@oracle.com> - 0.6.0-4
-- Always inline dtrace_dif_variable to ensure consistent aframes count
- [Orabug: 25872472]
-* Sun Apr 2 2017 - <kris.van.hees@oracle.com> - 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 - <kris.van.hees@oracle.com> - 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 - <nick.alcock@oracle.com> - 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 <nick.alcock@oracle.com> - 0.5.3-2
-- Re-enable 0.5.3 release after bugfix [Orabug: 23344927]
-* Mon May 23 2016 Kris Van Hees <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.5.0-3
-- Enable building DTrace modules for SPARC64.
-* Mon Aug 10 2015 Natalya Naumova <natalya.naumova@oracle.com> - 0.5.0-2
-- modules signing support [OL6]
-* Mon Aug 10 2015 Kris Van Hees <kris.van.hees@oracle.com> - 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 <natalya.naumova@oracle.com> - 0.4.5-3
-- modules signing support [OL7]
-* Tue Jun 23 2015 Kris Van Hees <kris.van.hees@oracle.com> - 0.4.5-2
-- Validate d_path() argument pointer to avoid crash.
- [Orabug: 21304207]
-* Wed Jun 17 2015 Kris Van Hees <kris.van.hees@oracle.com> - 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 <nick.alcock@oracle.com> - 0.4.4-1
-- Rename dtrace-modules-headers to dtrace-modules-shared-headers.
- [Orabug: 20508087]
-* Fri Apr 24 2014 Kris Van Hees <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.4.3-3
-- Rebuild with cleaned up source tree.
-* Thu Apr 24 2014 Nick Alcock <nick.alcock@oracle.com> - 0.4.3-2
-- Various fixes to handle multi-threaded processes.
- [Orabug: 18412802]
-* Tue Apr 15 2014 Kris Van Hees <kris.van.hees@oracle.com> - 0.4.3-1
-- Implmentation of profile-* probes in the profile provider.
- [Orabug: 18323513]
-* Wed Jan 29 2014 Nick Alcock <nick.alcock@oracle.com> - 0.4.2-3
-- Obsolete the old provider headers package.
- [Orabug: 18061595]
-* Mon Jan 27 2014 Nick Alcock <nick.alcock@oracle.com> - 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 <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.4.1-3
-- Fix 'errno' implementation.
- [Orabug: 17704568]
-* Wed Oct 26 2013 Kris Van Hees <kris.van.hees@oracle.com> - 0.4.1-2
-- Fix lock ordering issues.
- [Orabug: 17624236]
-* Thu Oct 17 2013 Nick Alcock <nick.alcock@oracle.com> - 0.4.0-3
-- fix changelog, no code changes
-* Wed Oct 16 2013 Kris Van Hees <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.4.0-2
-- Bugfix for ustack() to avoid using vma data.
-* Wed Aug 7 2013 Kris Van Hees <kris.van.hees@oracle.com> - 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 <nick.alcock@oracle.com> - 0.3.2
-- Release for new kernel and CTF section layout
-* Mon Oct 1 2012 Kris Van Hees <kris.van.hees@oracle.com> - 0.3.1
-- Skipped version number
-* Mon Sep 17 2012 Kris Van Hees <kris.van.hees@oracle.com> - 0.3.0-2
-- Remove development-only providers because they should not be built/released.
-* Fri Sep 14 2012 Kris Van Hees <kris.van.hees@oracle.com> - 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 <nick.alcock@oracle.com> - 0.2.5-2
-- Fix typo causing unconditional depmod at postinstall time
-* Tue Mar 13 2012 Nick Alcock <nick.alcock@oracle.com> - 0.2.5
-- New kernel, new userspace: no module changes.
-* Wed Feb 15 2012 Kris van Hees <kris.van.hees@oracle.com> - 0.2.4
-- Ban unloading of in-use dtrace modules while dtrace is running.
-* Thu Feb 9 2012 Nick Alcock <nick.alcock@oracle.com> - 0.2.3
-- There is one new DTrace option now, used internally by the
- testsuite.
-* Tue Feb 7 2012 Kris Van Hees <kris.van.hees@oracle.com> - 0.2.2
-- Switch MUTEX_HELD() from using mutex_is_locked() to new mutex_owned().
-* Mon Jan 23 2012 Kris Van Hees <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.1.0-1.el6
-- Disable stub-based syscalls in the release pending merging in fixes.
-* Thu Sep 29 2011 Maxim Uvarov <maxim.uvarov@oracle.com> - 0.1
-- Initial release.
+/*
+ * 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_
/*
* 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 <linux/slab.h>
/*
* 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"
/*
* 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 <linux/vmalloc.h>
+/*
+ * 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_
/*
* 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 <linux/delay.h>
#include "ctf_api.h"
#include "dtrace.h"
#include "dtrace_dev.h"
-#include <linux/dtrace/ioctl_debug.h>
extern char *dtrace_helptrace_buffer;
extern int dtrace_helptrace_bufsize;
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;
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;
+/*
+ * 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_
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/slab.h>
/*
* 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 <linux/slab.h>
/*
* 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 <linux/kernel.h>
/*
* 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 <linux/slab.h>
/*
* 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 <linux/slab.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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"
/*
* 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 <linux/module.h>
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.
/*
* 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 <linux/slab.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/idr.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/cyclic.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/atomic.h>
+/*
+ * 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_
/*
* 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 <linux/module.h>
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,
/*
* 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 <linux/fs.h>
+/*
+ * 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_
/*
* 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 <linux/module.h>
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 },
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-#include <linux/cred.h>
-#include <linux/in6.h>
-
-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 */
+++ /dev/null
-#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 */
+++ /dev/null
-#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 <asm/dtrace_arch.h>
-
-/*
- * 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 */
+++ /dev/null
-#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 */
+++ /dev/null
-#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 <linux/dtrace/actions_defines.h>
-
-#endif /* _LINUX_DTRACE_ACTIONS_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_argdesc;
-
-#endif /* _LINUX_DTRACE_ARG_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_bufdesc;
-
-#endif /* _LINUX_DTRACE_BUFFER_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-#include <linux/dtrace/conf_defines.h>
-
-/*
- * 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 */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_conf;
-
-#endif /* _LINUX_DTRACE_CONF_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_difo;
-
-#endif /* _LINUX_DTRACE_DIFO_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-#include <linux/dtrace/dif.h>
-#include <linux/dtrace/actions.h>
-#include <linux/dtrace/dof.h>
-#include <linux/dtrace/difo.h>
-#include <linux/dtrace/enabling.h>
-#include <linux/dtrace/metadesc.h>
-#include <linux/dtrace/options.h>
-#include <linux/dtrace/buffer.h>
-#include <linux/dtrace/status.h>
-#include <linux/dtrace/conf.h>
-#include <linux/dtrace/faults.h>
-#include <linux/dtrace/arg.h>
-#include <linux/dtrace/stability.h>
-#include <linux/dtrace/helpers.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LINUX_DTRACE_H_ */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_probedesc;
-struct dtrace_repldesc;
-struct dtrace_preddesc;
-struct dtrace_actdesc;
-struct dtrace_ecbdesc;
-
-#endif /* _LINUX_DTRACE_ENABLING_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-enum fasttrap_probe_type;
-struct fasttrap_probe_spec;
-struct fasttrap_instr_query;
-
-#endif /* _LINUX_DTRACE_FASTTRAP_DEFINES_H */
+++ /dev/null
-/* 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 <linux/ioctl.h>
-#include <linux/dtrace/fasttrap.h>
-
-#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_ */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-#include <linux/dtrace/faults_defines.h>
-
-#endif /* _LINUX_DTRACE_FAULTS_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dof_helper;
-
-#endif /* _LINUX_DTRACE_HELPERS_DEFINES_H */
+++ /dev/null
-/* 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 <linux/dtrace/ioctl.h>
-
-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 */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-
-struct dtrace_recdesc;
-struct dtrace_eprobedesc;
-struct dtrace_aggdesc;
-struct dtrace_fmtdesc;
-
-#endif /* _LINUX_DTRACE_METADESC_DEFINES_H */
+++ /dev/null
-#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 <linux/dtrace/universal.h>
-#include <linux/dtrace/options_defines.h>
-
-#endif /* _LINUX_DTRACE_OPTIONS_H */
+++ /dev/null
-#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 */
+++ /dev/null
-#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 <asm/dtrace_arch.h>
-
-/*
- * 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 */
+++ /dev/null
-#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 */
+/*
+ * 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_
/*
* 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 <linux/fs.h>
/*
* 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 <linux/module.h>
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 },
/*
* 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 <linux/ctype.h>
+/*
+ * 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_
/*
* 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 <linux/module.h>
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 },
/*
- * 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_
/*
* 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 <linux/dtrace_syscall.h>
/*
* 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 <linux/module.h>
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 },
-#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 <linux/cyclic.h>
#include <linux/idr.h>
-#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 <linux/dtrace/universal.h>
#include <linux/preempt.h>
#include <asm/ptrace.h>
-#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.
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+#include <linux/cred.h>
+#include <linux/in6.h>
+
+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 */
-#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
--- /dev/null
+/* Copyright (C) 2011-2014 Oracle, Inc. */
+
+#ifndef _LINUX_DTRACE_CPU_DEFINES_H_
+#define _LINUX_DTRACE_CPU_DEFINES_H_
+
+#include <linux/percpu.h>
+
+#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_ */
-/* Copyright (C) 2011-2014 Oracle, Inc. */
-
-#ifndef _LINUX_DTRACE_CPU_DEFINES_H_
-#define _LINUX_DTRACE_CPU_DEFINES_H_
-
-#include <linux/percpu.h>
-
-#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 <linux/dtrace/cpu_defines.h>
header-y += usb/
header-y += wimax/
+header-y += dtrace/
+
genhdr-y += version.h
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
--- /dev/null
+# 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
--- /dev/null
+/*
+ * 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 <linux/dtrace/actions_defines.h>
+
+#endif /* _LINUX_DTRACE_ACTIONS_H */
-#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 <linux/dtrace/universal.h>
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/arg_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_argdesc;
+
+#endif /* _LINUX_DTRACE_ARG_DEFINES_H */
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/actions_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_bufdesc;
+
+#endif /* _LINUX_DTRACE_BUFFER_DEFINES_H */
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+#include <linux/dtrace/conf_defines.h>
+
+/*
+ * 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 */
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_conf;
+
+#endif /* _LINUX_DTRACE_CONF_DEFINES_H */
--- /dev/null
+/*
+ * 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_ */
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/dif_defines.h>
-#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 <linux/dtrace/universal.h>
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/dif.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_difo;
+
+#endif /* _LINUX_DTRACE_DIFO_DEFINES_H */
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/dif.h>
-#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 <linux/dtrace/universal.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+#include <linux/dtrace/dif.h>
+#include <linux/dtrace/actions.h>
+#include <linux/dtrace/dof.h>
+#include <linux/dtrace/difo.h>
+#include <linux/dtrace/enabling.h>
+#include <linux/dtrace/metadesc.h>
+#include <linux/dtrace/options.h>
+#include <linux/dtrace/buffer.h>
+#include <linux/dtrace/status.h>
+#include <linux/dtrace/conf.h>
+#include <linux/dtrace/faults.h>
+#include <linux/dtrace/arg.h>
+#include <linux/dtrace/stability.h>
+#include <linux/dtrace/helpers.h>
+
+#endif /* _LINUX_DTRACE_H_ */
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/difo_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_probedesc;
+struct dtrace_repldesc;
+struct dtrace_preddesc;
+struct dtrace_actdesc;
+struct dtrace_ecbdesc;
+
+#endif /* _LINUX_DTRACE_ENABLING_DEFINES_H */
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/fasttrap_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+enum fasttrap_probe_type;
+struct fasttrap_probe_spec;
+struct fasttrap_instr_query;
+
+#endif /* _LINUX_DTRACE_FASTTRAP_DEFINES_H */
--- /dev/null
+/*
+ * 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 <linux/ioctl.h>
+#include <linux/dtrace/fasttrap.h>
+
+#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_ */
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+#include <linux/dtrace/faults_defines.h>
+
+#endif /* _LINUX_DTRACE_FAULTS_H */
-#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 <linux/dtrace/universal.h>
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/helpers_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dof_helper;
+
+#endif /* _LINUX_DTRACE_HELPERS_DEFINES_H */
-/* 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 <linux/ioctl.h>
#include <linux/dtrace/arg.h>
#include <linux/dtrace/buffer.h>
#include <linux/dtrace/metadesc.h>
#include <linux/dtrace/stability.h>
#include <linux/dtrace/status.h>
-#include <linux/dtrace_cpu_defines.h>
+#include <linux/dtrace/cpu_defines.h>
#define DTRACEIOC 0xd4
#define DTRACEIOC_PROVIDER _IOR(DTRACEIOC, 1, dtrace_providerdesc_t)
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/actions_defines.h>
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+
+struct dtrace_recdesc;
+struct dtrace_eprobedesc;
+struct dtrace_aggdesc;
+struct dtrace_fmtdesc;
+
+#endif /* _LINUX_DTRACE_METADESC_DEFINES_H */
--- /dev/null
+/*
+ * 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 <linux/dtrace/universal.h>
+#include <linux/dtrace/options_defines.h>
+
+#endif /* _LINUX_DTRACE_OPTIONS_H */
-#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 <linux/dtrace/universal.h>
-#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 <linux/dtrace/universal.h>
#include <linux/dtrace/stability_defines.h>
-#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 <linux/dtrace/universal.h>
-#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 <linux/dtrace/universal.h>
-#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 */
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
#
-# DTrace Configuration
-# Copyright (C) 2010, 2011, 2012 Oracle Corporation
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
#
menuconfig DTRACE
#
-# Makefile for DTrace
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
GCOV_PROFILE := y
* 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 <linux/cpu.h>
/*
* 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 <linux/dtrace_cpu.h>
/*
* 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 <linux/kernel.h>
/*
* 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 <linux/binfmts.h>
/*
* 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 <linux/kernel.h>
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"`
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}"
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
echo "%files headers"
echo '%defattr (-, root, root)'
echo "/usr/include"
+echo "%exclude /usr/include/linux/dtrace"
echo ""
if ! $PREBUILT; then
echo "%files devel"