0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::ctx: Internalize prof::mark() for unconditional event counting.

This commit is contained in:
Jason Volk 2019-05-26 02:07:43 -07:00
parent e038ebfaf1
commit e88f18d65c
3 changed files with 5 additions and 15 deletions

View file

@ -53,9 +53,6 @@ namespace ircd::ctx::prof
bool slice_exceeded_interrupt(const ulong &cycles);
bool stack_exceeded_warning(const size_t &size);
bool stack_exceeded_assertion(const size_t &size);
// called at the appropriate point to mark the event (internal use).
void mark(const event &);
}
namespace ircd::ctx::prof::settings

View file

@ -12,11 +12,6 @@
#include <ircd/asio.h>
#include "ctx.h"
/// Toggle for whether profile counting is enabled based on RB_DEBUG or manual.
#if defined(RB_DEBUG) && !defined(IRCD_CTX_PROF_MARK)
#define IRCD_CTX_PROF_MARK
#endif
/// We make a special use of the stack-protector canary in certain places as
/// another tool to detect corruption of a context's stack, specifically
/// during yield and resume. This use is not really to provide security; just
@ -1652,7 +1647,6 @@ ircd::ctx::prof::settings::slice_assertion
{ "persist", false },
};
#ifdef IRCD_CTX_PROF_MARK
void
ircd::ctx::prof::mark(const event &e)
{
@ -1667,12 +1661,6 @@ ircd::ctx::prof::mark(const event &e)
default: break;
}
}
#else
void
ircd::ctx::prof::mark(const event &)
{
}
#endif
void
ircd::ctx::prof::inc_ticker(const event &e)

View file

@ -16,6 +16,11 @@ namespace ircd::ctx
void spawn(ctx *const c, context::function func);
}
namespace ircd::ctx::prof
{
void mark(const event &);
}
/// Internal structure aggregating any stack related state for the ctx
struct ircd::ctx::stack
{