From: Keir Fraser Subject: Re: [Patch] support of lock profiling in Xen Date: Thu, 08 Oct 2009 09:38:09 +0100 Message-ID: References: <4ACDA27A.80603@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4ACDA27A.80603@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 08/10/2009 09:27, "Juergen Gross" wrote: >> If lock profiling is compiled in, have a static array of lock-profile >> descriptors (keeps things simple - could make it a growable array, or >> something). On lock init, walk the array looking for that name. If found, >> write the entry index into a new field in the spinlock struct. If not found, >> allocate next entry in lock-profile array, init it, and write its index into >> the spinlock struct. > > Don't you think a solution like for performance counters would be better then? > The index would be in a header file and the sums could be held per-cpu to > avoid races. > It would even be possible to define lock arrays if summing up all data for > e.g. domain specific locks is not desired. It's just a question of impact on our existing locking API. I'd like to minimise that. I'm not particularly a fan of the perfc stuff. -- Keir