[DTrace-devel] [PATCH 04/38] Get rid of apparently orphaned bufdesc stuff

eugene.loh at oracle.com eugene.loh at oracle.com
Thu Jun 27 05:34:21 UTC 2024


From: Eugene Loh <eugene.loh at oracle.com>

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 cmd/dtrace.c                    |  3 ---
 include/dtrace/buffer.h         | 42 ---------------------------------
 include/dtrace/buffer_defines.h | 20 ----------------
 include/dtrace/dtrace.h         |  3 +--
 include/dtrace/ioctl.h          |  5 +---
 5 files changed, 2 insertions(+), 71 deletions(-)
 delete mode 100644 include/dtrace/buffer.h
 delete mode 100644 include/dtrace/buffer_defines.h

diff --git a/cmd/dtrace.c b/cmd/dtrace.c
index ba1c22c5..af354653 100644
--- a/cmd/dtrace.c
+++ b/cmd/dtrace.c
@@ -914,7 +914,6 @@ intr(int signo)
 int
 main(int argc, char *argv[])
 {
-	dtrace_bufdesc_t buf;
 	struct sigaction act, oact;
 	dtrace_optval_t opt;
 	dtrace_cmd_t *dcp;
@@ -940,8 +939,6 @@ main(int argc, char *argv[])
 	g_argv[g_argc++] = argv[0];	/* propagate argv[0] to D as $0/$$0 */
 	argv[0] = g_pname;		/* rewrite argv[0] for getopt errors */
 
-	memset(&buf, 0, sizeof(buf));
-
 	/*
 	 * Make an initial pass through argv[] processing any arguments that
 	 * affect our behavior mode (g_mode) and flags used for dtrace_open().
diff --git a/include/dtrace/buffer.h b/include/dtrace/buffer.h
deleted file mode 100644
index 6fa8c769..00000000
--- a/include/dtrace/buffer.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 _DTRACE_BUFFER_H
-#define _DTRACE_BUFFER_H
-
-#include <dtrace/universal.h>
-#include <dtrace/actions_defines.h>
-#include <dtrace/buffer_defines.h>
-
-/*
- * In order to get a snapshot of the principal or aggregation buffer,
- * user-level passes a buffer description to the kernel with the dtrace_bufdesc
- * structure.  This describes which CPU user-level is interested in, and
- * where user-level wishes the kernel to snapshot the buffer to (the
- * dtbd_data field).  The kernel uses the same structure to pass back some
- * information regarding the buffer:  the size of data actually copied out, the
- * number of drops, the number of errors, and the offset of the oldest record.
- * If the buffer policy is a "switch" policy, taking a snapshot of the
- * principal buffer has the additional effect of switching the active and
- * inactive buffers.  Taking a snapshot of the aggregation buffer _always_ has
- * the additional effect of switching the active and inactive buffers.
- */
-typedef struct dtrace_bufdesc {
-	uint64_t dtbd_size;			/* size of buffer */
-	uint32_t dtbd_cpu;			/* CPU or DTRACE_CPUALL */
-	uint32_t dtbd_errors;			/* number of errors */
-	uint64_t dtbd_drops;			/* number of drops */
-	DTRACE_PTR(char, dtbd_data);		/* data */
-	uint64_t dtbd_oldest;			/* offset of oldest record */
-} dtrace_bufdesc_t;
-
-#endif /* _DTRACE_BUFFER_H */
diff --git a/include/dtrace/buffer_defines.h b/include/dtrace/buffer_defines.h
deleted file mode 100644
index f81c22f1..00000000
--- a/include/dtrace/buffer_defines.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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 _DTRACE_BUFFER_DEFINES_H
-#define _DTRACE_BUFFER_DEFINES_H
-
-#include <dtrace/universal.h>
-
-struct dtrace_bufdesc;
-
-#endif /* _DTRACE_BUFFER_DEFINES_H */
diff --git a/include/dtrace/dtrace.h b/include/dtrace/dtrace.h
index 8f28c9ba..7fc5f5f7 100644
--- a/include/dtrace/dtrace.h
+++ b/include/dtrace/dtrace.h
@@ -2,7 +2,7 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  *
- * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -21,7 +21,6 @@
 #include <dtrace/enabling.h>
 #include <dtrace/metadesc.h>
 #include <dtrace/options.h>
-#include <dtrace/buffer.h>
 #include <dtrace/status.h>
 #include <dtrace/conf.h>
 #include <dtrace/faults.h>
diff --git a/include/dtrace/ioctl.h b/include/dtrace/ioctl.h
index 75d02464..a2a3a93b 100644
--- a/include/dtrace/ioctl.h
+++ b/include/dtrace/ioctl.h
@@ -2,7 +2,7 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  *
- * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
  */
 
 #ifndef _DTRACE_IOCTL_H_
@@ -10,7 +10,6 @@
 
 #include <linux/ioctl.h>
 #include <dtrace/arg.h>
-#include <dtrace/buffer.h>
 #include <dtrace/conf.h>
 #include <dtrace/dof.h>
 #include <dtrace/enabling.h>
@@ -22,10 +21,8 @@
 #define DTRACEIOC		0xd4
 #define DTRACEIOC_PROVIDER	_IOR(DTRACEIOC, 1, dtrace_providerdesc_t)
 #define DTRACEIOC_PROBES	_IOR(DTRACEIOC, 2, dtrace_probedesc_t)
-#define DTRACEIOC_BUFSNAP	_IOR(DTRACEIOC, 4, dtrace_bufdesc_t)
 #define DTRACEIOC_PROBEMATCH	_IOR(DTRACEIOC, 5, dtrace_probedesc_t)
 #define DTRACEIOC_ENABLE	_IOW(DTRACEIOC, 6, void *)
-#define DTRACEIOC_AGGSNAP	_IOR(DTRACEIOC, 7, dtrace_bufdesc_t)
 #define DTRACEIOC_EPROBE	_IOW(DTRACEIOC, 8, dtrace_eprobedesc_t)
 #define DTRACEIOC_PROBEARG	_IOR(DTRACEIOC, 9, dtrace_argdesc_t)
 #define DTRACEIOC_CONF		_IOR(DTRACEIOC, 10, dtrace_conf_t)
-- 
2.18.4




More information about the DTrace-devel mailing list