From owner-freebsd-mips@FreeBSD.ORG Tue May 31 17:56:34 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 970A81065673 for ; Tue, 31 May 2011 17:56:34 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id F11168FC13 for ; Tue, 31 May 2011 17:56:33 +0000 (UTC) Received: by wyf23 with SMTP id 23so4757900wyf.13 for ; Tue, 31 May 2011 10:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=cSvz0Ull0HyNGMFMzWkfvbrlvFhw2XjROnnpZUdEHsE=; b=vjxCTfhyK/ImpVza7XbrzhmLsskpfSUn6EaNBohUGYOOqxjIS8PE7Xp8yVzLcZvBqM ySIYMN9Y52sFVUy5fQYGw2lQ5G51RuswT5URhk59hUPkVT7I9hA5dNE0aFyjK1lh6xFY 9qgZ+fSvMrFYhOVSqvFWYEQRA1uehR2iSXj54= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Pv3w/JOaCgCj/NFDF55xHRMh0uDtP3ITeEA7nta/oIxZonryiVpwE8L135NcgjoH2G lf+qnrPez+tbmerxw0HP2TftVhBOcJB5uomspoJmVOz4ANjevkw5z+M80yW0mkjob38B B2AI7iDnxS2TzNzGPKZOr1OwKG6VWfLNsO6Oo= MIME-Version: 1.0 Received: by 10.216.62.195 with SMTP id y45mr3648168wec.15.1306864592742; Tue, 31 May 2011 10:56:32 -0700 (PDT) Received: by 10.216.154.149 with HTTP; Tue, 31 May 2011 10:56:32 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 May 2011 23:26:32 +0530 Message-ID: From: "Jayachandran C." To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: hwpmc and mips? X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 17:56:34 -0000 On Tue, May 31, 2011 at 3:38 PM, Adrian Chadd wrote: > On 31 May 2011 18:00, Adrian Chadd wrote: > >> I'm likely going to look at this sometime after July (and I'm sure >> it's just a case of hooking into the right IRQ handler) but if someone >> beat me to it *hint*, I'd very much appreciate it. > > To prove I'm not completely slack, I went spelunking through the > source to see how hwpmc hooks into things. > > There's no HWPMC_HOOKS used anywhere in sys/mips/* or sys/mips/*/*, > save config files. > > I thus have a feeling the hwpmc glue for sampling mode just isn't > there for any MIPS core at the present time. > > Would someone more versed in the ways of MIPS stack frame magic and > trap handling care to take a stab at it? We have some work in progress on hwpmc on XLR, there is a hang on SMP which we need to fix before merging it. The counters are very different from the mips24k, and unfortunately the counters generated the same interrupt as the count/compare timer. On mips, getting the stack trace is going to be difficult - I'm not sure if this can be done efficiently in the pmc interrupt handler at all. JC.