Date: Sat, 22 May 2021 19:28:41 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fca5cfd584d8 - main - lockprof: retire lock_prof_skipcount Message-ID: <202105221928.14MJSfFp087291@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fca5cfd584d81ca291dbd898a8ff60c52d8c3c42 commit fca5cfd584d81ca291dbd898a8ff60c52d8c3c42 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-05-18 19:05:42 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-05-22 19:28:37 +0000 lockprof: retire lock_prof_skipcount The implementation uses a global variable for *ALL* calls, defeating the point of sampling in the first place. Remove it as it clearly remains unused. --- sys/kern/subr_lock.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index 1afaa19302ed..97b880b54ea2 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -278,7 +278,6 @@ static volatile int lock_prof_resetting; static int lock_prof_rejected; static int lock_prof_skipspin; -static int lock_prof_skipcount; #ifndef USE_CPU_NANOSECONDS uint64_t @@ -597,7 +596,6 @@ void lock_profile_obtain_lock_success(struct lock_object *lo, int contested, uint64_t waittime, const char *file, int line) { - static int lock_prof_count; struct lock_profile_object *l; int spin; @@ -607,9 +605,6 @@ lock_profile_obtain_lock_success(struct lock_object *lo, int contested, /* don't reset the timer when/if recursing */ if (!lock_prof_enable || (lo->lo_flags & LO_NOPROFILE)) return; - if (lock_prof_skipcount && - (++lock_prof_count % lock_prof_skipcount) != 0) - return; spin = (LOCK_CLASS(lo)->lc_flags & LC_SPINLOCK) ? 1 : 0; if (spin && lock_prof_skipspin == 1) return; @@ -732,8 +727,6 @@ static SYSCTL_NODE(_debug_lock, OID_AUTO, prof, "lock profiling"); SYSCTL_INT(_debug_lock_prof, OID_AUTO, skipspin, CTLFLAG_RW, &lock_prof_skipspin, 0, "Skip profiling on spinlocks."); -SYSCTL_INT(_debug_lock_prof, OID_AUTO, skipcount, CTLFLAG_RW, - &lock_prof_skipcount, 0, "Sample approximately every N lock acquisitions."); SYSCTL_INT(_debug_lock_prof, OID_AUTO, rejected, CTLFLAG_RD, &lock_prof_rejected, 0, "Number of rejected profiling records"); SYSCTL_PROC(_debug_lock_prof, OID_AUTO, stats,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105221928.14MJSfFp087291>