From: Serge Petrenko <sergepetrenko@tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org>, Alexander Turenko <alexander.turenko@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 11:28:26 +0300 [thread overview] Message-ID: <f5ee8dd7-2da8-4a55-721c-7c9a1ed387be@tarantool.org> (raw) In-Reply-To: <20201006185942.19266-1-skaplun@tarantool.org> 06.10.2020 21:59, Sergey Kaplun пишет: > 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 */ Hi! Thanks for the patch! LGTM. > > lua_pushliteral(L, "memory"); > lua_newtable(L); -- Serge Petrenko
next prev parent reply other threads:[~2020-10-07 8:28 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 [this message] 2020-10-07 9:08 ` Alexander Turenko 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=f5ee8dd7-2da8-4a55-721c-7c9a1ed387be@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=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