From patchwork Thu Sep 12 16:49:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 21247 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A4ADFC324C for ; Thu, 12 Sep 2024 16:49:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 32417634FC; Thu, 12 Sep 2024 18:49:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uPJDsiEg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 19164634F2 for ; Thu, 12 Sep 2024 18:49:34 +0200 (CEST) Received: from pyrite.hamster-moth.ts.net (213-229-8-243.static.upcbusiness.at [213.229.8.243]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5F3EDB0B; Thu, 12 Sep 2024 18:48:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1726159695; bh=L7SmvcjIGyGvgCTyUSJ0qm1hWdfjJMQK3I9S4or14XI=; h=From:To:Cc:Subject:Date:From; b=uPJDsiEgkOGQUg0e8ORDWBuSE66len7VEylHMNsQ/wy9XP6FkBKUZKnDYe9KLeGzl HSSHG3O2WjCpi+H9uzTRUH4inAHh4w38IW7NXl53I1cuLuWNQIynhxYgrTCs6j2xZD yMX1H9nNXXY/kE4BYkdM1ZQQWrICZbJ0/rXuHFs0= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH] meson: Add -finstrument-functions to debug builds Date: Thu, 12 Sep 2024 18:49:09 +0200 Message-Id: <20240912164909.2083093-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add -finstrument-functions to debug (and debugoptimized) build types. This will mainly be used for tracing functions with lttng by LD_PRELOADing liblttng-ust-cyg-profile.so (or liblttng-ust-cyg-profile-fast.so). Signed-off-by: Paul Elder --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 432ae1337..e8014e77f 100644 --- a/meson.build +++ b/meson.build @@ -109,6 +109,12 @@ common_arguments = [ '-include', meson.current_build_dir() / 'config.h', ] +if get_option('buildtype').startswith('debug') + common_arguments += [ + '-finstrument-functions', + ] +endif + c_arguments = [] cpp_arguments = []