From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@freelists.org, kostja@tarantool.org
Subject: Re: [tarantool-patches] [PATCH 3/3] sio: optimize sio_strfaddr() for the most common case
Date: Tue, 14 May 2019 11:09:32 +0300 [thread overview]
Message-ID: <20190514080932.czhcqcl6t6dy6sv3@esperanza> (raw)
In-Reply-To: <01f8b95e78623d7f56cded96324184b8d96cec13.1556470563.git.v.shpilevoy@tarantool.org>
On Sun, Apr 28, 2019 at 07:56:27PM +0300, Vladislav Shpilevoy wrote:
> The main motivation behind this commit is that SWIM makes active
> use of sio_strfaddr() for logging - for each received/sent
> message it writes a couple of addresses into a log. It does it in
> verbose mode, but the say() function arguments are still
> calculated even when the active mode is lower than verbose.
They are not as say() is a macro.
At compile time
say(level, error, format, ...)
is expanded into
if (say_log_level_is_enabled(level))
_say(level, file, line, error, format, ...);
That is, neither format nor its arguments are evaluated at runtime
unless say_log_level_is_enabled(level) returns true.
next prev parent reply other threads:[~2019-05-14 8:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 16:56 [tarantool-patches] [PATCH 0/3] introduce static allocator Vladislav Shpilevoy
2019-04-28 16:56 ` [tarantool-patches] [PATCH 1/3] small: introduce small/static Vladislav Shpilevoy
2019-04-28 16:56 ` [tarantool-patches] [PATCH 2/3] Use static_alloc() instead of 'static char[]' where possible Vladislav Shpilevoy
2019-04-28 16:56 ` [tarantool-patches] [PATCH 3/3] sio: optimize sio_strfaddr() for the most common case Vladislav Shpilevoy
2019-05-14 8:09 ` Vladimir Davydov [this message]
2019-04-29 4:14 ` [tarantool-patches] Re: [PATCH 0/3] introduce static allocator Konstantin Osipov
2019-04-29 8:35 ` Vladislav Shpilevoy
2019-05-13 22:57 ` Vladislav Shpilevoy
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=20190514080932.czhcqcl6t6dy6sv3@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [tarantool-patches] [PATCH 3/3] sio: optimize sio_strfaddr() for the most common case' \
/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