Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102965687
D45761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D45761.diff
View Options
diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -259,24 +259,24 @@
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"2MB page mapping counters");
-static u_long pmap_l2_demotions;
-SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, demotions, CTLFLAG_RD,
- &pmap_l2_demotions, 0,
+static COUNTER_U64_DEFINE_EARLY(pmap_l2_demotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l2, OID_AUTO, demotions, CTLFLAG_RD,
+ &pmap_l2_demotions,
"2MB page demotions");
-static u_long pmap_l2_mappings;
-SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, mappings, CTLFLAG_RD,
- &pmap_l2_mappings, 0,
+static COUNTER_U64_DEFINE_EARLY(pmap_l2_mappings);
+SYSCTL_COUNTER_U64(_vm_pmap_l2, OID_AUTO, mappings, CTLFLAG_RD,
+ &pmap_l2_mappings,
"2MB page mappings");
-static u_long pmap_l2_p_failures;
-SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, p_failures, CTLFLAG_RD,
- &pmap_l2_p_failures, 0,
+static COUNTER_U64_DEFINE_EARLY(pmap_l2_p_failures);
+SYSCTL_COUNTER_U64(_vm_pmap_l2, OID_AUTO, p_failures, CTLFLAG_RD,
+ &pmap_l2_p_failures,
"2MB page promotion failures");
-static u_long pmap_l2_promotions;
-SYSCTL_ULONG(_vm_pmap_l2, OID_AUTO, promotions, CTLFLAG_RD,
- &pmap_l2_promotions, 0,
+static COUNTER_U64_DEFINE_EARLY(pmap_l2_promotions);
+SYSCTL_COUNTER_U64(_vm_pmap_l2, OID_AUTO, promotions, CTLFLAG_RD,
+ &pmap_l2_promotions,
"2MB page promotions");
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
@@ -3025,7 +3025,7 @@
if ((oldl2 & PTE_SW_MANAGED) != 0)
pmap_pv_demote_l2(pmap, va, PTE_TO_PHYS(oldl2), lockp);
- atomic_add_long(&pmap_l2_demotions, 1);
+ counter_u64_add(pmap_l2_demotions, 1);
CTR2(KTR_PMAP, "pmap_demote_l2_locked: success for va %#lx in pmap %p",
va, pmap);
return (true);
@@ -3057,7 +3057,7 @@
if ((pa & L2_OFFSET) != 0) {
CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx pmap %p",
va, pmap);
- atomic_add_long(&pmap_l2_p_failures, 1);
+ counter_u64_add(pmap_l2_p_failures, 1);
return (false);
}
@@ -3091,7 +3091,7 @@
CTR2(KTR_PMAP,
"pmap_promote_l2: failure for va %#lx pmap %p",
va, pmap);
- atomic_add_long(&pmap_l2_p_failures, 1);
+ counter_u64_add(pmap_l2_p_failures, 1);
return (false);
}
while ((l3e & (PTE_W | PTE_D)) == PTE_W) {
@@ -3104,7 +3104,7 @@
CTR2(KTR_PMAP,
"pmap_promote_l2: failure for va %#lx pmap %p",
va, pmap);
- atomic_add_long(&pmap_l2_p_failures, 1);
+ counter_u64_add(pmap_l2_p_failures, 1);
return (false);
}
all_l3e_PTE_A &= l3e;
@@ -3131,7 +3131,7 @@
if (pmap_insert_pt_page(pmap, ml3, true, all_l3e_PTE_A != 0)) {
CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx pmap %p",
va, pmap);
- atomic_add_long(&pmap_l2_p_failures, 1);
+ counter_u64_add(pmap_l2_p_failures, 1);
return (false);
}
@@ -3140,7 +3140,7 @@
pmap_store(l2, firstl3e);
- atomic_add_long(&pmap_l2_promotions, 1);
+ counter_u64_add(pmap_l2_promotions, 1);
CTR2(KTR_PMAP, "pmap_promote_l2: success for va %#lx in pmap %p", va,
pmap);
return (true);
@@ -3597,7 +3597,7 @@
*/
pmap_store(l2, new_l2);
- atomic_add_long(&pmap_l2_mappings, 1);
+ counter_u64_add(pmap_l2_mappings, 1);
CTR2(KTR_PMAP, "pmap_enter_l2: success for va %#lx in pmap %p",
va, pmap);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 7:13 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14732799
Default Alt Text
D45761.diff (3 KB)
Attached To
Mode
D45761: riscv: use counter(9) for pmap counters
Attached
Detach File
Event Timeline
Log In to Comment