Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dev/systrace use the alternate syscall n...
details: https://anonhg.NetBSD.org/src/rev/cb9a60cfe9f5
branches: trunk
changeset: 340670:cb9a60cfe9f5
user: christos <christos%NetBSD.org@localhost>
date: Thu Sep 24 14:26:44 2015 +0000
description:
use the alternate syscall names if available
diffstat:
external/cddl/osnet/dev/systrace/systrace.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r dfdedeaca498 -r cb9a60cfe9f5 external/cddl/osnet/dev/systrace/systrace.c
--- a/external/cddl/osnet/dev/systrace/systrace.c Thu Sep 24 14:26:09 2015 +0000
+++ b/external/cddl/osnet/dev/systrace/systrace.c Thu Sep 24 14:26:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace.c,v 1.7 2015/03/10 12:17:50 christos Exp $ */
+/* $NetBSD: systrace.c,v 1.8 2015/09/24 14:26:44 christos Exp $ */
/*
* CDDL HEADER START
@@ -63,19 +63,23 @@
#ifndef NATIVE
extern const char * const CONCAT(emulname,_syscallnames)[];
+extern const char * const CONCAT(alt,CONCAT(emulname,_syscallnames))[];
extern struct sysent CONCAT(emulname,_sysent)[];
#define MODNAME CONCAT(dtrace_syscall_,emulname)
#define MODDEP "dtrace_syscall,compat_" STRING(emulname)
#define MAXSYSCALL CONCAT(EMULNAME,_SYS_MAXSYSCALL)
#define SYSCALLNAMES CONCAT(emulname,_syscallnames)
+#define ALTSYSCALLNAMES CONCAT(alt,CONCAT(emulname,_syscallnames))
#define SYSENT CONCAT(emulname,_sysent)
#define PROVNAME STRING(emulname) "_syscall"
#else
extern const char * const syscallnames[];
+extern const char * const altsyscallnames[];
#define MODNAME dtrace_syscall
#define MODDEP "dtrace"
#define MAXSYSCALL SYS_MAXSYSCALL
#define SYSCALLNAMES syscallnames
+#define ALTSYSCALLNAMES altsyscallnames
#define SYSENT sysent
#define PROVNAME "syscall"
#endif
@@ -181,15 +185,16 @@
return;
for (i = 0; i < MAXSYSCALL; i++) {
- if (dtrace_probe_lookup(systrace_id, NULL,
- SYSCALLNAMES[i], "entry") != 0)
+ const char *name = ALTSYSCALLNAMES[i] ? ALTSYSCALLNAMES[i] :
+ SYSCALLNAMES[i];
+ if (dtrace_probe_lookup(systrace_id, NULL, name, "entry") != 0)
continue;
(void) dtrace_probe_create(systrace_id, NULL,
- SYSCALLNAMES[i], "entry", SYSTRACE_ARTIFICIAL_FRAMES,
+ name, "entry", SYSTRACE_ARTIFICIAL_FRAMES,
(void *)(intptr_t)SYSTRACE_ENTRY(i));
(void) dtrace_probe_create(systrace_id, NULL,
- SYSCALLNAMES[i], "return", SYSTRACE_ARTIFICIAL_FRAMES,
+ name, "return", SYSTRACE_ARTIFICIAL_FRAMES,
(void *)(intptr_t)SYSTRACE_RETURN(i));
}
}
Home |
Main Index |
Thread Index |
Old Index