From nobody Mon Feb 9 02:09:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611573114; cv=none; d=zohomail.com; s=zohoarc; b=V4QZpF12sXuhcbw9BWAyBCjkPPPPoWp44EQ1gRZWRxfAvtMtkX1ZE0kz2xo1oqpd80k757tmQ2/nTRdE+1T0GA+FBEjHi+vFVPSyLqm7jsO+cdvlcP5HCYFCJcyBCcx3DHgxLGTav5IVyNrNl8zMAHAAuPc5arVW7ocmtfZqRG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611573114; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=V8Zc1JZM731ctc953UzVyJGmZ0k77xxUblhTXrU3ZKE=; b=OzFp0SRejltONoxy5Gz1+WeTU6hj+SwNk1gQY+duCgp2PJrMeTo7yLPNgtXvXneOLtoN7z1acaE1SLtm2EUOtxhbBtMjllJGFj0svpi62klkAdIVVDvUL/YIY9zAQqFxeVb3YSw2dxKzRQJJnCWOGd3t6M4nGA7P6CyvTsvEa8E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611573114944987.599047104271; Mon, 25 Jan 2021 03:11:54 -0800 (PST) Received: from localhost ([::1]:55406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3zmj-0004AX-7f for importer@patchew.org; Mon, 25 Jan 2021 06:11:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3zll-0003hD-Lh for qemu-devel@nongnu.org; Mon, 25 Jan 2021 06:10:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l3zlg-0007x4-Tg for qemu-devel@nongnu.org; Mon, 25 Jan 2021 06:10:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-19nrAxMnOHqrISOdUrycKw-1; Mon, 25 Jan 2021 06:10:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE6058B94D7; Mon, 25 Jan 2021 11:10:26 +0000 (UTC) Received: from localhost (ovpn-115-94.ams2.redhat.com [10.36.115.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 889B171C9E; Mon, 25 Jan 2021 11:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611573044; 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; bh=V8Zc1JZM731ctc953UzVyJGmZ0k77xxUblhTXrU3ZKE=; b=LREf3XAivDUO8lrOLWnSqu4zKL7jVzxdvnPx0uN2ZQOlAM1VuxYX81QirtBlKG3HJDltFh oCJqaDegDaa6n/qkJ1+S1fm0PS+HU1HjEXT2f1MLSn/4Gi2EfIhSBs1zq5SlyOU5uFWW7b wtK77kTEHe8xOH9eZyUpxV0PZsTRCIY= X-MC-Unique: 19nrAxMnOHqrISOdUrycKw-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PATCH] trace: add meson custom_target() depend_files for tracetool Date: Mon, 25 Jan 2021 11:09:58 +0000 Message-Id: <20210125110958.214017-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Re-generate tracetool output when the tracetool source code changes. Use the same approach as qapi_gen_depends and introduce a tracetool_depends files list so meson is aware of the dependencies. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 28 +++++++++++++++++++++++++++- trace/meson.build | 21 ++++++++++++++------- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 35a9eddf5c..3909d6b4c1 100644 --- a/meson.build +++ b/meson.build @@ -1626,6 +1626,31 @@ tracetool =3D [ python, files('scripts/tracetool.py'), '--backend=3D' + config_host['TRACE_BACKENDS'] ] +tracetool_depends =3D files( + 'scripts/tracetool/backend/log.py', + 'scripts/tracetool/backend/__init__.py', + 'scripts/tracetool/backend/dtrace.py', + 'scripts/tracetool/backend/ftrace.py', + 'scripts/tracetool/backend/simple.py', + 'scripts/tracetool/backend/syslog.py', + 'scripts/tracetool/backend/ust.py', + 'scripts/tracetool/format/tcg_h.py', + 'scripts/tracetool/format/ust_events_c.py', + 'scripts/tracetool/format/ust_events_h.py', + 'scripts/tracetool/format/__init__.py', + 'scripts/tracetool/format/d.py', + 'scripts/tracetool/format/tcg_helper_c.py', + 'scripts/tracetool/format/simpletrace_stap.py', + 'scripts/tracetool/format/c.py', + 'scripts/tracetool/format/h.py', + 'scripts/tracetool/format/tcg_helper_h.py', + 'scripts/tracetool/format/log_stap.py', + 'scripts/tracetool/format/stap.py', + 'scripts/tracetool/format/tcg_helper_wrapper_h.py', + 'scripts/tracetool/__init__.py', + 'scripts/tracetool/transform.py', + 'scripts/tracetool/vcpu.py' +) =20 qemu_version_cmd =3D [find_program('scripts/qemu-version.sh'), meson.current_source_dir(), @@ -2192,7 +2217,8 @@ foreach target : target_dirs '--target-type=3D' + target_type, '--probe-prefix=3Dqemu.' + target_type + '.' + tar= get_name, '@INPUT@', '@OUTPUT@' - ]) + ], + depend_files: tracetool_depends) endforeach endif endforeach diff --git a/trace/meson.build b/trace/meson.build index a0be8f9b0d..08f83a15c3 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -12,17 +12,20 @@ foreach dir : [ '.' ] + trace_events_subdirs trace_h =3D custom_target(fmt.format('trace', 'h'), output: fmt.format('trace', 'h'), input: trace_events_file, - command: [ tracetool, group, '--format=3Dh', '@I= NPUT@', '@OUTPUT@' ]) + command: [ tracetool, group, '--format=3Dh', '@I= NPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) genh +=3D trace_h trace_c =3D custom_target(fmt.format('trace', 'c'), output: fmt.format('trace', 'c'), input: trace_events_file, - command: [ tracetool, group, '--format=3Dc', '@I= NPUT@', '@OUTPUT@' ]) + command: [ tracetool, group, '--format=3Dc', '@I= NPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) if 'CONFIG_TRACE_UST' in config_host trace_ust_h =3D custom_target(fmt.format('trace-ust', 'h'), output: fmt.format('trace-ust', 'h'), input: trace_events_file, - command: [ tracetool, group, '--format=3Du= st-events-h', '@INPUT@', '@OUTPUT@' ]) + command: [ tracetool, group, '--format=3Du= st-events-h', '@INPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) trace_ss.add(trace_ust_h, lttng, urcubp) genh +=3D trace_ust_h endif @@ -31,7 +34,8 @@ foreach dir : [ '.' ] + trace_events_subdirs trace_dtrace =3D custom_target(fmt.format('trace-dtrace', 'dtrace'), output: fmt.format('trace-dtrace', 'dtrac= e'), input: trace_events_file, - command: [ tracetool, group, '--format=3D= d', '@INPUT@', '@OUTPUT@' ]) + command: [ tracetool, group, '--format=3D= d', '@INPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) trace_dtrace_h =3D custom_target(fmt.format('trace-dtrace', 'h'), output: fmt.format('trace-dtrace', 'h'), input: trace_dtrace, @@ -66,7 +70,8 @@ foreach d : [ gen =3D custom_target(d[0], output: d[0], input: meson.source_root() / 'trace-events', - command: [ tracetool, '--group=3Droot', '--format=3D@0@'.f= ormat(d[1]), '@INPUT@', '@OUTPUT@' ]) + command: [ tracetool, '--group=3Droot', '--format=3D@0@'.f= ormat(d[1]), '@INPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) specific_ss.add(when: 'CONFIG_TCG', if_true: gen) endforeach =20 @@ -74,11 +79,13 @@ if 'CONFIG_TRACE_UST' in config_host trace_ust_all_h =3D custom_target('trace-ust-all.h', output: 'trace-ust-all.h', input: trace_events_files, - command: [ tracetool, '--group=3Dall', '= --format=3Dust-events-h', '@INPUT@', '@OUTPUT@' ]) + command: [ tracetool, '--group=3Dall', '= --format=3Dust-events-h', '@INPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) trace_ust_all_c =3D custom_target('trace-ust-all.c', output: 'trace-ust-all.c', input: trace_events_files, - command: [ tracetool, '--group=3Dall', '= --format=3Dust-events-c', '@INPUT@', '@OUTPUT@' ]) + command: [ tracetool, '--group=3Dall', '= --format=3Dust-events-c', '@INPUT@', '@OUTPUT@' ], + depend_files: tracetool_depends) trace_ss.add(trace_ust_all_h, trace_ust_all_c) genh +=3D trace_ust_all_h endif --=20 2.29.2