Date: Sat, 24 Feb 2001 23:36:31 -0800 From: Peter Wemm <peter@netplex.com.au> To: Bruce Evans <bde@zeta.org.au> Cc: Jake Burkholder <jake@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 db_trace.c exception.s machdep.c trap.c src/sys/i386/include asnames.h Message-ID: <200102250736.f1P7aVi01775@mobile.wemm.org> In-Reply-To: <Pine.BSF.4.21.0102251745170.5881-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > On Sat, 24 Feb 2001, Jake Burkholder wrote: > > > jake 2001/02/24 18:53:06 PST > > > > Modified files: > > sys/i386/i386 db_trace.c exception.s machdep.c trap.c > > sys/i386/include asnames.h > > Log: > > - Rename the lcall system call handler from Xsyscall to Xlcall_syscall > > to be more like Xint0x80_syscall and less like c function syscall(). > > This is sort of backwards. Xsyscall is supposed to be named like the C > function syscall(), but it should be used for normal int 0x80 syscalls. Well, given that we have two, "Xsyscall" was wrong as it implies that it was the "normal" one (it is not). Would you rather that Xint0x80syscall be renamed to Xsyscall instead? > > - Reduce code duplication between the int0x80 and lcall handlers by > > shuffling the elfags into the right place, saving the sizeof the > > instruction in tf_err and jumping into the common int0x80 code. > > This breaks profiling and pessimizes Xsyscall a little. Please back this > out. Are you sure? The X*syscall stubs dont seem to be profiled.. #define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \ .type __CONCAT(X,name),@function; __CONCAT(X,name): SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds pushl %es pushl %fs mov $KDSEL,%ax /* switch to kernel segments */ mov %ax,%ds mov %ax,%es mov $KPSEL,%ax mov %ax,%fs FAKE_MCOUNT(13*4(%esp)) call syscall MEXITCOUNT jmp doreti Obviously I could easily be misunderstanding things, but the FAKE_MCOUNT pulls the caller off the stack, right? How does this all tie in? Would this change imply that the cpu time of the lcall version would be applied to the int0x80 version? > Bruce Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102250736.f1P7aVi01775>