| To: | xen-devel@xxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | [Xen-devel] [PATCH] make perfc_valuea actually return the value it reads |
| From: | David Lively <dlively@xxxxxxxxxxxxxxx> |
| Date: | 2006年5月26日 11:14:39 -0400 |
| Delivery-date: | 2006年5月26日 08:15:03 -0700 |
| Envelope-to: | www-data@xxxxxxxxxxxxxxxxxx |
| List-help: | <mailto:xen-devel-request@lists.xensource.com?subject=help> |
| List-id: | Xen developer discussion <xen-devel.lists.xensource.com> |
| List-post: | <mailto:xen-devel@lists.xensource.com> |
| List-subscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
| List-unsubscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
| Sender: | xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
The perfc_valuea macro was effectively a no-op. This trivial patch makes it return the value it reads.
Make perfc_valuea actually return the value it reads.
Signed-off-by: David Lively <dlively@xxxxxxxxxxxxxxx>
diff -r ac4a961f7e64 xen/include/xen/perfc.h
--- a/xen/include/xen/perfc.h Thu May 25 22:57:44 2006 +0100
+++ b/xen/include/xen/perfc.h Fri May 26 11:10:33 2006 -0400
@@ -56,10 +56,8 @@ extern struct perfcounter perfcounters;
#define perfc_value(x) atomic_read(&perfcounters.x[0])
#define perfc_valuec(x) atomic_read(&perfcounters.x[smp_processor_id()])
#define perfc_valuea(x,y) \
- do { \
- if ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ) \
- atomic_read(&perfcounters.x[y]); \
- } while ( 0 )
+ ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ? \
+ atomic_read(&perfcounters.x[y]) : 0 )
#define perfc_set(x,v) atomic_set(&perfcounters.x[0], v)
#define perfc_setc(x,v) atomic_set(&perfcounters.x[smp_processor_id()], v)
#define perfc_seta(x,y,v) \
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Xen-devel] [patch] [3/3] dom0_ops explicitly sized types , Ian Campbell |
|---|---|
| Next by Date: | [Xen-devel] Testing status of fully virtualized guests (Intel VT) on 64bit XEN unstable , Ed Smith |
| Previous by Thread: | [Xen-devel] VMX status report 10162:da7fe04d8e80 , Zheng, Jeff |
| Next by Thread: | [Xen-devel] [PATCH] turn off b44 module on x86_64, it breaks the build , Sean Dague |
| Indexes: | [Date] [Thread] [Top] [All Lists] |