From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 12 04:06:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACE6616A415 for ; Tue, 12 Dec 2006 04:06:55 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6F1343CB7 for ; Tue, 12 Dec 2006 04:05:30 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so108569nfc for ; Mon, 11 Dec 2006 20:06:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FpNqO+msaEmoXPB2ka6eT/TDPyYS1/c2A9VTFGwuaulUS2TfQOBLKTLPGU1R50DTVK3kAZDpw0npjwfDFmg6jaoXZ6pjJts5K+0rUJRF4S5Tbu188/xkNre4lqD7o18OU0QpeZ08cipBp98CeQMjwIbd/is8BBFPvv7tlsiZufI= Received: by 10.78.166.7 with SMTP id o7mr1923209hue.1165896409530; Mon, 11 Dec 2006 20:06:49 -0800 (PST) Received: by 10.78.201.7 with HTTP; Mon, 11 Dec 2006 20:06:49 -0800 (PST) Message-ID: <84dead720612112006r5573a04fge2664ffe3a93f796@mail.gmail.com> Date: Tue, 12 Dec 2006 09:36:49 +0530 From: "Joseph Koshy" To: "Adrian Chadd" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: pmcstat and squid X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 04:06:55 -0000 > I'm trying to use pmcstat to profile userspace time used in > Squid. I just can't seem to get pmcstat to report anything > useful. > > The last thing I tried was something like: > > # pmcstat -O file -P instructions -t > # pmcstat -R file -g > # ls k7-retired-instructions > kernel.gmon > > There doesn't seem to be a good example for > process-based counting stuff with PMC. Could anyone > give me a hand? > > Thanks! I can think of one of two scenarios: 1) the squid process was in the kernel when the samples got taken. This could happen if the process was say in select() handling all the time. 2) There a bug in my process handling code that is being triggered (hwpmc undercounts process-mode samples), and samples are being missed. Regards, Koshy