From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 13 02:06:05 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B32A16A4CE for ; Fri, 13 Aug 2004 02:06:05 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87CA843D45 for ; Fri, 13 Aug 2004 02:06:05 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i7D265la005368; Thu, 12 Aug 2004 19:06:05 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i7D265rq005367; Thu, 12 Aug 2004 19:06:05 -0700 (PDT) (envelope-from dillon) Date: Thu, 12 Aug 2004 19:06:05 -0700 (PDT) From: Matthew Dillon Message-Id: <200408130206.i7D265rq005367@apollo.backplane.com> To: gerarra@tin.it References: <4119722900001B0D@ims3a.cp.tin.it> cc: freebsd-hackers@freebsd.org Subject: Re: Interrupt 0x80 handling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2004 02:06:05 -0000 :Hi, :giving a look to interrupt 0x80 handling code (i386/i386/exception.s), I've :met FAKE_MCOUNT/MEXITCOUNT system. FAKE_MCOUNT in the end calls _mcount :(libkern/mcount.c) function which seems to be used for profiling purposes :IMHO. It seems (reading comments in sys/gmon.h) that sysctl could be used :to manage syscall profiling (kernel profiling?): Somebody can confirm that :or I've misunderstood? I would like to know another thing too: why interrupt :0x80 handler is implemented through a trap gate? An interrupt gate could :not be more logical? : :thanks for answers, :cheers : :rookie An interrupt gate will disable interrupts on entry (cli equivalent), while a trap gate does not. There is no reason to disable interrupts in a system call so a trap gate is used. -Matt