'lock levels' are deprecated, now a noop (#20539)

* 'lock levels' are deprecated, now a noop

* fixes tests
This commit is contained in:
ringabout 2022-10-11 15:17:09 +08:00 • committed by GitHub
commit 5602183234
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 121 additions and 372 deletions

View file

@ -122,13 +122,13 @@ when defined(memProfiler):
var
gTicker {.threadvar.}: int
proc requestedHook(): bool {.nimcall, locks: 0.} =
proc requestedHook(): bool {.nimcall.} =
if gTicker == 0:
gTicker = SamplingInterval
result = true
dec gTicker
proc hook(st: StackTrace, size: int) {.nimcall, locks: 0.} =
proc hook(st: StackTrace, size: int) {.nimcall.} =
when defined(ignoreAllocationSize):
hookAux(st, 1)
else:
@ -140,7 +140,7 @@ else:
gTicker: int # we use an additional counter to
# avoid calling 'getTicks' too frequently
proc requestedHook(): bool {.nimcall, locks: 0.} =
proc requestedHook(): bool {.nimcall.} =
if interval == 0: result = true
elif gTicker == 0:
gTicker = 500
@ -149,7 +149,7 @@ else:
else:
dec gTicker
proc hook(st: StackTrace) {.nimcall, locks: 0.} =
proc hook(st: StackTrace) {.nimcall.} =
#echo "profiling! ", interval
if interval == 0:
hookAux(st, 1)