From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 1/3] log: Don't define logging function 4 times
Date: Tue, 7 Nov 2023 09:02:28 +0100 [thread overview]
Message-ID: <20231107090228.718fd128@elisabeth> (raw)
In-Reply-To: <20231013045030.85235-2-david@gibson.dropbear.id.au>
On Fri, 13 Oct 2023 15:50:28 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:
> In log.c we use a macro to define logging functions for each of 4 priority
> levels. The only difference between these is the priority we pass to
> vsyslog() and similar functions. Because it's done as a macro, however,
> the entire functions code is included in the binary 4 times.
If you've been wondering about the reason for this madness, by the way:
this comes from (much) earlier versions where we had separate debug
builds to avoid the cost of formatting debug messages (and in some
cases fetch further information) in the regular build.
It didn't actually make a measurable difference, though, and it doesn't
anyway make sense any longer.
--
Stefano
next prev parent reply other threads:[~2023-11-07 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 4:50 [PATCH v2 0/3] Some improvements to log functions David Gibson
2023-10-13 4:50 ` [PATCH v2 1/3] log: Don't define logging function 4 times David Gibson
2023-11-07 8:02 ` Stefano Brivio [this message]
2023-10-13 4:50 ` [PATCH v2 2/3] log: Enable format warnings David Gibson
2023-10-13 4:50 ` [PATCH v2 3/3] log: Add vlogmsg() David Gibson
2023-11-07 12:45 ` [PATCH v2 0/3] Some improvements to log functions Stefano Brivio
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=20231107090228.718fd128@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).