From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 94C685A026D for ; Tue, 7 Nov 2023 09:02:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699344162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6EFBTuWojVoc7+hiqvVFy12KFfkfwLbxsZxYIqYvkR4=; b=HEKMaxhb7T5ezr3f+LKnX8q4iOED6+8xtNrUHoGRrUSzUTvINtLspdTqE8X37u5Be01rbk U4oVVEj0S2ViRbyxNrHqRUQ9+7vYteitMT7YRc+QEgLIpUq7h4G3+MNVU98UgPagf4sZhM nRFuXXg43tmMg2uMD95GQje1sU8h9hs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-630-lhrNpzA-NuaE--3wjrOQcw-1; Tue, 07 Nov 2023 03:02:39 -0500 X-MC-Unique: lhrNpzA-NuaE--3wjrOQcw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B24983C14924; Tue, 7 Nov 2023 08:02:38 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7A0D2026D66; Tue, 7 Nov 2023 08:02:37 +0000 (UTC) Date: Tue, 7 Nov 2023 09:02:28 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 1/3] log: Don't define logging function 4 times Message-ID: <20231107090228.718fd128@elisabeth> In-Reply-To: <20231013045030.85235-2-david@gibson.dropbear.id.au> References: <20231013045030.85235-1-david@gibson.dropbear.id.au> <20231013045030.85235-2-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: U4PRIGNNJEBCOXRXVCPR4GLJ7EK6XDT3 X-Message-ID-Hash: U4PRIGNNJEBCOXRXVCPR4GLJ7EK6XDT3 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 13 Oct 2023 15:50:28 +1100 David Gibson 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