From owner-cvs-all Sat Feb 24 23:36:49 2001 Delivered-To: cvs-all@freebsd.org Received: from mobile.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 431B937B4EC; Sat, 24 Feb 2001 23:36:34 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f1P7aVi01775; Sat, 24 Feb 2001 23:36:31 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200102250736.f1P7aVi01775@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Bruce Evans Cc: Jake Burkholder , 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 In-Reply-To: Date: Sat, 24 Feb 2001 23:36:31 -0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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