From owner-freebsd-hackers Tue Oct 24 20:59:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 6170C37B479 for ; Tue, 24 Oct 2000 20:59:10 -0700 (PDT) Received: (from grog@localhost) by wantadilla.lemis.com (8.11.0/8.9.3) id e9P3x3X87744; Wed, 25 Oct 2000 13:29:03 +0930 (CST) (envelope-from grog) Date: Wed, 25 Oct 2000 13:29:03 +0930 From: Greg Lehey To: Christopher Harrer Cc: Freebsd-Hackers Subject: Re: Determining CPU on SMP box Message-ID: <20001025132903.B87564@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from charrer@alacritech.com on Tue, Oct 24, 2000 at 07:37:12AM -0400 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 24 October 2000 at 7:37:12 -0400, Christopher Harrer wrote: > Hello All, > > Is there a way to determine which CPU I'm currently executing on in a SMP > box? I've found references to proc->p_oncpu, but I'm not sure if this is > the best way to determine where I'm executing. I'd like to be able to > "trace" various actions within my driver and one of the fields I want to > keep track of is what CPU I'm executing on. Which version of FreeBSD? 5-CURRENT has the ktr functions, which you could use for your tracing. They include CPU information. Unfortunately we don't have a man page yet. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message