[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] 答复: oprofile-list Digest, Vol 108, Issue 1



On 05/05/2015 12:44 AM, 蒋雄伟(蒋冲) wrote:
> In /xen/arch/x86/oprofile/op_counter.h  there is a definition
> 
> #define OP_MAX_COUNTER 8
> 
> As far as I know , the number of counter equals the number of events.  As
> all we know that the number of events is more than 8. 
> So my question is : Is it the maximum concurrent counter or the total
> counter ? 
> 
Hi,

You are referring to OP_MAX_COUNTER in:

http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/oprofile/op_counter.h;h=b515ac9ebc8e379a36917e6f270653d412a87dd7;hb=refs/heads/master

This is the maximum number of performance monitoring counters that the 
processors could have and can use concurrently.   However, some x86 processors 
have fewer performance counters available.  Many AMD processors only have 4 and 
when hyperthreading is used on some Intel processors the number of counters is 
halfed with each thread getting 4.  The following checks with OP_MAX_COUNTER 
look a bit odd as a result allowing writing to things that will never be used:

http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/oprofile/xenoprof.c;h=002a6962246598ab150f03acc27dc9753fa436f5;hb=refs/heads/master


-Will

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.