Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add another field to the SDT_PROBE_DEFINE macro, so our ...
details: https://anonhg.NetBSD.org/src/rev/9893a2785b8a
branches: trunk
changeset: 787274:9893a2785b8a
user: riz <riz%NetBSD.org@localhost>
date: Sun Jun 09 01:13:47 2013 +0000
description:
Add another field to the SDT_PROBE_DEFINE macro, so our DTrace probes
can named the same as those on other platforms.
For example, proc:::exec-success, not proc:::exec_success.
Implementation follows the same basic principle as FreeBSD's; add
another field to the SDT_PROBE_DEFINE macro which is the name
as exposed to userland.
diffstat:
sys/kern/kern_exec.c | 10 +++++-----
sys/kern/kern_exit.c | 6 +++---
sys/kern/kern_fork.c | 6 +++---
sys/kern/kern_lwp.c | 10 +++++-----
sys/kern/kern_sig.c | 12 ++++++------
sys/sys/sdt.h | 11 ++++++-----
6 files changed, 28 insertions(+), 27 deletions(-)
diffs (221 lines):
diff -r 03327816b25f -r 9893a2785b8a sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/kern/kern_exec.c Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.360 2013/04/20 22:28:58 christos Exp $ */
+/* $NetBSD: kern_exec.c,v 1.361 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.360 2013/04/20 22:28:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.361 2013/06/09 01:13:47 riz Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -126,15 +126,15 @@
/*
* DTrace SDT provider definitions
*/
-SDT_PROBE_DEFINE(proc,,,exec,
+SDT_PROBE_DEFINE(proc,,,exec,exec,
"char *", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,exec_success,
+SDT_PROBE_DEFINE(proc,,,exec_success,exec-success,
"char *", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,exec_failure,
+SDT_PROBE_DEFINE(proc,,,exec_failure,exec-failure,
"int", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
diff -r 03327816b25f -r 9893a2785b8a sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/kern/kern_exit.c Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exit.c,v 1.242 2012/09/27 20:43:15 rmind Exp $ */
+/* $NetBSD: kern_exit.c,v 1.243 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.242 2012/09/27 20:43:15 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.243 2013/06/09 01:13:47 riz Exp $");
#include "opt_ktrace.h"
#include "opt_perfctrs.h"
@@ -123,7 +123,7 @@
/*
* DTrace SDT provider definitions
*/
-SDT_PROBE_DEFINE(proc,,,exit,
+SDT_PROBE_DEFINE(proc,,,exit,exit,
"int", NULL, /* reason */
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
diff -r 03327816b25f -r 9893a2785b8a sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/kern/kern_fork.c Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_fork.c,v 1.191 2012/07/27 20:52:49 christos Exp $ */
+/* $NetBSD: kern_fork.c,v 1.192 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.191 2012/07/27 20:52:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.192 2013/06/09 01:13:47 riz Exp $");
#include "opt_ktrace.h"
@@ -98,7 +98,7 @@
/*
* DTrace SDT provider definitions
*/
-SDT_PROBE_DEFINE(proc,,,create,
+SDT_PROBE_DEFINE(proc,,,create,create,
"struct proc *", NULL, /* new process */
"struct proc *", NULL, /* parent process */
"int", NULL, /* flags */
diff -r 03327816b25f -r 9893a2785b8a sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/kern/kern_lwp.c Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.174 2012/12/16 22:21:03 dsl Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.175 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.174 2012/12/16 22:21:03 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.175 2013/06/09 01:13:47 riz Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -251,15 +251,15 @@
static void lwp_dtor(void *, void *);
/* DTrace proc provider probes */
-SDT_PROBE_DEFINE(proc,,,lwp_create,
+SDT_PROBE_DEFINE(proc,,,lwp_create,lwp-create,
"struct lwp *", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,lwp_start,
+SDT_PROBE_DEFINE(proc,,,lwp_start,lwp-start,
"struct lwp *", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,lwp_exit,
+SDT_PROBE_DEFINE(proc,,,lwp_exit,lwp-exit,
"struct lwp *", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
diff -r 03327816b25f -r 9893a2785b8a sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/kern/kern_sig.c Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.317 2012/02/19 21:06:53 rmind Exp $ */
+/* $NetBSD: kern_sig.c,v 1.318 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.317 2012/02/19 21:06:53 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.318 2013/06/09 01:13:47 riz Exp $");
#include "opt_ptrace.h"
#include "opt_compat_sunos.h"
@@ -131,21 +131,21 @@
/*
* DTrace SDT provider definitions
*/
-SDT_PROBE_DEFINE(proc,,,signal_send,
+SDT_PROBE_DEFINE(proc,,,signal_send,signal-send,
"struct lwp *", NULL, /* target thread */
"struct proc *", NULL, /* target process */
"int", NULL, /* signal */
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,signal_discard,
+SDT_PROBE_DEFINE(proc,,,signal_discard,signal-discard,
"struct lwp *", NULL, /* target thread */
"struct proc *", NULL, /* target process */
"int", NULL, /* signal */
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,signal_clear,
+SDT_PROBE_DEFINE(proc,,,signal_clear,signal-clear,
"int", NULL, /* signal */
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
-SDT_PROBE_DEFINE(proc,,,signal_handle,
+SDT_PROBE_DEFINE(proc,,,signal_handle,signal-handle,
"int", NULL, /* signal */
"ksiginfo_t *", NULL,
"void (*)(void)", NULL, /* handler address */
diff -r 03327816b25f -r 9893a2785b8a sys/sys/sdt.h
--- a/sys/sys/sdt.h Sun Jun 09 00:13:55 2013 +0000
+++ b/sys/sys/sdt.h Sun Jun 09 01:13:47 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdt.h,v 1.2 2011/12/08 22:27:36 dholland Exp $ */
+/* $NetBSD: sdt.h,v 1.3 2013/06/09 01:13:47 riz Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
#ifdef KDTRACE_HOOKS
/*
- * SDT_PROBE_DEFINE(prov, mod, func, name,
+ * SDT_PROBE_DEFINE(prov, mod, func, name, sname,
* arg0, argx0, arg1, argx1,
* arg2, argx2, arg3, argx3, arg4, argx4)
*
@@ -86,6 +86,7 @@
* mod - module name
* func - function name
* name - probe name
+ * sname - probe name as exposed to userland
* arg0 - arg4, argument types as strings, or NULL.
* argx0 - argx4, translation types for arg0 - arg4
*
@@ -97,11 +98,11 @@
* This is used in the target module to define probes to be used.
* The translation type should be set to NULL if not used.
*/
-#define SDT_PROBE_DEFINE(prov, mod, func, name, \
+#define SDT_PROBE_DEFINE(prov, mod, func, name, sname, \
arg0, argx0, arg1, argx1, arg2, argx2, \
arg3, argx3, arg4, argx4) \
sdt_probe_t SDT_NAME(prov, mod, func, name) = { \
- 0, 0, 0, #prov, #mod, #func, #name, \
+ 0, 0, 0, #prov, #mod, #func, #sname, \
{ arg0, arg1, arg2, arg3, arg4 }, \
{ NULL, NULL, NULL, NULL, NULL } \
}
@@ -118,7 +119,7 @@
(uintptr_t)(arg3), (uintptr_t)(arg4)); \
}
#else
-#define SDT_PROBE_DEFINE(prov, mod, func, name, \
+#define SDT_PROBE_DEFINE(prov, mod, func, name, sname, \
arg0, argx0, arg1, argx1, arg2, argx2, \
arg3, argx3, arg4, argx4)
#define SDT_PROBE_DECLARE(prov, mod, func, name)
Home |
Main Index |
Thread Index |
Old Index