mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::ctx: Condition the prof checks on NDEBUG.
This commit is contained in:
parent
894a947e24
commit
599831f680
1 changed files with 14 additions and 0 deletions
14
ircd/ctx.cc
14
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)
|
||||
|
|
Loading…
Reference in a new issue