Date: Fri, 30 May 2008 04:12:11 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142558 for review Message-ID: <200805300412.m4U4CBZK056795@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142558 Change 142558 by jb@freebsd3 on 2008/05/30 04:11:19 MFdtrace Affected files ... .. //depot/projects/dtrace7/src/sys/kern/makesyscalls.sh#2 edit .. //depot/projects/dtrace7/src/sys/kern/syscalls.c#3 edit .. //depot/projects/dtrace7/src/sys/kern/systrace_args.c#3 edit .. //depot/projects/dtrace7/src/sys/sys/syscall.h#3 edit .. //depot/projects/dtrace7/src/sys/sys/syscall.mk#3 edit .. //depot/projects/dtrace7/src/sys/sys/sysproto.h#3 edit Differences ... ==== //depot/projects/dtrace7/src/sys/kern/makesyscalls.sh#2 (text+ko) ==== @@ -1,6 +1,6 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 -# $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.68 2007/07/04 22:38:28 peter Exp $ +# $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.70 2008/03/27 01:53:44 jb Exp $ set -e @@ -34,10 +34,11 @@ sysinc="sysinc.switch.$$" sysarg="sysarg.switch.$$" sysprotoend="sysprotoend.$$" +systracetmp="systrace.$$" -trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend" 0 +trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0 -touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend +touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp case $# in 0) echo "usage: $0 input-file <config-file>" 1>&2 @@ -82,6 +83,7 @@ syshdr = \"$syshdr\" sysmk = \"$sysmk\" systrace = \"$systrace\" + systracetmp = \"$systracetmp\" compat = \"$compat\" compat4 = \"$compat4\" compat6 = \"$compat6\" @@ -159,6 +161,9 @@ printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace printf "\tswitch (sysnum) {\n" > systrace + printf "static void\nsystrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systracetmp + printf "\tswitch (sysnum) {\n" > systracetmp + next } NF == 0 || $1 ~ /^;/ { @@ -316,9 +321,12 @@ || $3 == "NOIMPL" || $3 == "NOSTD" { parseline() printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall) > systrace + printf("\t/* %s */\n\tcase %d:\n", funcname, syscall) > systracetmp if (argc > 0) { + printf("\t\tswitch(ndx) {\n") > systracetmp printf("\t\tstruct %s *p = params;\n", argalias) > systrace for (i = 1; i <= argc; i++) { + printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, argtype[i]) > systracetmp if (index(argtype[i], "*") > 0 || argtype[i] == "caddr_t") printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ @@ -332,8 +340,10 @@ i - 1, \ argname[i], argtype[i]) > systrace } + printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp } printf("\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", argc) > systrace + printf("\t\tbreak;\n") > systracetmp if ((!nosys || funcname != "nosys") && \ (funcname != "lkmnosys") && (funcname != "lkmressys")) { if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO") { @@ -488,7 +498,6 @@ if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0) printf "#include \"opt_compat.h\"\n\n" > syssw - printf "#include \<bsm/audit_kevents.h\>\n" > syssw if (ncompat != 0) { printf "\n#ifdef %s\n", compat > sysinc @@ -529,6 +538,7 @@ printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall) \ > syshdr printf "\tdefault:\n\t\t*n_args = 0;\n\t\tbreak;\n\t};\n}\n" > systrace + printf "\tdefault:\n\t\tbreak;\n\t};\n\tif (p != NULL)\n\t\tstrlcpy(desc, p, descsz);\n}\n" > systracetmp } ' cat $sysinc $sysent >> $syssw @@ -537,4 +547,5 @@ $syscompat4 $syscompat4dcl \ $syscompat6 $syscompat6dcl \ $sysaue $sysprotoend > $sysproto +cat $systracetmp >> $systrace ==== //depot/projects/dtrace7/src/sys/kern/syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.214.2.1 2008/04/10 09:40:06 dfr Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.233.2.1 2008/04/10 09:39:24 dfr Exp */ ==== //depot/projects/dtrace7/src/sys/kern/systrace_args.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/systrace_args.c,v 1.14.2.1 2008/04/10 09:40:06 dfr Exp $ + * $FreeBSD$ * This file is part of the DTrace syscall provider. */ @@ -2886,3 +2886,4720 @@ break; }; } +static void +systrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) +{ + const char *p = NULL; + switch (sysnum) { + /* nosys */ + case 0: + break; + /* sys_exit */ + case 1: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* fork */ + case 2: + break; + /* read */ + case 3: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* write */ + case 4: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* open */ + case 5: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* close */ + case 6: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* wait4 */ + case 7: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "struct rusage *"; + break; + default: + break; + }; + break; + /* link */ + case 9: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* unlink */ + case 10: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* chdir */ + case 12: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* fchdir */ + case 13: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* mknod */ + case 14: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* chmod */ + case 15: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chown */ + case 16: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* obreak */ + case 17: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getpid */ + case 20: + break; + /* mount */ + case 21: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* unmount */ + case 22: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setuid */ + case 23: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* getuid */ + case 24: + break; + /* geteuid */ + case 25: + break; + /* ptrace */ + case 26: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "pid_t"; + break; + case 2: + p = "caddr_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* recvmsg */ + case 27: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* sendmsg */ + case 28: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* recvfrom */ + case 29: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "caddr_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "int"; + break; + case 4: + p = "struct sockaddr *__restrict"; + break; + case 5: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* accept */ + case 30: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getpeername */ + case 31: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getsockname */ + case 32: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* access */ + case 33: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chflags */ + case 34: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* fchflags */ + case 35: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* sync */ + case 36: + break; + /* kill */ + case 37: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* getppid */ + case 39: + break; + /* dup */ + case 41: + switch(ndx) { + case 0: + p = "u_int"; + break; + default: + break; + }; + break; + /* pipe */ + case 42: + break; + /* getegid */ + case 43: + break; + /* profil */ + case 44: + switch(ndx) { + case 0: + p = "caddr_t"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "u_int"; + break; + default: + break; + }; + break; + /* ktrace */ + case 45: + switch(ndx) { + case 0: + p = "const char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* getgid */ + case 47: + break; + /* getlogin */ + case 49: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* setlogin */ + case 50: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* acct */ + case 51: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* sigaltstack */ + case 53: + switch(ndx) { + case 0: + p = "stack_t *"; + break; + case 1: + p = "stack_t *"; + break; + default: + break; + }; + break; + /* ioctl */ + case 54: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "u_long"; + break; + case 2: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* reboot */ + case 55: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* revoke */ + case 56: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* symlink */ + case 57: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* readlink */ + case 58: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* execve */ + case 59: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char **"; + break; + case 2: + p = "char **"; + break; + default: + break; + }; + break; + /* umask */ + case 60: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* chroot */ + case 61: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* msync */ + case 65: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* vfork */ + case 66: + break; + /* sbrk */ + case 69: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sstk */ + case 70: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* ovadvise */ + case 72: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* munmap */ + case 73: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + default: + break; + }; + break; + /* mprotect */ + case 74: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* madvise */ + case 75: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* mincore */ + case 78: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "char *"; + break; + default: + break; + }; + break; + /* getgroups */ + case 79: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* setgroups */ + case 80: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* getpgrp */ + case 81: + break; + /* setpgid */ + case 82: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setitimer */ + case 83: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + case 2: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* swapon */ + case 85: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getitimer */ + case 86: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* getdtablesize */ + case 89: + break; + /* dup2 */ + case 90: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* fcntl */ + case 92: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "long"; + break; + default: + break; + }; + break; + /* select */ + case 93: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "fd_set *"; + break; + case 2: + p = "fd_set *"; + break; + case 3: >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805300412.m4U4CBZK056795>