From 599831f680b565ef1ba75dc9e1576670a6f315f1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 22 Dec 2018 21:27:19 -0800 Subject: [PATCH] ircd::ctx: Condition the prof checks on NDEBUG. --- ircd/ctx.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ircd/ctx.cc b/ircd/ctx.cc index 969082aad..0783ebddf 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -1536,6 +1536,7 @@ ircd::ctx::prof::slice_leave() _total.cycles += last_slice; } +#ifndef NDEBUG void ircd::ctx::prof::check_slice() { @@ -1578,7 +1579,14 @@ ircd::ctx::prof::check_slice() cycles(c), }; } +#else +void +ircd::ctx::prof::check_slice() +{ +} +#endif // NDEBUG +#ifndef NDEBUG void ircd::ctx::prof::check_stack() { @@ -1607,6 +1615,12 @@ ircd::ctx::prof::check_stack() // Stack assertion assert(stack_exempt || !stack_exceeded_assertion(stack_at)); } +#else +void +ircd::ctx::prof::check_stack() +{ +} +#endif // NDEBUG bool ircd::ctx::prof::stack_exceeded_assertion(const size_t &stack_at)