From ea039f29b5911d58496c88792a8548c684275f52 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 2 Aug 2020 06:20:22 -0700 Subject: [PATCH] ircd::ctx: Inline prof::mark() into callsites; remove static w/ indirect jump. --- ircd/ctx.cc | 11 ++--------- ircd/ctx.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ircd/ctx.cc b/ircd/ctx.cc index a92e55852..3d083d571 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -1603,8 +1603,8 @@ ircd::ctx::prof::settings::slice_assertion { "persist", false }, }; -[[gnu::hot]] -void +[[using gnu: flatten, always_inline]] +inline void ircd::ctx::prof::mark(const event &e) { inc_ticker(e); @@ -1619,7 +1619,6 @@ ircd::ctx::prof::mark(const event &e) } } -[[gnu::hot]] void ircd::ctx::prof::inc_ticker(const event &e) noexcept @@ -1634,14 +1633,12 @@ noexcept current->profile.event[uint8_t(e)]++; } -[[gnu::hot]] void ircd::ctx::prof::handle_cur_enter() { slice_enter(); } -[[gnu::hot]] void ircd::ctx::prof::handle_cur_leave() { @@ -1649,7 +1646,6 @@ ircd::ctx::prof::handle_cur_leave() check_slice(); } -[[gnu::hot]] void ircd::ctx::prof::handle_cur_yield() { @@ -1658,14 +1654,12 @@ ircd::ctx::prof::handle_cur_yield() check_stack(); } -[[gnu::hot]] void ircd::ctx::prof::handle_cur_continue() { slice_enter(); } -[[gnu::hot]] void ircd::ctx::prof::slice_enter() noexcept @@ -1676,7 +1670,6 @@ noexcept assert(_slice_start >= _slice_stop); } -[[gnu::hot]] void ircd::ctx::prof::slice_leave() noexcept diff --git a/ircd/ctx.h b/ircd/ctx.h index 066f11d31..0733662a1 100644 --- a/ircd/ctx.h +++ b/ircd/ctx.h @@ -20,7 +20,7 @@ namespace ircd::ctx::prof { - void mark(const event &); + static void mark(const event &); } /// Internal context implementation