diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-27 10:40:11 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-27 10:40:11 +0100 |
commit | da5e66e536ce9a491d620d90584577c5b08c9a06 (patch) | |
tree | b30cb0ba0ecf87e6ecabf69213d80f9c94bef7de /xen/include/xen/tmem_xen.h | |
parent | 02e1301f013208fcac863c0f8bda5e268ecf8c58 (diff) | |
download | xen-da5e66e536ce9a491d620d90584577c5b08c9a06.tar.gz xen-da5e66e536ce9a491d620d90584577c5b08c9a06.tar.bz2 xen-da5e66e536ce9a491d620d90584577c5b08c9a06.zip |
tmem: extra stats
This patch collects a few additional valuable per-domain
performance stats.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/include/xen/tmem_xen.h')
-rw-r--r-- | xen/include/xen/tmem_xen.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h index aec44ce09e..55d5f2152a 100644 --- a/xen/include/xen/tmem_xen.h +++ b/xen/include/xen/tmem_xen.h @@ -360,6 +360,16 @@ extern int tmh_copy_to_client(tmem_cli_mfn_t cmfn, pfp_t *pfp, if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \ } \ } while (0) +#define END_CYC_COUNTER_CLI(x,y) \ + do { \ + x##_start = get_cycles() - x##_start; \ + if (x##_start > 0 && x##_start < 1000000000) { \ + x##_sum_cycles += x##_start; x##_count++; \ + if ((uint32_t)x##_start < x##_min_cycles) x##_min_cycles = x##_start; \ + if ((uint32_t)x##_start > x##_max_cycles) x##_max_cycles = x##_start; \ + y->total_cycles += x##_start; \ + } \ + } while (0) #define RESET_CYC_COUNTER(x) { x##_sum_cycles = 0, x##_count = 0; \ x##_min_cycles = 0x7fffffff, x##_max_cycles = 0; } #define SCNPRINTF_CYC_COUNTER(buf,size,x,tag) \ |