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

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

15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 *
21 * Portions Copyright 2006-2008 John Birrell jb@freebsd.org
22 *
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 *
21 * Portions Copyright 2006-2008 John Birrell jb@freebsd.org
22 *
23 * $FreeBSD: head/sys/cddl/dev/systrace/systrace.c 219561 2011-03-12 09:09:25Z avg $
23 * $FreeBSD: head/sys/cddl/dev/systrace/systrace.c 220437 2011-04-08 06:27:43Z art $
24 *
25 */
26
27/*
28 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31

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

59#include <sys/dtrace.h>
60
61#ifdef LINUX_SYSTRACE
62#if defined(__amd64__)
63#include <amd64/linux32/linux.h>
64#include <amd64/linux32/linux32_proto.h>
65#include <amd64/linux32/linux32_syscalls.c>
66#include <amd64/linux32/linux32_systrace_args.c>
24 *
25 */
26
27/*
28 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31

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

59#include <sys/dtrace.h>
60
61#ifdef LINUX_SYSTRACE
62#if defined(__amd64__)
63#include <amd64/linux32/linux.h>
64#include <amd64/linux32/linux32_proto.h>
65#include <amd64/linux32/linux32_syscalls.c>
66#include <amd64/linux32/linux32_systrace_args.c>
67#define MODNAME "linux32"
67#elif defined(__i386__)
68#include <i386/linux/linux.h>
69#include <i386/linux/linux_proto.h>
70#include <i386/linux/linux_syscalls.c>
71#include <i386/linux/linux_systrace_args.c>
68#elif defined(__i386__)
69#include <i386/linux/linux.h>
70#include <i386/linux/linux_proto.h>
71#include <i386/linux/linux_syscalls.c>
72#include <i386/linux/linux_systrace_args.c>
73#define MODNAME "linux"
72#else
73#error Only i386 and amd64 are supported.
74#endif
75extern struct sysent linux_sysent[];
74#else
75#error Only i386 and amd64 are supported.
76#endif
77extern struct sysent linux_sysent[];
76#define MODNAME "linux32"
77#define MAXSYSCALL LINUX_SYS_MAXSYSCALL
78#define SYSCALLNAMES linux_syscallnames
79#define SYSENT linux_sysent
80#elif defined(FREEBSD32_SYSTRACE)
81/*
82 * The syscall arguments are processed into a DTrace argument array
83 * using a generated function. See sys/kern/makesyscalls.sh.
84 */

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

127static void systrace_enable(void *, dtrace_id_t, void *);
128static void systrace_disable(void *, dtrace_id_t, void *);
129static void systrace_load(void *);
130
131static struct cdevsw systrace_cdevsw = {
132 .d_version = D_VERSION,
133 .d_open = systrace_open,
134#ifdef LINUX_SYSTRACE
78#define MAXSYSCALL LINUX_SYS_MAXSYSCALL
79#define SYSCALLNAMES linux_syscallnames
80#define SYSENT linux_sysent
81#elif defined(FREEBSD32_SYSTRACE)
82/*
83 * The syscall arguments are processed into a DTrace argument array
84 * using a generated function. See sys/kern/makesyscalls.sh.
85 */

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

128static void systrace_enable(void *, dtrace_id_t, void *);
129static void systrace_disable(void *, dtrace_id_t, void *);
130static void systrace_load(void *);
131
132static struct cdevsw systrace_cdevsw = {
133 .d_version = D_VERSION,
134 .d_open = systrace_open,
135#ifdef LINUX_SYSTRACE
135 .d_name = "linsystrace",
136 .d_name = "systrace_" MODNAME,
136#else
137 .d_name = "systrace",
138#endif
139};
140
141static union {
142 const char **p_constnames;
143 char **pp_syscallnames;

--- 233 unchanged lines hidden ---
137#else
138 .d_name = "systrace",
139#endif
140};
141
142static union {
143 const char **p_constnames;
144 char **pp_syscallnames;

--- 233 unchanged lines hidden ---