[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Merge wyvis.research.intel-research.net:/home/irchomes/rneugeba/src/xeno/xeno.bk
ChangeSet 1.1239, 2005/02/25 17:27:55+00:00, rneugeba@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Merge wyvis.research.intel-research.net:/home/irchomes/rneugeba/src/xeno/xeno.bk into wyvis.research.intel-research.net:/home/irchomes/rneugeba/src/xeno/xen.bench Signed-off-by: michael.fetterman@xxxxxxxxxxxx arch/x86/mm.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++- arch/x86/x86_32/entry.S | 1 common/perfc.c | 12 +++++++++- include/xen/perfc_defn.h | 1 4 files changed, 63 insertions(+), 3 deletions(-) diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c 2005-04-05 12:05:49 -04:00 +++ b/xen/arch/x86/mm.c 2005-04-05 12:05:49 -04:00 @@ -1685,8 +1685,30 @@ } } +#ifdef PERF_COUNTERS perfc_incrc(calls_to_mmu_update); perfc_addc(num_page_updates, count); + /* + * do a histogram for count. + * first bucket is for count=0, + * second bucket is for count=1 + * last bucket is for count >= 63 * PERFC_PT_UPDATES_BUCKET_SIZE + */ + if ( count == 0 ) + { + perfc_incra(bpt_updates, 0); + } else if ( count == 1 ) + { + perfc_incra(bpt_updates, 1); + } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE) + < (PERFC_MAX_PT_UPDATES - 3) ) + { + perfc_incra(bpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2); + } else + { + perfc_incra(bpt_updates, PERFC_MAX_PT_UPDATES - 1); + } +#endif if ( unlikely(!array_access_ok(VERIFY_READ, ureqs, count, sizeof(req))) ) { @@ -2234,6 +2256,7 @@ int i, cpu = smp_processor_id(); struct exec_domain *ed = current; struct domain *d = ed->domain; + unsigned int count; l1va = ptwr_info[cpu].ptinfo[which].l1va; ptep = (unsigned long *)&linear_pg_table[l1_linear_offset(l1va)]; @@ -2292,7 +2315,7 @@ /* * STEP 2. Validate any modified PTEs. */ - + count = 0; pl1e = ptwr_info[cpu].ptinfo[which].pl1e; for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) { @@ -2302,6 +2325,9 @@ if ( likely(l1_pgentry_val(ol1e) == l1_pgentry_val(nl1e)) ) continue; + /* update number of entries modified */ + count++; + /* * Fast path for PTEs that have merely been write-protected * (e.g., during a Unix fork()). A strict reduction in privilege. @@ -2342,6 +2368,30 @@ put_page_from_l1e(ol1e, d); } unmap_domain_mem(pl1e); + +#ifdef PERF_COUNTERS + /* + * do a histogram for count. + * first bucket is for count=0, + * second bucket is for count=1 + * last bucket is for count >= 63 * PERFC_PT_UPDATES_BUCKET_SIZE + */ + if ( count == 0 ) + { + perfc_incra(wpt_updates, 0); + } else if ( count == 1 ) + { + perfc_incra(wpt_updates, 1); + } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE) + < (PERFC_MAX_PT_UPDATES - 3) ) + { + perfc_incra(wpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2); + } else + { + perfc_incra(wpt_updates, PERFC_MAX_PT_UPDATES - 1); + } +#endif + /* * STEP 3. Reattach the L1 p.t. page into the current address space. diff -Nru a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S --- a/xen/arch/x86/x86_32/entry.S 2005-04-05 12:05:49 -04:00 +++ b/xen/arch/x86/x86_32/entry.S 2005-04-05 12:05:49 -04:00 @@ -99,6 +99,7 @@ pushl $VMX_MONITOR_EFLAGS; \ popf; \ subl $(NR_SKIPPED_REGS*4), %esp; \ + movl $0, 0xc(%esp); /* eflags==0 identifies xen_regs as VMX guest */ \ pushl %eax; \ pushl %ebp; \ pushl %edi; \ diff -Nru a/xen/common/perfc.c b/xen/common/perfc.c --- a/xen/common/perfc.c 2005-04-05 12:05:49 -04:00 +++ b/xen/common/perfc.c 2005-04-05 12:05:49 -04:00 @@ -1,4 +1,3 @@ -/* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */ #include <xen/lib.h> #include <xen/smp.h> @@ -32,7 +31,7 @@ #define NR_PERFCTRS (sizeof(perfc_info) / sizeof(perfc_info[0])) -struct perfcounter_t perfcounters; +struct perfcounter perfcounters; void perfc_printall(unsigned char key) { @@ -221,3 +220,12 @@ return rc; } + +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + */ diff -Nru a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h --- a/xen/include/xen/perfc_defn.h 2005-04-05 12:05:49 -04:00 +++ b/xen/include/xen/perfc_defn.h 2005-04-05 12:05:49 -04:00 @@ -31,6 +31,7 @@ /* STATUS counters do not reset when 'P' is hit */ PERFSTATUS( shadow_l2_pages, "current # shadow L2 pages" ) PERFSTATUS( shadow_l1_pages, "current # shadow L1 pages" ) +PERFSTATUS( hl2_table_pages, "current # hl2 pages" ) PERFCOUNTER_CPU( check_pagetable, "calls to check_pagetable" ) PERFCOUNTER_CPU( check_all_pagetables, "calls to check_all_pagetables" ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |