From nobody Tue Nov 18 15:24:39 2025 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=1611233526; cv=none; d=zohomail.com; s=zohoarc; b=P979uclkYp3FyBQMr/ikMoxiUvX4DyyNOc7wxQQsQkZBp9eE1g7H0Epbh6yVN+1CWIAuym168rHbLNPYz4p96+6BJdOGHTyyqB7yw5iH8Pk+NmoCKpQ+3jDmhxNHSQw+4N74/oOG5mdkmlW+cgPod7z0o4mgcd7ihFB7vw+J2xo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233526; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7lc8BnwFQ/6CwvlweZPvkXTyV5sQvoKgEv2SCOfHzXE=; b=Xvb2hQYBSe13T3ibaI3XUJSrORO9iRyc7buGshpxcbf63NpREQykNvisl2fImJVWvqqZW3ZGjOqcfrIR0XWEFeWjIOBwtj9MypNkPFH587lsDxX8LA4mIfoc5MP74kLPfnPRoMeATvgCBKNvtm/hrBHS9ojneZom8IHZhsWiafo= 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 1611233526862791.6914920436939; Thu, 21 Jan 2021 04:52:06 -0800 (PST) Received: from localhost ([::1]:44518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZRV-0006pN-P6 for importer@patchew.org; Thu, 21 Jan 2021 07:52:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQI-0005T8-H6 for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQA-0003Qa-Q3 for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:49 -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-250-y6aDet9zOP-ekizSYgpxmg-1; Thu, 21 Jan 2021 07:50:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9A3B21005D50 for ; Thu, 21 Jan 2021 12:50:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 571C15D749; Thu, 21 Jan 2021 12:50:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CDC27180039D; Thu, 21 Jan 2021 13:50:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233440; 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=7lc8BnwFQ/6CwvlweZPvkXTyV5sQvoKgEv2SCOfHzXE=; b=VJcTfxuli/Sf0AxT8Bn1n7VjPl2cnOzWmrQvKSc/hCR41TBUQ8zAPZIIDIK8+BQatkh2NK 5C8CEW9A+eOL//x4iAaDjRn13wnEuEryXXBTDecxU5/hkMTzTtfBoCzWURXku73H1XD9Ko Zc3skfTz+VTdzdHwNjKyYvfx8hYjk98= X-MC-Unique: y6aDet9zOP-ekizSYgpxmg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 1/8] meson: add trace_events_config[] Date: Thu, 21 Jan 2021 13:50:21 +0100 Message-Id: <20210121125028.3247190-2-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" It's an array of dicts, where each dict holds the configuration for one trace-events file. For now just fill it from trace_events_subdirs. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- meson.build | 1 + trace/meson.build | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index af2bc8974111..1f3d48b53a06 100644 --- a/meson.build +++ b/meson.build @@ -1677,6 +1677,7 @@ target_softmmu_arch =3D {} =20 # TODO: add each directory to the subdirs from its own meson.build, once # we have those +trace_events_config =3D [] trace_events_subdirs =3D [ 'accel/kvm', 'accel/tcg', diff --git a/trace/meson.build b/trace/meson.build index a0be8f9b0db9..3a2b39dd6291 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,12 +2,23 @@ specific_ss.add(files('control-target.c')) =20 trace_events_files =3D [] -foreach dir : [ '.' ] + trace_events_subdirs - trace_events_file =3D meson.source_root() / dir / 'trace-events' + +trace_events_config +=3D { + 'file' : meson.source_root() / 'trace-events', + 'group' : 'root', +} +foreach dir : trace_events_subdirs + trace_events_config +=3D { + 'file' : meson.source_root() / dir / 'trace-events', + 'group' : dir.underscorify(), + } +endforeach + +foreach c : trace_events_config + trace_events_file =3D c.get('file') trace_events_files +=3D [ trace_events_file ] - group_name =3D dir =3D=3D '.' ? 'root' : dir.underscorify() - group =3D '--group=3D' + group_name - fmt =3D '@0@-' + group_name + '.@1@' + group =3D '--group=3D' + c.get('group') + fmt =3D '@0@-' + c.get('group') + '.@1@' =20 trace_h =3D custom_target(fmt.format('trace', 'h'), output: fmt.format('trace', 'h'), --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233846; cv=none; d=zohomail.com; s=zohoarc; b=K5DxdKYNLpdOXfjUKupJSsqdDQcTA4+hp6c5yaAyZMDQB40Gj8PPucUX5hPJ7ekIQF7osIi3ccF14KEKgwdPpGxMAdgHVX9vyP6CDg8XnFXP/gtfR86Kq8nlJnl5xutewrV1l/DOl8WAcojVJgMj+CyjbYShO9YHjqgqUi/g3FQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VsKdlBVawZeBN4Si7KUfMK734ZvcDTkU+t32RrdklQI=; b=TfaA12foNwHv8hxgchgiA98bBlWAcC5yxIwsAEJuidJ5kXLKXSr2tRb7tACvAxkzdw37u/YiAs5Aiwmo79vlvh9ejPPziYzJteGSEbHMCUVaIPCbsp0s2TuQyD8uCTWIO+8BJXbiX/nResCfILenCBkdUQXddMlulnHzRCuu65Y= 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 1611233846554702.8514969795959; Thu, 21 Jan 2021 04:57:26 -0800 (PST) Received: from localhost ([::1]:57100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZWf-0003uH-Dt for importer@patchew.org; Thu, 21 Jan 2021 07:57:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQK-0005WX-Up for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQB-0003Qk-3a for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50: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-1--zs5NjykN7urc-omKqx63Q-1; Thu, 21 Jan 2021 07:50:37 -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 AF8D2800D55 for ; Thu, 21 Jan 2021 12:50:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 582E92CFD8; Thu, 21 Jan 2021 12:50:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D7F43180039E; Thu, 21 Jan 2021 13:50:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233440; 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=VsKdlBVawZeBN4Si7KUfMK734ZvcDTkU+t32RrdklQI=; b=Nj/jL6Du9ydPLHT3bvaaIqEs2tOzY1luEdBeu9pGOZtgkjZoL4joiWF3urbGsWGDLiVI36 uA+DX50nejqS2y4wepIp9dygz3dioVT76aptAb2NZKKfE6ElRyCGevCFnszJcgyO3z0mB9 c+EOeiYt1hi57fnWDyJRGBsakPqY/Fk= X-MC-Unique: -zs5NjykN7urc-omKqx63Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 2/8] meson: move up hw subdir (specifically before trace subdir) Date: Thu, 21 Jan 2021 13:50:22 +0100 Message-Id: <20210121125028.3247190-3-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@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=kraxel@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=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" Needed so trace/meson.build can see stuff done in hw/*/meson.build. Signed-off-by: Gerd Hoffmann --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1f3d48b53a06..7462a50b4c36 100644 --- a/meson.build +++ b/meson.build @@ -1777,6 +1777,8 @@ if 'CONFIG_VHOST_USER' in config_host vhost_user =3D libvhost_user.get_variable('vhost_user_dep') endif =20 +subdir('hw') + subdir('qapi') subdir('qobject') subdir('stubs') @@ -1863,7 +1865,6 @@ subdir('migration') subdir('monitor') subdir('net') subdir('replay') -subdir('hw') subdir('accel') subdir('plugins') subdir('bsd-user') --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233719; cv=none; d=zohomail.com; s=zohoarc; b=DkfcaJJB9VD6rP/u+8Smxlgyg9Zi26lk9RExcmgUTus1WgHCEmSwDmfe6wuDJqOvjO/+LX/A9h2yNGdJpUI/XISn6Kvgmvj/DHNszq8u7Ii3Cvi0dgnzGsBgTDmRiVaQ7GU9MMMAGkkrg4NFSetY60CA1VEOvGyatOwJ8aerYsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233719; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5w+EbpxTtIo2va5BC74piYddpK5j2FGaK9bouiZ6lPg=; b=LeDQ0Rbb6xlutG2dbFZ8OgYksaZxRw/CpVG//LIqbajLfpQcQn6kZK86SeoklvUa0pFML1HTj7JsGEo+WUC9wq/a554M82N6/dSFSa0/Y/sVB9WmyUUulUS3e5/5PbQW2d641LN7LrBwdFooQ1G7CXSsk+vBXF0zu9spU4JmaMw= 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 1611233719354620.5826983072413; Thu, 21 Jan 2021 04:55:19 -0800 (PST) Received: from localhost ([::1]:52632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZUc-0001rX-Ai for importer@patchew.org; Thu, 21 Jan 2021 07:55:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQJ-0005Tx-DB for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQA-0003Qn-Ru for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -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-8-t2ZhqHRRP9mL1is-Z0wrnw-1; Thu, 21 Jan 2021 07:50:37 -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 ADAF31572E for ; Thu, 21 Jan 2021 12:50:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85E735C8A7; Thu, 21 Jan 2021 12:50:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E439F18003AD; Thu, 21 Jan 2021 13:50:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233440; 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=5w+EbpxTtIo2va5BC74piYddpK5j2FGaK9bouiZ6lPg=; b=PHue0WRI1a6ZfXRZ65pk6VQU844pz3HNq2Qguf6LSJc5IFzB//rgFMWVPgKZhXeGy+gdCi ChfMmHSVj2H9+Ix2EQx0vjAgdwFywKnWln3IW7MEjDT7ocoDX5MHVa0qecIOKQ3sCiPGZ2 AIcUPKTZxl3rP9C/zB2cop2RX1jO0Co= X-MC-Unique: t2ZhqHRRP9mL1is-Z0wrnw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 3/8] meson: add module_trace & module_trace_src Date: Thu, 21 Jan 2021 13:50:23 +0100 Message-Id: <20210121125028.3247190-4-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@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=kraxel@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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" module_trace is a dict which keeps track of the trace source files for a module. module_trace_src collects the trace source files for a given trace-events f= ile, which then either added to the source set or to a new module_trace dict depending on whenever they are for a module or core qemu. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- meson.build | 3 ++- trace/meson.build | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 7462a50b4c36..a073fcd301c5 100644 --- a/meson.build +++ b/meson.build @@ -1890,7 +1890,8 @@ foreach d, list : modules foreach m, module_ss : list if enable_modules and targetos !=3D 'windows' module_ss =3D module_ss.apply(config_all, strict: false) - sl =3D static_library(d + '-' + m, [genh, module_ss.sources()], + module_trace_src =3D module_trace.get(d + '-' + m, []) + sl =3D static_library(d + '-' + m, [genh, module_ss.sources(), modul= e_trace_src], dependencies: [modulecommon, module_ss.dependenc= ies()], pic: true) if d =3D=3D 'block' block_mods +=3D sl diff --git a/trace/meson.build b/trace/meson.build index 3a2b39dd6291..843b472ba943 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,6 +2,7 @@ specific_ss.add(files('control-target.c')) =20 trace_events_files =3D [] +module_trace =3D {} =20 trace_events_config +=3D { 'file' : meson.source_root() / 'trace-events', @@ -19,6 +20,8 @@ foreach c : trace_events_config trace_events_files +=3D [ trace_events_file ] group =3D '--group=3D' + c.get('group') fmt =3D '@0@-' + c.get('group') + '.@1@' + mod =3D c.get('module', '') + module_trace_src =3D [] =20 trace_h =3D custom_target(fmt.format('trace', 'h'), output: fmt.format('trace', 'h'), @@ -34,10 +37,10 @@ foreach c : trace_events_config output: fmt.format('trace-ust', 'h'), input: trace_events_file, command: [ tracetool, group, '--format=3Du= st-events-h', '@INPUT@', '@OUTPUT@' ]) - trace_ss.add(trace_ust_h, lttng, urcubp) + module_trace_src +=3D [ trace_ust_h, lttng, urcubp ] genh +=3D trace_ust_h endif - trace_ss.add(trace_h, trace_c) + module_trace_src +=3D [ trace_h, trace_c ] if 'CONFIG_TRACE_DTRACE' in config_host trace_dtrace =3D custom_target(fmt.format('trace-dtrace', 'dtrace'), output: fmt.format('trace-dtrace', 'dtrac= e'), @@ -47,17 +50,22 @@ foreach c : trace_events_config output: fmt.format('trace-dtrace', 'h'), input: trace_dtrace, command: [ 'dtrace', '-DSTAP_SDT_V2', '= -o', '@OUTPUT@', '-h', '-s', '@INPUT@' ]) - trace_ss.add(trace_dtrace_h) + module_trace_src +=3D trace_dtrace_h if host_machine.system() !=3D 'darwin' trace_dtrace_o =3D custom_target(fmt.format('trace-dtrace', 'o'), output: fmt.format('trace-dtrace', 'o= '), input: trace_dtrace, command: [ 'dtrace', '-DSTAP_SDT_V2',= '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ]) - trace_ss.add(trace_dtrace_o) + module_trace_src +=3D trace_dtrace_o endif =20 genh +=3D trace_dtrace_h endif + if enable_modules and mod !=3D '' + module_trace +=3D { mod : module_trace_src } + else + trace_ss.add(module_trace_src) + endif endforeach =20 trace_events_all =3D custom_target('trace-events-all', --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233676; cv=none; d=zohomail.com; s=zohoarc; b=dnjJpCb3ztxLSoJEpE0igKIvP6j7woPmv6LwqsF/eOnqYCDw8LOt17QQuG8mpfvgXjqQ0M5NKoXWOsjSXqom/VeciW2PG2Cgh5rOVCdYjV2IjZNMxzHKz6wsMkVyyDHg5rtzurkd3DZdVT0RdpcZVZ920Ij4MKha+rfjbxXV0kM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233676; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Inobnw1VI42gXd3ckg3L8v3ZVNxE/8jp3FOiKfNcRr0=; b=Uw6SvZSTZJIPghxYvQxKwV9ZZ5R4Dba1vqE9NhNjPgj/xMmYr4KVNDXxr1TzxVplrrdTewCIHWtfPnWyFm+/QabxaqydOImDuYKJCTGf79T8dcb/tQJFjVRRzCsGjoXAuJQSyfFYm8UdNGgOranDHPKpWzo0BQvuVc0QL4tpDVQ= 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 1611233676540900.0034128254055; Thu, 21 Jan 2021 04:54:36 -0800 (PST) Received: from localhost ([::1]:50784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZTv-00014C-Bu for importer@patchew.org; Thu, 21 Jan 2021 07:54:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQJ-0005UV-Nn for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:33049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQA-0003QQ-Rh for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -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-42-Ikfi6jVOMRmrcpKJP_C-RQ-1; Thu, 21 Jan 2021 07:50:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EDEAE8030A1 for ; Thu, 21 Jan 2021 12:50:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 702C877BE2; Thu, 21 Jan 2021 12:50:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 023D918003AE; Thu, 21 Jan 2021 13:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233439; 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=Inobnw1VI42gXd3ckg3L8v3ZVNxE/8jp3FOiKfNcRr0=; b=BA7Fk3LTqVF/Ni3v5HimMflBwgjZCbSBqolT1DNoF4U17MnKNd4Mj1S01mzrc18Rb0fHgf tn1CD4ibsntcjRf2xY4FXRnKTbttKMoVionnjJWY9pGSg3xdpdl/fp7qHmCzTIZH2bpyIE d56YE4/NrlVSTH8gLYKp0zgzzjMZsWY= X-MC-Unique: Ikfi6jVOMRmrcpKJP_C-RQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 4/8] meson: move qxl trace events to separate file Date: Thu, 21 Jan 2021 13:50:24 +0100 Message-Id: <20210121125028.3247190-5-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" Move qxl trace events to separate trace-events-qxl file. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- hw/display/qxl-render.c | 1 + hw/display/qxl.c | 1 + hw/display/meson.build | 5 +++ hw/display/trace-events | 67 ------------------------------------- hw/display/trace-events-qxl | 66 ++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 67 deletions(-) create mode 100644 hw/display/trace-events-qxl diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 3ce2e57b8feb..cc4862e26eb6 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -23,6 +23,7 @@ #include "qxl.h" #include "sysemu/runstate.h" #include "trace.h" +#include "trace/trace-hw_display_qxl.h" =20 static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect) { diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 431c1070967a..4e8d1bb8d77b 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -33,6 +33,7 @@ #include "migration/blocker.h" #include "migration/vmstate.h" #include "trace.h" +#include "trace/trace-hw_display_qxl.h" =20 #include "qxl.h" =20 diff --git a/hw/display/meson.build b/hw/display/meson.build index 9d79e3951d9e..945c05ddbe42 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -42,6 +42,11 @@ if config_all_devices.has_key('CONFIG_QXL') qxl_ss =3D ss.source_set() qxl_ss.add(when: 'CONFIG_QXL', if_true: [files('qxl.c', 'qxl-logger.c', = 'qxl-render.c'), pixman, spice]) + trace_events_config +=3D { + 'file' : meson.source_root() / 'hw' / 'display' / 'trace-events-qxl', + 'group' : 'hw_display_qxl', + 'module' : 'hw-display-qxl', + } hw_display_modules +=3D {'qxl': qxl_ss} endif =20 diff --git a/hw/display/trace-events b/hw/display/trace-events index 957b8ba99436..48636149e4b2 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -58,73 +58,6 @@ virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, u= int32_t y, const char *t virtio_gpu_fence_ctrl(uint64_t fence, uint32_t type) "fence 0x%" PRIx64 ",= type 0x%x" virtio_gpu_fence_resp(uint64_t fence) "fence 0x%" PRIx64 =20 -# qxl.c -disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d" -disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_= t val) "%d %s addr=3D%u val=3D%u" -qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_= t mem, uint32_t format, uint32_t position) "%d %ux%u mem=3D0x%" PRIx64 " %u= ,%u" -qxl_create_guest_primary_rest(int qid, int32_t stride, uint32_t type, uint= 32_t flags) "%d %d,%d,%d" -qxl_destroy_primary(int qid) "%d" -qxl_enter_vga_mode(int qid) "%d" -qxl_exit_vga_mode(int qid) "%d" -qxl_hard_reset(int qid, int64_t loadvm) "%d loadvm=3D%"PRId64 -qxl_interface_async_complete_io(int qid, uint32_t current_async, void *coo= kie) "%d current=3D%d cookie=3D%p" -qxl_interface_attach_worker(int qid) "%d" -qxl_interface_get_init_info(int qid) "%d" -qxl_interface_set_compression_level(int qid, int64_t level) "%d %"PRId64 -qxl_interface_update_area_complete(int qid, uint32_t surface_id, uint32_t = dirty_left, uint32_t dirty_right, uint32_t dirty_top, uint32_t dirty_bottom= ) "%d surface=3D%d [%d,%d,%d,%d]" -qxl_interface_update_area_complete_rest(int qid, uint32_t num_updated_rect= s) "%d #=3D%d" -qxl_interface_update_area_complete_overflow(int qid, int max) "%d max=3D%d" -qxl_interface_update_area_complete_schedule_bh(int qid, uint32_t num_dirty= ) "%d #dirty=3D%d" -qxl_io_destroy_primary_ignored(int qid, const char *mode) "%d %s" -qxl_io_log(int qid, const char *log_buf) "%d %s" -qxl_io_read_unexpected(int qid) "%d" -qxl_io_unexpected_vga_mode(int qid, uint64_t addr, uint64_t val, const cha= r *desc) "%d 0x%"PRIx64"=3D%"PRIu64" (%s)" -qxl_io_write(int qid, const char *mode, uint64_t addr, const char *aname, = uint64_t val, unsigned size, int async) "%d %s addr=3D%"PRIu64 " (%s) val= =3D%"PRIu64" size=3D%u async=3D%d" -qxl_memslot_add_guest(int qid, uint32_t slot_id, uint64_t guest_start, uin= t64_t guest_end) "%d %u: guest phys 0x%"PRIx64 " - 0x%" PRIx64 -qxl_post_load(int qid, const char *mode) "%d %s" -qxl_pre_load(int qid) "%d" -qxl_pre_save(int qid) "%d" -qxl_reset_surfaces(int qid) "%d" -qxl_ring_command_check(int qid, const char *mode) "%d %s" -qxl_ring_command_get(int qid, const char *mode) "%d %s" -qxl_ring_command_req_notification(int qid) "%d" -qxl_ring_cursor_check(int qid, const char *mode) "%d %s" -qxl_ring_cursor_get(int qid, const char *mode) "%d %s" -qxl_ring_cursor_req_notification(int qid) "%d" -qxl_ring_res_push(int qid, const char *mode, uint32_t surface_count, uint3= 2_t free_res, void *last_release, const char *notify) "%d %s s#=3D%d res#= =3D%d last=3D%p notify=3D%s" -qxl_ring_res_push_rest(int qid, uint32_t ring_has, uint32_t ring_size, uin= t32_t prod, uint32_t cons) "%d ring %d/%d [%d,%d]" -qxl_ring_res_put(int qid, uint32_t free_res) "%d #res=3D%d" -qxl_set_mode(int qid, int modenr, uint32_t x_res, uint32_t y_res, uint32_t= bits, uint64_t devmem) "%d mode=3D%d [ x=3D%d y=3D%d @ bpp=3D%d devmem=3D0= x%" PRIx64 " ]" -qxl_soft_reset(int qid) "%d" -qxl_spice_destroy_surfaces_complete(int qid) "%d" -qxl_spice_destroy_surfaces(int qid, int async) "%d async=3D%d" -qxl_spice_destroy_surface_wait_complete(int qid, uint32_t id) "%d sid=3D%d" -qxl_spice_destroy_surface_wait(int qid, uint32_t id, int async) "%d sid=3D= %d async=3D%d" -qxl_spice_flush_surfaces_async(int qid, uint32_t surface_count, uint32_t n= um_free_res) "%d s#=3D%d, res#=3D%d" -qxl_spice_monitors_config(int qid) "%d" -qxl_spice_loadvm_commands(int qid, void *ext, uint32_t count) "%d ext=3D%p= count=3D%d" -qxl_spice_oom(int qid) "%d" -qxl_spice_reset_cursor(int qid) "%d" -qxl_spice_reset_image_cache(int qid) "%d" -qxl_spice_reset_memslots(int qid) "%d" -qxl_spice_update_area(int qid, uint32_t surface_id, uint32_t left, uint32_= t right, uint32_t top, uint32_t bottom) "%d sid=3D%d [%d,%d,%d,%d]" -qxl_spice_update_area_rest(int qid, uint32_t num_dirty_rects, uint32_t cle= ar_dirty_region) "%d #d=3D%d clear=3D%d" -qxl_surfaces_dirty(int qid, uint64_t offset, uint64_t size) "%d offset=3D0= x%"PRIx64" size=3D0x%"PRIx64 -qxl_send_events(int qid, uint32_t events) "%d %d" -qxl_send_events_vm_stopped(int qid, uint32_t events) "%d %d" -qxl_set_guest_bug(int qid) "%d" -qxl_interrupt_client_monitors_config(int qid, int num_heads, void *heads) = "%d %d %p" -qxl_client_monitors_config_unsupported_by_guest(int qid, uint32_t int_mask= , void *client_monitors_config) "%d 0x%X %p" -qxl_client_monitors_config_unsupported_by_device(int qid, int revision) "%= d revision=3D%d" -qxl_client_monitors_config_capped(int qid, int requested, int limit) "%d %= d %d" -qxl_client_monitors_config_crc(int qid, unsigned size, uint32_t crc32) "%d= %u %u" -qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision)= "%d revision=3D%d" - -# qxl-render.c -qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, = int32_t bottom) "stride=3D%d [%d, %d, %d, %d]" -qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t st= ride, int32_t bytes_pp, int32_t bits_pp) "%dx%d, stride %d, bpp %d, depth %= d" -qxl_render_update_area_done(void *cookie) "%p" - # vga.c vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x" vga_std_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x" diff --git a/hw/display/trace-events-qxl b/hw/display/trace-events-qxl new file mode 100644 index 000000000000..1146bd1640d2 --- /dev/null +++ b/hw/display/trace-events-qxl @@ -0,0 +1,66 @@ +# qxl.c +disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d" +disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_= t val) "%d %s addr=3D%u val=3D%u" +qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_= t mem, uint32_t format, uint32_t position) "%d %ux%u mem=3D0x%" PRIx64 " %u= ,%u" +qxl_create_guest_primary_rest(int qid, int32_t stride, uint32_t type, uint= 32_t flags) "%d %d,%d,%d" +qxl_destroy_primary(int qid) "%d" +qxl_enter_vga_mode(int qid) "%d" +qxl_exit_vga_mode(int qid) "%d" +qxl_hard_reset(int qid, int64_t loadvm) "%d loadvm=3D%"PRId64 +qxl_interface_async_complete_io(int qid, uint32_t current_async, void *coo= kie) "%d current=3D%d cookie=3D%p" +qxl_interface_attach_worker(int qid) "%d" +qxl_interface_get_init_info(int qid) "%d" +qxl_interface_set_compression_level(int qid, int64_t level) "%d %"PRId64 +qxl_interface_update_area_complete(int qid, uint32_t surface_id, uint32_t = dirty_left, uint32_t dirty_right, uint32_t dirty_top, uint32_t dirty_bottom= ) "%d surface=3D%d [%d,%d,%d,%d]" +qxl_interface_update_area_complete_rest(int qid, uint32_t num_updated_rect= s) "%d #=3D%d" +qxl_interface_update_area_complete_overflow(int qid, int max) "%d max=3D%d" +qxl_interface_update_area_complete_schedule_bh(int qid, uint32_t num_dirty= ) "%d #dirty=3D%d" +qxl_io_destroy_primary_ignored(int qid, const char *mode) "%d %s" +qxl_io_log(int qid, const char *log_buf) "%d %s" +qxl_io_read_unexpected(int qid) "%d" +qxl_io_unexpected_vga_mode(int qid, uint64_t addr, uint64_t val, const cha= r *desc) "%d 0x%"PRIx64"=3D%"PRIu64" (%s)" +qxl_io_write(int qid, const char *mode, uint64_t addr, const char *aname, = uint64_t val, unsigned size, int async) "%d %s addr=3D%"PRIu64 " (%s) val= =3D%"PRIu64" size=3D%u async=3D%d" +qxl_memslot_add_guest(int qid, uint32_t slot_id, uint64_t guest_start, uin= t64_t guest_end) "%d %u: guest phys 0x%"PRIx64 " - 0x%" PRIx64 +qxl_post_load(int qid, const char *mode) "%d %s" +qxl_pre_load(int qid) "%d" +qxl_pre_save(int qid) "%d" +qxl_reset_surfaces(int qid) "%d" +qxl_ring_command_check(int qid, const char *mode) "%d %s" +qxl_ring_command_get(int qid, const char *mode) "%d %s" +qxl_ring_command_req_notification(int qid) "%d" +qxl_ring_cursor_check(int qid, const char *mode) "%d %s" +qxl_ring_cursor_get(int qid, const char *mode) "%d %s" +qxl_ring_cursor_req_notification(int qid) "%d" +qxl_ring_res_push(int qid, const char *mode, uint32_t surface_count, uint3= 2_t free_res, void *last_release, const char *notify) "%d %s s#=3D%d res#= =3D%d last=3D%p notify=3D%s" +qxl_ring_res_push_rest(int qid, uint32_t ring_has, uint32_t ring_size, uin= t32_t prod, uint32_t cons) "%d ring %d/%d [%d,%d]" +qxl_ring_res_put(int qid, uint32_t free_res) "%d #res=3D%d" +qxl_set_mode(int qid, int modenr, uint32_t x_res, uint32_t y_res, uint32_t= bits, uint64_t devmem) "%d mode=3D%d [ x=3D%d y=3D%d @ bpp=3D%d devmem=3D0= x%" PRIx64 " ]" +qxl_soft_reset(int qid) "%d" +qxl_spice_destroy_surfaces_complete(int qid) "%d" +qxl_spice_destroy_surfaces(int qid, int async) "%d async=3D%d" +qxl_spice_destroy_surface_wait_complete(int qid, uint32_t id) "%d sid=3D%d" +qxl_spice_destroy_surface_wait(int qid, uint32_t id, int async) "%d sid=3D= %d async=3D%d" +qxl_spice_flush_surfaces_async(int qid, uint32_t surface_count, uint32_t n= um_free_res) "%d s#=3D%d, res#=3D%d" +qxl_spice_monitors_config(int qid) "%d" +qxl_spice_loadvm_commands(int qid, void *ext, uint32_t count) "%d ext=3D%p= count=3D%d" +qxl_spice_oom(int qid) "%d" +qxl_spice_reset_cursor(int qid) "%d" +qxl_spice_reset_image_cache(int qid) "%d" +qxl_spice_reset_memslots(int qid) "%d" +qxl_spice_update_area(int qid, uint32_t surface_id, uint32_t left, uint32_= t right, uint32_t top, uint32_t bottom) "%d sid=3D%d [%d,%d,%d,%d]" +qxl_spice_update_area_rest(int qid, uint32_t num_dirty_rects, uint32_t cle= ar_dirty_region) "%d #d=3D%d clear=3D%d" +qxl_surfaces_dirty(int qid, uint64_t offset, uint64_t size) "%d offset=3D0= x%"PRIx64" size=3D0x%"PRIx64 +qxl_send_events(int qid, uint32_t events) "%d %d" +qxl_send_events_vm_stopped(int qid, uint32_t events) "%d %d" +qxl_set_guest_bug(int qid) "%d" +qxl_interrupt_client_monitors_config(int qid, int num_heads, void *heads) = "%d %d %p" +qxl_client_monitors_config_unsupported_by_guest(int qid, uint32_t int_mask= , void *client_monitors_config) "%d 0x%X %p" +qxl_client_monitors_config_unsupported_by_device(int qid, int revision) "%= d revision=3D%d" +qxl_client_monitors_config_capped(int qid, int requested, int limit) "%d %= d %d" +qxl_client_monitors_config_crc(int qid, unsigned size, uint32_t crc32) "%d= %u %u" +qxl_set_client_capabilities_unsupported_by_revision(int qid, int revision)= "%d revision=3D%d" + +# qxl-render.c +qxl_render_blit(int32_t stride, int32_t left, int32_t right, int32_t top, = int32_t bottom) "stride=3D%d [%d, %d, %d, %d]" +qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t st= ride, int32_t bytes_pp, int32_t bits_pp) "%dx%d, stride %d, bpp %d, depth %= d" +qxl_render_update_area_done(void *cookie) "%p" --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233567; cv=none; d=zohomail.com; s=zohoarc; b=jb93j8dAl0gQqaQcpVxdA96wnK9w4XLexhl3sjCPiG+4uN4xzsS0waNBews8rSiBs5id3dSQ3TWUCVe2iPPtk3T/9mk7UWYaBlrM6muiLoKk4UniKAcBycskGnoaEyc0zfcgVTBzVd37oTXgr1LdHEEiYNXF8/JFZiYzyJtTHvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233567; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zouQmuAdoAfUZ/D8dk+uPrTlPyKrMck+iXrXIyqMyuI=; b=DTfM/fKB45q4qxSGvuBu0O62uizAvKhys2W0RFO2qX3sm8aVy8HsMX2REPNVJRfltRXcB7DQXXTt6h4GeIJfyht8JTZaFd31Ncdr0u/3om/0oKyJOWTLNMjLLh4QpVY4//FTwG2bR1TZ2tV1v9F/EvR73STVolyrnaB+QeOKrLE= 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 1611233567977479.1761970048359; Thu, 21 Jan 2021 04:52:47 -0800 (PST) Received: from localhost ([::1]:46376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZSB-0007bC-06 for importer@patchew.org; Thu, 21 Jan 2021 07:52:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQJ-0005Tg-BV for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQB-0003RA-16 for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:49 -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-AmUZXnkDPXy0nHUfPBSDzQ-1; Thu, 21 Jan 2021 07:50:39 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35998806677 for ; Thu, 21 Jan 2021 12:50:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C10FE5D9C6; Thu, 21 Jan 2021 12:50:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 16D9218003B2; Thu, 21 Jan 2021 13:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233441; 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=zouQmuAdoAfUZ/D8dk+uPrTlPyKrMck+iXrXIyqMyuI=; b=eRRcxLYYbEyuyEMVxDrY9xJlvTOwYu65gkb+tiM4xlOVHV0CY/vbYJJdLzNzEewHwGFGcZ ZYco0bqNA79mQmBOT8oekXu6/Dgc94VcL71kFa6xEf2whSvJljy6uO2UbqqjaCEDtO4tUV FJDSIi5SsdUber0ya1Tmg2kQtpbLfHQ= X-MC-Unique: AmUZXnkDPXy0nHUfPBSDzQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 5/8] trace: iter init tweaks Date: Thu, 21 Jan 2021 13:50:25 +0100 Message-Id: <20210121125028.3247190-6-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" Rename trace_event_iter_init() to trace_event_iter_init_pattern(), add trace_event_iter_init_all() for interating over all events. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/control.h | 17 +++++++++++++---- monitor/misc.c | 4 ++-- trace/control-target.c | 2 +- trace/control.c | 16 +++++++++++----- trace/qmp.c | 6 +++--- trace/simple.c | 2 +- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/trace/control.h b/trace/control.h index 9522a7b318e2..ce40bd040574 100644 --- a/trace/control.h +++ b/trace/control.h @@ -20,15 +20,24 @@ typedef struct TraceEventIter { =20 =20 /** - * trace_event_iter_init: + * trace_event_iter_init_all: * @iter: the event iterator struct - * @pattern: optional pattern to filter events on name * * Initialize the event iterator struct @iter, - * optionally using @pattern to filter out events + * for all events. + */ +void trace_event_iter_init_all(TraceEventIter *iter); + +/** + * trace_event_iter_init_pattern: + * @iter: the event iterator struct + * @pattern: pattern to filter events on name + * + * Initialize the event iterator struct @iter, + * using @pattern to filter out events * with non-matching names. */ -void trace_event_iter_init(TraceEventIter *iter, const char *pattern); +void trace_event_iter_init_pattern(TraceEventIter *iter, const char *patte= rn); =20 /** * trace_event_iter_next: diff --git a/monitor/misc.c b/monitor/misc.c index a7650ed74702..d62d5d25aa2e 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -2025,7 +2025,7 @@ void info_trace_events_completion(ReadLineState *rs, = int nb_args, const char *st TraceEventIter iter; TraceEvent *ev; char *pattern =3D g_strdup_printf("%s*", str); - trace_event_iter_init(&iter, pattern); + trace_event_iter_init_pattern(&iter, pattern); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { readline_add_completion(rs, trace_event_get_name(ev)); } @@ -2043,7 +2043,7 @@ void trace_event_completion(ReadLineState *rs, int nb= _args, const char *str) TraceEventIter iter; TraceEvent *ev; char *pattern =3D g_strdup_printf("%s*", str); - trace_event_iter_init(&iter, pattern); + trace_event_iter_init_pattern(&iter, pattern); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { readline_add_completion(rs, trace_event_get_name(ev)); } diff --git a/trace/control-target.c b/trace/control-target.c index e293eeed7c00..8418673c18cf 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -127,7 +127,7 @@ void trace_init_vcpu(CPUState *vcpu) { TraceEventIter iter; TraceEvent *ev; - trace_event_iter_init(&iter, NULL); + trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (trace_event_is_vcpu(ev) && trace_event_get_state_static(ev) && diff --git a/trace/control.c b/trace/control.c index cd04dd4e0c1c..bd5d79aacd94 100644 --- a/trace/control.c +++ b/trace/control.c @@ -90,7 +90,7 @@ TraceEvent *trace_event_name(const char *name) =20 TraceEventIter iter; TraceEvent *ev; - trace_event_iter_init(&iter, NULL); + trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (strcmp(trace_event_get_name(ev), name) =3D=3D 0) { return ev; @@ -99,10 +99,16 @@ TraceEvent *trace_event_name(const char *name) return NULL; } =20 -void trace_event_iter_init(TraceEventIter *iter, const char *pattern) +void trace_event_iter_init_all(TraceEventIter *iter) { iter->event =3D 0; iter->group =3D 0; + iter->pattern =3D NULL; +} + +void trace_event_iter_init_pattern(TraceEventIter *iter, const char *patte= rn) +{ + trace_event_iter_init_all(iter); iter->pattern =3D pattern; } =20 @@ -129,7 +135,7 @@ void trace_list_events(FILE *f) { TraceEventIter iter; TraceEvent *ev; - trace_event_iter_init(&iter, NULL); + trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { fprintf(f, "%s\n", trace_event_get_name(ev)); } @@ -149,7 +155,7 @@ static void do_trace_enable_events(const char *line_buf) TraceEvent *ev; bool is_pattern =3D trace_event_is_pattern(line_ptr); =20 - trace_event_iter_init(&iter, line_ptr); + trace_event_iter_init_pattern(&iter, line_ptr); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (!trace_event_get_state_static(ev)) { if (!is_pattern) { @@ -257,7 +263,7 @@ void trace_fini_vcpu(CPUState *vcpu) =20 trace_guest_cpu_exit(vcpu); =20 - trace_event_iter_init(&iter, NULL); + trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (trace_event_is_vcpu(ev) && trace_event_get_state_static(ev) && diff --git a/trace/qmp.c b/trace/qmp.c index 85f81e47cc6d..3b4f4702b4f0 100644 --- a/trace/qmp.c +++ b/trace/qmp.c @@ -55,7 +55,7 @@ static bool check_events(bool has_vcpu, bool ignore_unava= ilable, bool is_pattern /* error for unavailable events */ TraceEventIter iter; TraceEvent *ev; - trace_event_iter_init(&iter, name); + trace_event_iter_init_pattern(&iter, name); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (!ignore_unavailable && !trace_event_get_state_static(ev)) { error_setg(errp, "event \"%s\" is disabled", trace_event_g= et_name(ev)); @@ -90,7 +90,7 @@ TraceEventInfoList *qmp_trace_event_get_state(const char = *name, } =20 /* Get states (all errors checked above) */ - trace_event_iter_init(&iter, name); + trace_event_iter_init_pattern(&iter, name); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { TraceEventInfo *value; bool is_vcpu =3D trace_event_is_vcpu(ev); @@ -153,7 +153,7 @@ void qmp_trace_event_set_state(const char *name, bool e= nable, } =20 /* Apply changes (all errors checked above) */ - trace_event_iter_init(&iter, name); + trace_event_iter_init_pattern(&iter, name); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (!trace_event_get_state_static(ev) || (has_vcpu && !trace_event_is_vcpu(ev))) { diff --git a/trace/simple.c b/trace/simple.c index 9cd2ed1fb3f4..97b6f85168e7 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -286,7 +286,7 @@ static int st_write_event_mapping(void) TraceEventIter iter; TraceEvent *ev; =20 - trace_event_iter_init(&iter, NULL); + trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { uint64_t id =3D trace_event_get_id(ev); const char *name =3D trace_event_get_name(ev); --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233550; cv=none; d=zohomail.com; s=zohoarc; b=d1jQRyOn7IkzJM7at8CmrDCB1fz6yEohcE9WvafvnLQUZ/VvUJT6oLzXeBlc2l0SzRU0j62RojrbR1XnWsxAJgUi69rjJJ2MbGVBvoGeaUqwGeMwVH0sv1XWhEEl5Y9xJ8P9hUD7LaRJkmEhHM90z3x2i6H0TmkhHBncL07WIaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233550; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1uovRcMgcTVUoryQ2H9/X2Y3ypZeywc6XI0DccfYI4Q=; b=TgVRf1827uxv/w8itjQP4csmWL/Y5YghfBjYPXyhzZCLlOOYv8mfj31cpsBmIzLSz+LmFqByr78j3YG0N3+EjPq8UW/E2KYa3Rv4sESiwLoTB/tHIckTQGeB+DqukWYYsw7SvSx9rLpAs61iHr+cgzRgVRk0eKhryk/R3acnuGU= 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 1611233550349322.92012514672695; Thu, 21 Jan 2021 04:52:30 -0800 (PST) Received: from localhost ([::1]:45248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZRt-00077P-9Q for importer@patchew.org; Thu, 21 Jan 2021 07:52:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQK-0005WG-Qm for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQG-0003Sy-7n for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50: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-337-w55y55hmNxmwpBtTeMT0XA-1; Thu, 21 Jan 2021 07:50:45 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C105806661 for ; Thu, 21 Jan 2021 12:50:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C38E2101E663; Thu, 21 Jan 2021 12:50:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2340118003B6; Thu, 21 Jan 2021 13:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233446; 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=1uovRcMgcTVUoryQ2H9/X2Y3ypZeywc6XI0DccfYI4Q=; b=IbJfuFSKZpAF5q327Z71TNT2opDs+nUIL967awFVtasbqP2PsrTbuKVZ3UcYHrTYk5VYS7 Rhh8uM2ijrResW/3/F/c4NfE1ReW57FCZax7W1kGL/QZgM4dAnGbPwT12IKE4rRttsVzWc uAHqqH5XGf2RPR4reNCmKFvjW07VmBg= X-MC-Unique: w55y55hmNxmwpBtTeMT0XA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 6/8] trace: add trace_event_iter_init_group Date: Thu, 21 Jan 2021 13:50:26 +0100 Message-Id: <20210121125028.3247190-7-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" This allows to interate over an event group. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/control.h | 13 +++++++++++++ trace/control.c | 19 ++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/trace/control.h b/trace/control.h index ce40bd040574..23b8393b297e 100644 --- a/trace/control.h +++ b/trace/control.h @@ -13,8 +13,11 @@ #include "event-internal.h" =20 typedef struct TraceEventIter { + /* iter state */ size_t event; size_t group; + /* filter conditions */ + size_t group_id; const char *pattern; } TraceEventIter; =20 @@ -39,6 +42,16 @@ void trace_event_iter_init_all(TraceEventIter *iter); */ void trace_event_iter_init_pattern(TraceEventIter *iter, const char *patte= rn); =20 +/** + * trace_event_iter_init_group: + * @iter: the event iterator struct + * @group_id: group_id to filter events by group. + * + * Initialize the event iterator struct @iter, + * using @group_id to filter for events in the group. + */ +void trace_event_iter_init_group(TraceEventIter *iter, size_t group_id); + /** * trace_event_iter_next: * @iter: the event iterator struct diff --git a/trace/control.c b/trace/control.c index bd5d79aacd94..f1cc880b7cd1 100644 --- a/trace/control.c +++ b/trace/control.c @@ -103,6 +103,7 @@ void trace_event_iter_init_all(TraceEventIter *iter) { iter->event =3D 0; iter->group =3D 0; + iter->group_id =3D -1; iter->pattern =3D NULL; } =20 @@ -112,20 +113,32 @@ void trace_event_iter_init_pattern(TraceEventIter *it= er, const char *pattern) iter->pattern =3D pattern; } =20 +void trace_event_iter_init_group(TraceEventIter *iter, size_t group_id) +{ + trace_event_iter_init_all(iter); + iter->group_id =3D group_id; +} + TraceEvent *trace_event_iter_next(TraceEventIter *iter) { while (iter->group < nevent_groups && event_groups[iter->group].events[iter->event] !=3D NULL) { TraceEvent *ev =3D event_groups[iter->group].events[iter->event]; + size_t group =3D iter->group; iter->event++; if (event_groups[iter->group].events[iter->event] =3D=3D NULL) { iter->event =3D 0; iter->group++; } - if (!iter->pattern || - g_pattern_match_simple(iter->pattern, trace_event_get_name(ev)= )) { - return ev; + if (iter->pattern && + !g_pattern_match_simple(iter->pattern, trace_event_get_name(ev= ))) { + continue; } + if (iter->group_id !=3D -1 && + iter->group_id !=3D group) { + continue; + } + return ev; } =20 return NULL; --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233699; cv=none; d=zohomail.com; s=zohoarc; b=CoN9oSYUx0tpzJGCNPRr+wWQ36i9l5faZxrATRiTIfGCJgx9tNTzlTvGaMijgTvS2NP3Zt17R0+6/jQRyOVpjxm2DcNuLERtg9sAGfr8M66dvPHdt5pBsUhxoDzWo0i0UAbyKZAN+6Aup/L2oW0MfNAUOJ7+Jorl+/hVGcmANOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233699; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cnxQm3v1Ab0206NsMpDRBh5rlQFn48y2RQATiKmFCkA=; b=LM2C8LKuyc4seDZwJ8e5reVSZkmSu4MmKKcgVhh4c3ehB9B7XWpEQAdTmRO0Y7AwZ5EXs/WwfdYM4Xij9d/nyAsqPoi2vTsvzc+679/8ftl9YOwRDEvwgraoaT+54c2BC93klwyJwuNVGkbXekMpNpwWjSZhINMlqxEA6TMd81k= 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 1611233699420811.6968503132739; Thu, 21 Jan 2021 04:54:59 -0800 (PST) Received: from localhost ([::1]:51434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZUI-0001L3-C6 for importer@patchew.org; Thu, 21 Jan 2021 07:54:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQL-0005XE-5x for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQH-0003T4-As for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50: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-397-5ww4gFQYPfWnSKCsA79fGg-1; Thu, 21 Jan 2021 07:50:45 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88CAE1572A for ; Thu, 21 Jan 2021 12:50:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23CCA60C43; Thu, 21 Jan 2021 12:50:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2DA5218003BA; Thu, 21 Jan 2021 13:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233447; 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=cnxQm3v1Ab0206NsMpDRBh5rlQFn48y2RQATiKmFCkA=; b=duY33Vbi+oUC6JIAdxj9IGtcIlp00ySUfWTeXw3erdRT9Mjq/1kuoZJMCH7XeZzK2Twc/q q8HBR/d7lm9VxMMNcNK3Z3IdiYYqis8fcEam5c+pGNwKj0N5vsbf0+WpHrraOglCKQnLs6 dfDA8TrHMMqGe8MjZ02cgp0TB4QGCog= X-MC-Unique: 5ww4gFQYPfWnSKCsA79fGg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 7/8] trace/simple: pass iter to st_write_event_mapping Date: Thu, 21 Jan 2021 13:50:27 +0100 Message-Id: <20210121125028.3247190-8-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" Pass an iter to st_write_event_mapping, so the function can interate different things depending on how we initialize the iter. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/simple.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index 97b6f85168e7..ec2156d135cb 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -280,14 +280,12 @@ void trace_record_finish(TraceBufferRecord *rec) } } =20 -static int st_write_event_mapping(void) +static int st_write_event_mapping(TraceEventIter *iter) { uint64_t type =3D TRACE_RECORD_TYPE_MAPPING; - TraceEventIter iter; TraceEvent *ev; =20 - trace_event_iter_init_all(&iter); - while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { + while ((ev =3D trace_event_iter_next(iter)) !=3D NULL) { uint64_t id =3D trace_event_get_id(ev); const char *name =3D trace_event_get_name(ev); uint32_t len =3D strlen(name); @@ -309,6 +307,7 @@ static int st_write_event_mapping(void) */ bool st_set_trace_file_enabled(bool enable) { + TraceEventIter iter; bool was_enabled =3D trace_fp; =20 if (enable =3D=3D !!trace_fp) { @@ -333,8 +332,9 @@ bool st_set_trace_file_enabled(bool enable) return was_enabled; } =20 + trace_event_iter_init_all(&iter); if (fwrite(&header, sizeof header, 1, trace_fp) !=3D 1 || - st_write_event_mapping() < 0) { + st_write_event_mapping(&iter) < 0) { fclose(trace_fp); trace_fp =3D NULL; return was_enabled; --=20 2.29.2 From nobody Tue Nov 18 15:24:39 2025 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=1611233945; cv=none; d=zohomail.com; s=zohoarc; b=Wluh6H2QbH5MVhzqkZQCkTJ9TsimmhlRR6MEd+H+qDqrBi0MdMUTN49ylfZ6NBcYesNWDEbO01xakFtzjkKZz2N6lqhfHt/qjw69AsMsbLuSsaYf2mVGesIUjR9QZIvgCn8+ofohjtLIkRC1a3a3ahrWMIG9Ti1BlgWnUEr53qQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611233945; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ELMXX/7+Mu/+0lCYZDVZMDtTBBkG25eKsFIUDq+vL1o=; b=dej+thn/im3/RcPo2b6sDiR1gTECljOQH5K8vMmLq6YBGexPfjnI8OFpX0Jb+xXmML2hsQJlgBD0dUQJcGWmUUbYgSXkOujTO7A8qYupbCijcXo8BncV6K301WsLIDV8jm74LhWTUead4r8wkrKdvZMLKSa16GsFf8VDzcwvWvU= 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 1611233945822649.4126882745117; Thu, 21 Jan 2021 04:59:05 -0800 (PST) Received: from localhost ([::1]:34226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2ZYG-00068x-Rh for importer@patchew.org; Thu, 21 Jan 2021 07:59:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQL-0005Zt-R7 for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l2ZQF-0003Su-BP for qemu-devel@nongnu.org; Thu, 21 Jan 2021 07:50:53 -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-128-hduPV5XWPHWpNBCC6K0AaA-1; Thu, 21 Jan 2021 07:50:44 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE3AD15726 for ; Thu, 21 Jan 2021 12:50:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2808319D9B; Thu, 21 Jan 2021 12:50:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3B39F18003BE; Thu, 21 Jan 2021 13:50:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611233446; 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=ELMXX/7+Mu/+0lCYZDVZMDtTBBkG25eKsFIUDq+vL1o=; b=T+pb6ZWkIIOQOxR/MzuJt7JSwBoot46n+Z5coVYARSIUiqqwLyYDFeaj3zPLdNRGn4jMWy isfYTTaPSJ/2nXZDxrzahIRL0GhEPps9DLUPY/Ieq+CT4PWUVw9G+k5WyzVUGVp8EqhX++ z57jTkgo6Su4pvi6m2XSSdcVMmfovWM= X-MC-Unique: hduPV5XWPHWpNBCC6K0AaA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v3 8/8] trace/simple: add st_init_group Date: Thu, 21 Jan 2021 13:50:28 +0100 Message-Id: <20210121125028.3247190-9-kraxel@redhat.com> In-Reply-To: <20210121125028.3247190-1-kraxel@redhat.com> References: <20210121125028.3247190-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.168, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Markus Armbruster , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Gerd Hoffmann 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" Add helper function and call it for each trace event group added. Makes sure that events added at module load time are initialized properly. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/simple.h | 1 + trace/control.c | 4 ++++ trace/simple.c | 12 ++++++++++++ 3 files changed, 17 insertions(+) diff --git a/trace/simple.h b/trace/simple.h index 26ccbc8b8ae3..ee1983ce5617 100644 --- a/trace/simple.h +++ b/trace/simple.h @@ -15,6 +15,7 @@ void st_print_trace_file_status(void); bool st_set_trace_file_enabled(bool enable); void st_set_trace_file(const char *file); bool st_init(void); +void st_init_group(size_t group); void st_flush_trace_buffer(void); =20 typedef struct { diff --git a/trace/control.c b/trace/control.c index f1cc880b7cd1..9649d0979e70 100644 --- a/trace/control.c +++ b/trace/control.c @@ -81,6 +81,10 @@ void trace_event_register_group(TraceEvent **events) event_groups =3D g_renew(TraceEventGroup, event_groups, nevent_groups = + 1); event_groups[nevent_groups].events =3D events; nevent_groups++; + +#ifdef CONFIG_TRACE_SIMPLE + st_init_group(nevent_groups - 1); +#endif } =20 =20 diff --git a/trace/simple.c b/trace/simple.c index ec2156d135cb..ac499edee0d5 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -422,3 +422,15 @@ bool st_init(void) atexit(st_flush_trace_buffer); return true; } + +void st_init_group(size_t group) +{ + TraceEventIter iter; + + if (!trace_writeout_enabled) { + return; + } + + trace_event_iter_init_group(&iter, group); + st_write_event_mapping(&iter); +} --=20 2.29.2