From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] fiber: fix build for disabled fiber top
Date: Wed, 7 Oct 2020 12:08:19 +0300 [thread overview]
Message-ID: <20201007090819.m4acymnkejonfcdq@tkn_work_nb> (raw)
In-Reply-To: <20201006185942.19266-1-skaplun@tarantool.org>
LGTM.
WBR, Alexander Turenko.
On Tue, Oct 06, 2020 at 09:59:42PM +0300, Sergey Kaplun wrote:
> In case when we build without `ENABLE_FIBER_TOP` neither
> `struct fiber` contains `clock_stat` field nor `FIBER_TIME_RES`
> constant is defined.
> This patch adds corresponding ifdef directive to avoid compilation
> errors.
> ---
>
> Branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-lua-fiber-fix-build-for-disabled-fiber-top
>
> src/lua/fiber.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/lua/fiber.c b/src/lua/fiber.c
> index efb0a4921..edbd06ebc 100644
> --- a/src/lua/fiber.c
> +++ b/src/lua/fiber.c
> @@ -282,9 +282,11 @@ lbox_fiber_statof(struct fiber *f, void *cb_ctx, bool backtrace)
> lua_pushnumber(L, f->csw);
> lua_settable(L, -3);
>
> +#if ENABLE_FIBER_TOP
> lua_pushliteral(L, "time");
> lua_pushnumber(L, f->clock_stat.cputime / (double) FIBER_TIME_RES);
> lua_settable(L, -3);
> +#endif /* ENABLE_FIBER_TOP */
>
> lua_pushliteral(L, "memory");
> lua_newtable(L);
> --
> 2.28.0
>
next prev parent reply other threads:[~2020-10-07 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 18:59 Sergey Kaplun
2020-10-07 8:28 ` Serge Petrenko
2020-10-07 9:08 ` Alexander Turenko [this message]
2020-10-07 13:33 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201007090819.m4acymnkejonfcdq@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=skaplun@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] fiber: fix build for disabled fiber top' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox