Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137523073
D6581.id16920.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
875 B
Referenced Files
None
Subscribers
None
D6581.id16920.diff
View Options
Index: sys/dev/hwpmc/hwpmc_mod.c
===================================================================
--- sys/dev/hwpmc/hwpmc_mod.c
+++ sys/dev/hwpmc/hwpmc_mod.c
@@ -4199,6 +4199,7 @@
struct pmc_samplebuffer *psb;
#ifdef INVARIANTS
int ncallchains;
+ int nfree;
#endif
psb = pmc_pcpu[cpu]->pc_sb[ring];
@@ -4210,6 +4211,7 @@
#ifdef INVARIANTS
ncallchains = 0;
+ nfree = 0;
#endif
/*
@@ -4221,6 +4223,10 @@
ps = psb->ps_read;
ps_end = psb->ps_write;
do {
+#ifdef INVARIANTS
+ if (ps->ps_pmc->pm_state != PMC_STATE_RUNNING)
+ nfree++;
+#endif
if (ps->ps_nsamples != PMC_SAMPLE_INUSE)
goto next;
if (ps->ps_td != td)
@@ -4256,7 +4262,7 @@
ps = psb->ps_samples;
} while (ps != ps_end);
- KASSERT(ncallchains > 0,
+ KASSERT(ncallchains > 0 || nfree > 0,
("[pmc,%d] cpu %d didn't find a sample to collect", __LINE__,
cpu));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 25, 3:51 AM (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26095623
Default Alt Text
D6581.id16920.diff (875 B)
Attached To
Mode
D6581: Don't panic when stopping sampling
Attached
Detach File
Event Timeline
Log In to Comment