Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144429185
D20903.id59591.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D20903.id59591.diff
View Options
Index: sys/powerpc/aim/mmu_oea64.h
===================================================================
--- sys/powerpc/aim/mmu_oea64.h
+++ sys/powerpc/aim/mmu_oea64.h
@@ -72,8 +72,13 @@
* Statistics
*/
+#ifdef MOEA64_STATS
extern u_int moea64_pte_valid;
extern u_int moea64_pte_overflow;
+#define STAT_MOEA64(x) x
+#else
+#define STAT_MOEA64(x) ((void)0)
+#endif
/*
* State variables
Index: sys/powerpc/aim/mmu_oea64.c
===================================================================
--- sys/powerpc/aim/mmu_oea64.c
+++ sys/powerpc/aim/mmu_oea64.c
@@ -200,6 +200,7 @@
static boolean_t moea64_initialized = FALSE;
+#ifdef MOEA64_STATS
/*
* Statistics.
*/
@@ -218,6 +219,7 @@
&moea64_pvo_enter_calls, 0, "");
SYSCTL_INT(_machdep, OID_AUTO, moea64_pvo_remove_calls, CTLFLAG_RD,
&moea64_pvo_remove_calls, 0, "");
+#endif
vm_offset_t moea64_scratchpage_va[2];
struct pvo_entry *moea64_scratchpage_pvo[2];
@@ -1435,7 +1437,7 @@
/* If not in page table, reinsert it */
if (MOEA64_PTE_SYNCH(mmu, oldpvo) < 0) {
- moea64_pte_overflow--;
+ STAT_MOEA64(moea64_pte_overflow--);
MOEA64_PTE_INSERT(mmu, oldpvo);
}
@@ -2527,7 +2529,7 @@
KASSERT(moea64_pvo_find_va(pvo->pvo_pmap, PVO_VADDR(pvo)) == NULL,
("Existing mapping for VA %#jx", (uintmax_t)PVO_VADDR(pvo)));
- moea64_pvo_enter_calls++;
+ STAT_MOEA64(moea64_pvo_enter_calls++);
/*
* Add to pmap list
@@ -2562,7 +2564,7 @@
panic("moea64_pvo_enter: overflow");
}
- moea64_pvo_entries++;
+ STAT_MOEA64(moea64_pvo_entries++);
if (pvo->pvo_pmap == kernel_pmap)
isync();
@@ -2661,8 +2663,8 @@
}
}
- moea64_pvo_entries--;
- moea64_pvo_remove_calls++;
+ STAT_MOEA64(moea64_pvo_entries--);
+ STAT_MOEA64(moea64_pvo_remove_calls++);
}
static void
Index: sys/powerpc/aim/moea64_native.c
===================================================================
--- sys/powerpc/aim/moea64_native.c
+++ sys/powerpc/aim/moea64_native.c
@@ -332,7 +332,7 @@
if ((be64toh(pt->pte_hi & LPTE_AVPN_MASK)) !=
(properpt.pte_hi & LPTE_AVPN_MASK)) {
/* Evicted */
- moea64_pte_overflow--;
+ STAT_MOEA64(moea64_pte_overflow--);
rw_runlock(&moea64_eviction_lock);
return (-1);
}
@@ -352,7 +352,7 @@
rw_runlock(&moea64_eviction_lock);
/* Keep statistics */
- moea64_pte_valid--;
+ STAT_MOEA64(moea64_pte_valid--);
return (ptelo & (LPTE_CHG | LPTE_REF));
}
@@ -656,8 +656,8 @@
(ADDR_API_SHFT64 - ADDR_PIDX_SHFT);
PTESYNC();
TLBIE(va);
- moea64_pte_valid--;
- moea64_pte_overflow++;
+ STAT_MOEA64(moea64_pte_valid--);
+ STAT_MOEA64(moea64_pte_overflow++);
}
/*
@@ -670,7 +670,7 @@
PTESYNC();
/* Keep statistics */
- moea64_pte_valid++;
+ STAT_MOEA64(moea64_pte_valid++);
return (k);
}
Index: sys/powerpc/ps3/mmu_ps3.c
===================================================================
--- sys/powerpc/ps3/mmu_ps3.c
+++ sys/powerpc/ps3/mmu_ps3.c
@@ -224,14 +224,14 @@
mtx_lock(&mps3_table_lock);
refchg = mps3_pte_synch_locked(pvo);
if (refchg < 0) {
- moea64_pte_overflow--;
+ STAT_MOEA64(moea64_pte_overflow--);
mtx_unlock(&mps3_table_lock);
return (-1);
}
/* XXX: race on RC bits between unset and sync. Anything to do? */
lv1_write_htab_entry(mps3_vas_id, pvo->pvo_pte.slot, 0, 0);
mtx_unlock(&mps3_table_lock);
- moea64_pte_valid--;
+ STAT_MOEA64(moea64_pte_valid--);
return (refchg & (LPTE_REF | LPTE_CHG));
}
@@ -272,13 +272,13 @@
pvo->pvo_vaddr |= PVO_HID;
pvo->pvo_pte.slot = index;
- moea64_pte_valid++;
+ STAT_MOEA64(moea64_pte_valid++);
if (evicted.pte_hi) {
KASSERT((evicted.pte_hi & (LPTE_WIRED | LPTE_LOCKED)) == 0,
("Evicted a wired PTE"));
- moea64_pte_valid--;
- moea64_pte_overflow++;
+ STAT_MOEA64(moea64_pte_valid--);
+ STAT_MOEA64(moea64_pte_overflow++);
}
return (0);
Index: sys/powerpc/pseries/mmu_phyp.c
===================================================================
--- sys/powerpc/pseries/mmu_phyp.c
+++ sys/powerpc/pseries/mmu_phyp.c
@@ -364,7 +364,7 @@
("Error removing page: %d", err));
if (err == H_NOT_FOUND) {
- moea64_pte_overflow--;
+ STAT_MOEA64(moea64_pte_overflow--);
return (-1);
}
@@ -485,7 +485,7 @@
result = phyp_pft_hcall(H_REMOVE, H_AVPN, index,
evicted.pte_hi & LPTE_AVPN_MASK, 0, &junk, &lastptelo,
&junk);
- moea64_pte_overflow++;
+ STAT_MOEA64(moea64_pte_overflow++);
KASSERT(result == H_SUCCESS || result == H_NOT_FOUND,
("Error evicting page: %d", (int)result));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 9:44 AM (4 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28565081
Default Alt Text
D20903.id59591.diff (4 KB)
Attached To
Mode
D20903: powerpc/pmap64: Make moea64 statistics optional
Attached
Detach File
Event Timeline
Log In to Comment