From nobody Sat May 18 18:58:05 2024 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=1622554247; cv=none; d=zohomail.com; s=zohoarc; b=attXdS7Wvdfq2hLUtq5hLxEXwUZuHEPDXPpdOXcGHJB7DMikPRBmcVs+OKj9y5UgGpkvrttn0wgH3vGo6EF88uA+CcKNBj5u9RfLuhujiGHMCBdVwhzvaassM8rKNhtbKEKDeoSodaueFMct9o6mtOOxGogyzp5wN4EZS4kQ4YE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554247; 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=sysTBwuLozRqjtOzFi7VfcLKUbQpzhSmu6S5knBFPco=; b=Kp8fvN27XTZxcznfsYrmgtymDB8S1kC98UC2rUSz7LZyrXKZrSEm7d3nUZKYfpr9yWAFILyHjs3hN0SXLxNwEwZOQ4jXkcBNGx7iTP0ieQV2aHsR+r7i+IN1cV3l3V4M5z1GQumiTE0iK8PwP8EgYmybe2OejxCZHxl8LwjTLX0= 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 1622554247986413.4721486748159; Tue, 1 Jun 2021 06:30:47 -0700 (PDT) Received: from localhost ([::1]:39846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4Tn-0007S3-6X for importer@patchew.org; Tue, 01 Jun 2021 09:30:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Nj-0001Of-Fl for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Nh-0007Gn-Hp for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:31 -0400 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-232-d7SwYesaO76cOiNvjspbCg-1; Tue, 01 Jun 2021 09:24:26 -0400 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 79E5F801817 for ; Tue, 1 Jun 2021 13:24:25 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 342B860C4A; Tue, 1 Jun 2021 13:24:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3BAE218000B7; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553868; 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=sysTBwuLozRqjtOzFi7VfcLKUbQpzhSmu6S5knBFPco=; b=NLHptEgCnQ0xhTAr1KnNbG91e8AV7ZF29BEsxGBbD9A/DSjpCpULDTVLcJts+lmNlk7iub PmWo7EOfS0tta7/aoXlHGpuLvJJQQboo1cuM27P6/va0kZVKzSCeZAjteuzekV1V77mslg js4gzzx9cBUdIfqf/RQum6SAVgIFSPE= X-MC-Unique: d7SwYesaO76cOiNvjspbCg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 01/13] qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful. Date: Tue, 1 Jun 2021 15:24:02 +0200 Message-Id: <20210601132414.432430-2-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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" Setting SYSTEMTAP_TAPSET to some value other than /usr/share/systemtap/tapsets results in systemtap not finding the standard tapset library any more, which in turn breaks tracing because pid() and other standard systemtap functions are not available any more. So using SYSTEMTAP_TAPSET to point systemtap to the qemu probes will only work for the prefix=3D/usr installs because both qemu and system tapsets in the same directory then. All other prefixes are broken. Fix that by using the "-I $tapsetdir" command line switch instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- scripts/qemu-trace-stap | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/qemu-trace-stap b/scripts/qemu-trace-stap index 90527eb974f4..eb6e951ff235 100755 --- a/scripts/qemu-trace-stap +++ b/scripts/qemu-trace-stap @@ -55,11 +55,6 @@ def tapset_dir(binary): return os.path.realpath(tapset) =20 =20 -def tapset_env(tapset_dir): - tenv =3D copy.copy(os.environ) - tenv["SYSTEMTAP_TAPSET"] =3D tapset_dir - return tenv - def cmd_run(args): prefix =3D probe_prefix(args.binary) tapsets =3D tapset_dir(args.binary) @@ -81,11 +76,11 @@ def cmd_run(args): =20 # We request an 8MB buffer, since the stap default 1MB buffer # can be easily overflowed by frequently firing QEMU traces - stapargs =3D ["stap", "-s", "8"] + stapargs =3D ["stap", "-s", "8", "-I", tapsets ] if args.pid is not None: stapargs.extend(["-x", args.pid]) stapargs.extend(["-e", script]) - subprocess.call(stapargs, env=3Dtapset_env(tapsets)) + subprocess.call(stapargs) =20 =20 def cmd_list(args): @@ -101,10 +96,9 @@ def cmd_list(args): =20 if verbose: print("Listing probes with name '%s'" % script) - proc =3D subprocess.Popen(["stap", "-l", script], + proc =3D subprocess.Popen(["stap", "-I", tapsets, "-l", script], stdout=3Dsubprocess.PIPE, - universal_newlines=3DTrue, - env=3Dtapset_env(tapsets)) + universal_newlines=3DTrue) out, err =3D proc.communicate() if proc.returncode !=3D 0: print("No probes found, are the tapsets installed in %s" % tap= set_dir(args.binary)) --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622553959; cv=none; d=zohomail.com; s=zohoarc; b=kCF93gxSlyNTIlp9MEBeQbzzUo9shSXkDf8gMeFIzhtw1CUN99jNKe81HztQURKBlkifionGumoVLJ3vcUDj46q8oZN6OmmMTAuVr6C0RZyr7syA1JrttWKr8aIj9uEPmVeZsyePrcNlyS8LYhrtybszIj6NMfRCFZWBeaDlgIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622553959; 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=Ik4IQGs6QAoX0EoQ8YuW1+T17wfK79T/ba8aGDNBkAs=; b=Spd6E7SsmuxwDMJY7RpvHVoTlnDdXQkoezTvSwafDLkKihwLSAdxHYroYduWD5hAPJlujonlAASGpBAG86O314S73Hjug3hdAJNbdRDucCTIccpe9+CfcYGJGws2PjezkYyKcXhU+foEro+q1Ggjf/OnzUQeDBpC1d0HuIPA1N8= 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 1622553959562276.9390430383248; Tue, 1 Jun 2021 06:25:59 -0700 (PDT) Received: from localhost ([::1]:50386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4P8-0003lL-Gw for importer@patchew.org; Tue, 01 Jun 2021 09:25:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Nz-0001V5-2P for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Nu-0007OL-FF for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:46 -0400 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-576-Mc8ueYy0O-Oy_HIXLeCg8w-1; Tue, 01 Jun 2021 09:24:40 -0400 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 748218015F5 for ; Tue, 1 Jun 2021 13:24:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4108A5D751; Tue, 1 Jun 2021 13:24:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 510B018000B9; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553881; 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=Ik4IQGs6QAoX0EoQ8YuW1+T17wfK79T/ba8aGDNBkAs=; b=ZHT1xiXu77jPTR8hoWP+Rt0oY3mRPZYl5emHvTskeX1xPA9Aut3D1S+jUE534QUaFgOkuB XUf7K3aPRDey4wDwpS6ZHmk5cSTiBvma3J+Uabn2TjlXJzYP2+3b/bTXvHu9v1eJFjIx1k BrrApFnrV0WlrMrTus7p5RNXhOd1Thw= X-MC-Unique: Mc8ueYy0O-Oy_HIXLeCg8w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 02/13] trace: iter init tweaks Date: Tue, 1 Jun 2021 15:24:03 +0200 Message-Id: <20210601132414.432430-3-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 f3a393ea590b..f9b86bf4a778 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1833,7 +1833,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)); } @@ -1851,7 +1851,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 4be38e1af28d..ed38e813b23d 100644 --- a/trace/control.c +++ b/trace/control.c @@ -91,7 +91,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; @@ -100,10 +100,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 @@ -130,7 +136,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)); } @@ -150,7 +156,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) { @@ -256,7 +262,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.31.1 From nobody Sat May 18 18:58:05 2024 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=1622553959; cv=none; d=zohomail.com; s=zohoarc; b=OHkTD0ZkR3ASsOf2cP0RvQXy1CUs5u2bPHmFrxapbOkwqXpVCqyTcI0Y+A7lZVVIXZXqterPKk+dp1aY5jI4Q4zof5IBkLfLdcOZ1d74ydUtBGY/r1JUJESWCc2033Iq9brQExj2A10P0oJyY8x8Cs9jrfzNtgufVfK0WWKBJVY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622553959; 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=LuaAfgLNp0ftHMNxPsrBIquvjEpO4NRRU9Khnzc/6dQ=; b=NcovFHv7wyqc0X07nqRNEW5E12GKt3jSrc+ou55DjvVQErKjvkhfo2c62kGciXiu9+o9zQuG6NgbeHVhbZSgHunleCD25RUWBwR14wjOokm1+6+BuNB+j8JCEreHnGDRj+QhNB7eannNzAywTxZEFf5SZd0UuWBrYG0znRpNoH8= 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 1622553959786257.7773668396411; Tue, 1 Jun 2021 06:25:59 -0700 (PDT) Received: from localhost ([::1]:50152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4P5-0003bq-Vp for importer@patchew.org; Tue, 01 Jun 2021 09:25:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Nv-0001Tj-Hc for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Ns-0007My-59 for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:43 -0400 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-546-DOMvbGZYPZSAXuOUuNaVVA-1; Tue, 01 Jun 2021 09:24:37 -0400 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 CEBAE189C446 for ; Tue, 1 Jun 2021 13:24:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 694135C1C4; Tue, 1 Jun 2021 13:24:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 656501800385; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553879; 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=LuaAfgLNp0ftHMNxPsrBIquvjEpO4NRRU9Khnzc/6dQ=; b=S2h99StDiBWXconRQZWvFNGrMbOcu/wtcyKNIEqGiQGm7FBuUIjdGUcz4/4qCY25hI8jHG kGMgJJ6rTejZlAnyq/38wMu+zV7Blxn6Tf7PDcAEvOYJAghtS0jpBex/It3QghTTv3RSj7 rv/Hhy8ZtufVhaQXYdsTzUGIwESP60A= X-MC-Unique: DOMvbGZYPZSAXuOUuNaVVA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 03/13] trace: add trace_event_iter_init_group Date: Tue, 1 Jun 2021 15:24:04 +0200 Message-Id: <20210601132414.432430-4-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 ed38e813b23d..2c904b7ee4c6 100644 --- a/trace/control.c +++ b/trace/control.c @@ -104,6 +104,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 @@ -113,20 +114,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.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554098; cv=none; d=zohomail.com; s=zohoarc; b=QsHHHX9KzpoviUoycLqDqn0SNQpK2cpKNuKOCteCT6YBUZfRsK9QBLBxV6ngj82IJcJIfZ/zdtt3J2jokWcdquRYfk3j80uEbONqABtbvEQjwF6NyXDMscgSi8WvZREIxGO4AKhN1l74dwKh3MTml33bYhec5m4pQjc4dEJY8BM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554098; 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=+JGHQbX8aWH6SFPM2BHWCun/ZgAUXd8dXesS3lRGN/U=; b=XIF5O/s4r8T0W2LfvTPs7/nk6TtVr9rzdw3ppNhufbnXGKKUwcgfN5RyqXX/acKtOAq/dO+02WpwDe1Q3L7pILUtCyg4uYFgX8TCFO7QI59qO2rwhCDhKco2/SfL560Awc/fnbB3Iets49A4DAo5zcIGL38fhqYmSJVVL3G5prw= 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 1622554098410736.3666977829947; Tue, 1 Jun 2021 06:28:18 -0700 (PDT) Received: from localhost ([::1]:59014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4RN-0001A3-Kb for importer@patchew.org; Tue, 01 Jun 2021 09:28:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4O5-0001gy-Eg for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4O3-0007TS-SH for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:53 -0400 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-415-EoxC20H3NYqNnRuCsdeRvA-1; Tue, 01 Jun 2021 09:24:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 430D88015F5 for ; Tue, 1 Jun 2021 13:24:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 589DA60BD8; Tue, 1 Jun 2021 13:24:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7038B180038D; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553890; 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=+JGHQbX8aWH6SFPM2BHWCun/ZgAUXd8dXesS3lRGN/U=; b=cNizXnQdNlZjZ6mJFF3ygBopkHm9knTzjcPuKJXr8EKfm5T7ogebhLI1OmFU3iN3WVwj1r ngFAZKja6dCasda6TVnqo2dlP5ChdgayAOOgaA+SD0dXyMz+eA8bY2994+o6A1+cOP0Xvf bfH2kgI7Jp35JG0AM7W1qQ4rac19cFs= X-MC-Unique: EoxC20H3NYqNnRuCsdeRvA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 04/13] trace/simple: pass iter to st_write_event_mapping Date: Tue, 1 Jun 2021 15:24:05 +0200 Message-Id: <20210601132414.432430-5-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554422; cv=none; d=zohomail.com; s=zohoarc; b=Wq5Jf6AYV1+AjMg6bgUpb3UVbvQwN5qSc06P7fzfJkPQHlmk0zzlXah6WLeQQHH2yE0JSDVQaHkr33/QgBE0B2DvDKzWdqvw18oZHnCDle2GnFBIKncWlliK64gIDmcIs2nMgq7UdCv6qfPiI9hngQ8F5VHFCsQKZlye6rjp1eQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554422; 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=3kX+f7N4OZcVBJKvFr8puI6TgrBvyijJS4EBLG3SHMw=; b=aOJLFvGJq4MuulBVb0gHCAAdXYPyAqETmWY510czB7Oshj3scFQ+e578P/OdxFFK8ZMY/WsVNejfPx4/dyy3rUbNvmq+LvDCQS5fstKggUn9Zh2qMZarBawXHTknlhEpUj1YqrKK9G+NrNT2Iq547MhpNranKTIeNpRkEgqyU50= 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 1622554422551425.3897976138711; Tue, 1 Jun 2021 06:33:42 -0700 (PDT) Received: from localhost ([::1]:46258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4Wb-0003WF-Lg for importer@patchew.org; Tue, 01 Jun 2021 09:33:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4O7-0001nz-BI for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4O5-0007Uu-NO for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:24:55 -0400 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-425-vHNqExR7NS-NKc4WagdWJA-1; Tue, 01 Jun 2021 09:24:51 -0400 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 9F573189C447 for ; Tue, 1 Jun 2021 13:24:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B49436A035; Tue, 1 Jun 2021 13:24:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7F18818003AF; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553893; 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=3kX+f7N4OZcVBJKvFr8puI6TgrBvyijJS4EBLG3SHMw=; b=Syx1q6TYtf1dnLUuz4C0GPKoxXtQb6nFnDpXgelYFKHO7icpgTdUjf5FfW1di5Qug3yzJX IloIW43LXGueJ0fBOitxzfnUg4J5XY96uma7QLfEsIBF409TrZT4yWVZyd33sUt8as/8Ue EXap8fPtd5e7LXGa5QpxqvQHGN477GY= X-MC-Unique: vHNqExR7NS-NKc4WagdWJA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 05/13] trace/simple: add st_init_group Date: Tue, 1 Jun 2021 15:24:06 +0200 Message-Id: <20210601132414.432430-6-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 2c904b7ee4c6..d5b68e846eeb 100644 --- a/trace/control.c +++ b/trace/control.c @@ -82,6 +82,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.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554613; cv=none; d=zohomail.com; s=zohoarc; b=J7MzY7F3ObjY/UcC3mJRxIDt0bSuoSYTHSIrkiTKeDQQsQHQo4dFDy2jGf+MgzeRNwyb9z9IbRaC5yodlUKd9sSY/emG12jinfPBQsD7ZTEAJ4X3dgv482MESBEx6j/SnUqCIRVaVn19D/2IBiAK9vmpV7s3I+3TcIXHodTDvsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554613; 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=4OUpCO7YtxZeJ9uzwyHxjLe7IVac+o4JnDksCh3ohz4=; b=cGTilCVQFb8gDksp68SqnNZ8+4gVt4AnuNR1Ra1+dHj350ufCC6+Zop7coizQGKoM1Jakf+50x0n1bELW0tYB7Rq/4P8/L0io9PGOyfbB50X09lK/FWvrymfy9qKzcoPCwGJWGssIa2rzPF/0YnND+ydnPFG/w7iVV/VGSlVBaw= 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 1622554613589118.81949828356937; Tue, 1 Jun 2021 06:36:53 -0700 (PDT) Received: from localhost ([::1]:53746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4Zg-0000bZ-Ql for importer@patchew.org; Tue, 01 Jun 2021 09:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OG-0002IQ-FF for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OE-0007ab-RC for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:04 -0400 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-310-xpFWjixpM32M-Rv2jfIa0g-1; Tue, 01 Jun 2021 09:25:00 -0400 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 97E61107ACED for ; Tue, 1 Jun 2021 13:24:59 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5B865D9CD; Tue, 1 Jun 2021 13:24:49 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8BB9F18003B0; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553902; 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=4OUpCO7YtxZeJ9uzwyHxjLe7IVac+o4JnDksCh3ohz4=; b=FefSUvqNaN0C1ZgR29qYZB/28HS0DwHfLuhXeQ9Xji48FfBpTyhLD1IPt9reuPc0Jwmp4Q D/zrhlNjgCOg7T+pN122vyeYjfPZGmSxHP/a1THqy+iqrPj4IV2KOSQ6FatYy5mYD1hB37 Je60rUGPx/0ujl9l3OnBfkEXn4Q5zLc= X-MC-Unique: xpFWjixpM32M-Rv2jfIa0g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 06/13] meson: add trace_events_config[] Date: Tue, 1 Jun 2021 15:24:07 +0200 Message-Id: <20210601132414.432430-7-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index a45f1a844f13..84a9e17533cb 100644 --- a/meson.build +++ b/meson.build @@ -1774,6 +1774,7 @@ target_user_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 [ 'crypto', 'qapi', diff --git a/trace/meson.build b/trace/meson.build index 08f83a15c316..bc946495a714 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,10 +2,22 @@ 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_name =3D c.get('group') group =3D '--group=3D' + group_name fmt =3D '@0@-' + group_name + '.@1@' =20 --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554718; cv=none; d=zohomail.com; s=zohoarc; b=l9SO1HjRiOQ+zmm58e94N05DgBme73Sb5dXVGaRDwBKMrmZzC2ZpTiXEZjk3LgiQRr8vCxBzaUlkbpCZH0lVC9QCNLhXC86RVgK7oOAXfGovHe4xHU9E0RbYoGrBxKw/Cg5ztQManx1yz595eShb3d1OKcQFDOpIEbnnDhRMUsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554718; 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=r5McB0vFwh/DQ2iAc/dIJQusARvdf2oQPaeGDLe0u34=; b=bhnI0mD4/3GOf4DILznZHZl8SFh2GETSRakaean63h7kFObw+11YEb3BLJQoxhclMVS+9L2LkU+0wKTdobrqrFXWyAQF78xKIn2FDgXLbeNrbXa0ySNaVK6fA4OhwGExBUbXv8GXMsr8VY12YI5TzmA65sJ+5COa1KBAdXgmotQ= 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 1622554718308799.6364174069305; Tue, 1 Jun 2021 06:38:38 -0700 (PDT) Received: from localhost ([::1]:58742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4bN-00048Y-83 for importer@patchew.org; Tue, 01 Jun 2021 09:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OI-0002Nf-5I for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OG-0007an-JB for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:05 -0400 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-252-7q7jygByOIGqU6V_WB8gPw-1; Tue, 01 Jun 2021 09:25:00 -0400 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 99F06101371E for ; Tue, 1 Jun 2021 13:24:59 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AA6C5D9D0; Tue, 1 Jun 2021 13:24:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9637218003B1; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553903; 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=r5McB0vFwh/DQ2iAc/dIJQusARvdf2oQPaeGDLe0u34=; b=Vy0nQK+WyKpTbXaKyavOn5zaWQNFWnxsTVJ3s9a+2KdLyLC/M73Y0BldWCGPtJd8lG0lIg c/hqM6+ZTcLtAPop0mXxbSINwhR+hnvayNk3jiu4SQFHUU0JmCQ88Ni4dYss3zAZS5agsO BB2G0+MdIyXAZCuLgA698bZRlmmRI/M= X-MC-Unique: 7q7jygByOIGqU6V_WB8gPw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 07/13] meson: move up hw subdir (specifically before trace subdir) Date: Tue, 1 Jun 2021 15:24:08 +0200 Message-Id: <20210601132414.432430-8-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 trace_events_config[] changes done in hw/*/meson.build. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 84a9e17533cb..b1f2e7920977 100644 --- a/meson.build +++ b/meson.build @@ -1878,6 +1878,10 @@ if 'CONFIG_VHOST_USER' in config_host vhost_user =3D libvhost_user.get_variable('vhost_user_dep') endif =20 +# any subdir updating trace_events_config[] must +# come before the 'trace' subdir. +subdir('hw') + subdir('qapi') subdir('qobject') subdir('stubs') @@ -1988,7 +1992,6 @@ subdir('monitor') subdir('net') subdir('replay') subdir('semihosting') -subdir('hw') subdir('accel') subdir('plugins') subdir('bsd-user') --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554004; cv=none; d=zohomail.com; s=zohoarc; b=nTbFixBGcPndXoeE+CZoYU5xj6DdR/FUQ37+1SMle7jxVYvGyaMTLfHYaQNPoiwq+WVpr/e1yBhmZ2PnYUIDCf8COvmX8rctAbDu+LIUFcEPwd04hnTza6vthHgTVSzv31/7Ls2ybo4UlgJxvUm1hep0iZ0lOwL+pARhDc0P1+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554004; 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=Dt7vWFEn+keuyAa/I70krfhnNtm+YyDUAktbvUfxM3o=; b=e+X6b1dygioKqHaT+iVcHP50SKYPXPdMXGGCJ0XaK4Rs773DKmh/iHGNVHIL2mJ/WtTMkn8wApmbnKMZlJuybgQrqrhSQ3xnD1W0lE/86X0IPg3VGXt7k0EB4/sCWPUQhwdm0kED3ROrlBMVK/vc8gHtzXdlP5Xsyb1bu9gi3LI= 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 1622554004345342.55931455098414; Tue, 1 Jun 2021 06:26:44 -0700 (PDT) Received: from localhost ([::1]:53396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4Pr-0005r5-88 for importer@patchew.org; Tue, 01 Jun 2021 09:26:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OU-0002zv-4r for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OS-0007jH-3a for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:17 -0400 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-535-ozxFfBF5MhOdUAntJW6R1A-1; Tue, 01 Jun 2021 09:25:13 -0400 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 D71ED803622 for ; Tue, 1 Jun 2021 13:25:12 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B87436807; Tue, 1 Jun 2021 13:25:01 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A33A418007A2; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553915; 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=Dt7vWFEn+keuyAa/I70krfhnNtm+YyDUAktbvUfxM3o=; b=hVnDKfvSaxh3d2/GpiqjCPHWfSl2YBzc+5YtAq/AkN7F9nLZvc5QP+JywWwrHA74udaT/u Ib1yLJnGVuUIM/2pqDtd6g7VoRECfZJ4i5+jSNwkNo/FsOYmTbNu+7duZbjs32ikoVLk0V 8gioxL20ax+FqFWMtO6XyTGBJ9UYWoE= X-MC-Unique: ozxFfBF5MhOdUAntJW6R1A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 08/13] meson: add module_trace & module_trace_src Date: Tue, 1 Jun 2021 15:24:09 +0200 Message-Id: <20210601132414.432430-9-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 | 5 ++++- trace/meson.build | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b1f2e7920977..0e1c2f995d79 100644 --- a/meson.build +++ b/meson.build @@ -1763,6 +1763,7 @@ user_ss =3D ss.source_set() util_ss =3D ss.source_set() =20 modules =3D {} +module_trace =3D {} hw_arch =3D {} target_arch =3D {} target_softmmu_arch =3D {} @@ -2017,7 +2018,9 @@ 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_cfg =3D module_trace.get(d + '-' + m, {}) + module_trace_src =3D module_trace_cfg.get('src', []) + 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 bc946495a714..834ebaa7cc5f 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -17,9 +17,11 @@ endforeach foreach c : trace_events_config trace_events_file =3D c.get('file') trace_events_files +=3D [ trace_events_file ] - group_name =3D c.get('group') + module_name =3D c.get('module', '') + group_name =3D c.get('group', module_name.underscorify()) group =3D '--group=3D' + group_name fmt =3D '@0@-' + group_name + '.@1@' + module_trace_src =3D [] =20 trace_h =3D custom_target(fmt.format('trace', 'h'), output: fmt.format('trace', 'h'), @@ -38,10 +40,10 @@ foreach c : trace_events_config input: trace_events_file, command: [ tracetool, group, '--format=3Du= st-events-h', '@INPUT@', '@OUTPUT@' ], depend_files: tracetool_depends) - 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'), @@ -52,17 +54,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 module_name !=3D '' + module_trace +=3D { module_name : { 'src' : module_trace_src } } + else + trace_ss.add(module_trace_src) + endif endforeach =20 trace_events_all =3D custom_target('trace-events-all', --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554095; cv=none; d=zohomail.com; s=zohoarc; b=bJ4lrzMu+p3dwhdINlWe1v9XsggugfV35gEet4nnW7LnHK0x3g9nGjkRcIQxokNe+aelqk9x5QaX5nYaFgEVq6bRUJJrx2w9WHg2z1z8/Ab3ceBpptWGMHG1OG1DzXr6K2O02AFY5Qs2e/fWDZMjdIjQbKcjqichZcwxK6+Cbzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554095; 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=BIzAkFblQQyoSZCk5PvWy8jsgPBiIsSm8FqckkOpJNw=; b=i90PY6VNSXm8yliSaiACKqnvCmWmW2g4glwowtB5jQtA0DrDRxDfMObCcuA3uoaYaHohNJWfzVcTJrahRNGbPe2JUweyjKcdX1krFD0b7aIcJ0MU58K/KR3u/hr9ggf8ulMn+dVsQMz1Ra6TYdCv17Ar9PUFFgSu2bdczbu7CWQ= 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 1622554095614479.32883470710397; Tue, 1 Jun 2021 06:28:15 -0700 (PDT) Received: from localhost ([::1]:58790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4RK-00010l-Jy for importer@patchew.org; Tue, 01 Jun 2021 09:28:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OT-0002z9-NB for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4OR-0007ib-1q for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:17 -0400 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-460--ZOS9r2nO_KxG9rs9rcu2Q-1; Tue, 01 Jun 2021 09:25:12 -0400 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 CFF328015F8 for ; Tue, 1 Jun 2021 13:25:11 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CF4C5D751; Tue, 1 Jun 2021 13:25:01 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B0D6918007AE; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553914; 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=BIzAkFblQQyoSZCk5PvWy8jsgPBiIsSm8FqckkOpJNw=; b=aZRCWi2Btf0OsqLmmIMfZ5949D4xPTzceZq1t8LyZL6b43l0iUe20crAzd9NmpAJ9dCjmV o961D2dRqFPZuMrrDIjTz650Zu5+kNa4VZFCpRPkhhoefrBg2IFsFdJazZGtXhAI2DziqF pM7ENyfVa1A3x29/IJBeGOZb+emE3Hc= X-MC-Unique: -ZOS9r2nO_KxG9rs9rcu2Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 09/13] trace/stap: build stap files for modules Date: Tue, 1 Jun 2021 15:24:10 +0200 Message-Id: <20210601132414.432430-10-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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" Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- meson.build | 32 ++++++++++++++++++++++++++++++++ trace/meson.build | 5 +++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 0e1c2f995d79..51fc261a22d3 100644 --- a/meson.build +++ b/meson.build @@ -2020,6 +2020,7 @@ foreach d, list : modules module_ss =3D module_ss.apply(config_all, strict: false) module_trace_cfg =3D module_trace.get(d + '-' + m, {}) module_trace_src =3D module_trace_cfg.get('src', []) + module_trace_evt =3D module_trace_cfg.get('evt', '') 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' @@ -2027,6 +2028,37 @@ foreach d, list : modules else softmmu_mods +=3D sl endif + if 'CONFIG_TRACE_SYSTEMTAP' in config_host and module_trace_evt !=3D= '' + modname =3D d + '-' + m + modlib =3D modname + '.so' + foreach stp: [ + {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_= dir() / modlib, 'install': false}, + {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / qem= u_moddir / modlib, 'install': true}, + {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': ''= , 'install': true}, + {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': tru= e}, + ] + foreach target : target_dirs + config_target =3D config_target_mak[target] + target_name =3D config_target['TARGET_NAME'] + if target.endswith('-softmmu') + custom_target(modname + '-' + target_name + stp['ext'], + input: module_trace_evt, + output: modname + '-' + target_name + stp['ext= '], + install: stp['install'], + install_dir: get_option('datadir') / 'systemta= p/tapset', + command: [ + tracetool, '--group=3Dall', '--format=3D' + = stp['fmt'], + '--binary=3D' + stp['bin'], + '--target-name=3D' + target_name, + '--target-type=3Dsystem', + '--probe-prefix=3Dqemu.system.' + target_nam= e, + '@INPUT@', '@OUTPUT@' + ], + depend_files: tracetool_depends) + endif + endforeach + endforeach + endif else if d =3D=3D 'block' block_ss.add_all(module_ss) diff --git a/trace/meson.build b/trace/meson.build index 834ebaa7cc5f..82332a4a772b 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -16,7 +16,6 @@ endforeach =20 foreach c : trace_events_config trace_events_file =3D c.get('file') - trace_events_files +=3D [ trace_events_file ] module_name =3D c.get('module', '') group_name =3D c.get('group', module_name.underscorify()) group =3D '--group=3D' + group_name @@ -66,9 +65,11 @@ foreach c : trace_events_config genh +=3D trace_dtrace_h endif if enable_modules and module_name !=3D '' - module_trace +=3D { module_name : { 'src' : module_trace_src } } + module_trace +=3D { module_name : { 'src' : module_trace_src, + 'evt' : trace_events_file } } else trace_ss.add(module_trace_src) + trace_events_files +=3D [ trace_events_file ] endif endforeach =20 --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554240; cv=none; d=zohomail.com; s=zohoarc; b=gAicu/0mogH+al5PyvIU8db0qgylPMaASjFJ47Jt6+qIV95JXxNvuKd9peuS8/LlGanwN4hslU7udt9R/ZUJ83SSKtek+OWyEOWyXwd86jfzDro+GK44yxVWwT6kywtNoNCD76G++YInFTX/Dy67NEJwK4IqJdlUMW5SouB74H8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554240; 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=aIGjlP4zYiuoqvPOaNZOrRya+FfzIwSGe7uDHTOC6e4=; b=kz9en6Y4mJI+PBeo0dTf0DQjFPPPevrsYUVppRoXoRAO92+wZkFrj3sX65CQxXfA1d9x3ZSyexfx+CRLwiOGEO99ABg6E5dz4KOukmSTLs3BBdU4MLAe2ejdoftJT5+qWKQ9wLHxD7EUT5kWedT584f5CkeYZVXA63/Q7cGgyZs= 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 1622554240492208.11907977745193; Tue, 1 Jun 2021 06:30:40 -0700 (PDT) Received: from localhost ([::1]:38998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4Tf-0006nP-MR for importer@patchew.org; Tue, 01 Jun 2021 09:30:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Of-0003dx-0C for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Oc-0007ws-AW for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:28 -0400 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-446-SQwD6NXTNUy8CyNPbD06EQ-1; Tue, 01 Jun 2021 09:25:24 -0400 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 500746D4EE for ; Tue, 1 Jun 2021 13:25:23 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5440A60C4A; Tue, 1 Jun 2021 13:25:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C59A518007B3; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553925; 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=aIGjlP4zYiuoqvPOaNZOrRya+FfzIwSGe7uDHTOC6e4=; b=IRUkcDGo2CZPa4BMf3DS/itZq0zWIsukOMV1tkB01jbh4Na5JJ53nDAgQApiTzzPOTTcVB JOdlXYMV8FFAX6YuBUtlbIk0dapmXgdTp+Y4f9DRnq+kYDj9D4wdFV5ZEar9zg891/qyV3 IsxbPfHrbamFLfARjwVct/8r2d6B9k4= X-MC-Unique: SQwD6NXTNUy8CyNPbD06EQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 10/13] meson: move qxl trace events to separate file Date: Tue, 1 Jun 2021 15:24:11 +0200 Message-Id: <20210601132414.432430-11-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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/trace-qxl.h | 1 + hw/display/qxl-render.c | 2 +- hw/display/qxl.c | 2 +- hw/display/meson.build | 4 +++ hw/display/trace-events | 67 ------------------------------------- hw/display/trace-events-qxl | 66 ++++++++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 69 deletions(-) create mode 100644 hw/display/trace-qxl.h create mode 100644 hw/display/trace-events-qxl diff --git a/hw/display/trace-qxl.h b/hw/display/trace-qxl.h new file mode 100644 index 000000000000..aa6355abc34e --- /dev/null +++ b/hw/display/trace-qxl.h @@ -0,0 +1 @@ +#include "trace/trace-hw_display_qxl.h" diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index d28849b12176..7a61a750f5a0 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -22,7 +22,7 @@ #include "qemu/osdep.h" #include "qxl.h" #include "sysemu/runstate.h" -#include "trace.h" +#include "trace-qxl.h" =20 static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect) { diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 6e1f8ff1b2a7..9d936cbac049 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -32,7 +32,7 @@ #include "sysemu/runstate.h" #include "migration/blocker.h" #include "migration/vmstate.h" -#include "trace.h" +#include "trace-qxl.h" =20 #include "qxl.h" =20 diff --git a/hw/display/meson.build b/hw/display/meson.build index e1f473c1dff5..ac98861986d1 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -42,6 +42,10 @@ 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', + '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 e47264af5da1..d9606677a436 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -50,73 +50,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.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554417; cv=none; d=zohomail.com; s=zohoarc; b=TTRQsqeH06teFBzKcnq8ld156cs0gCanwyFUToYoR8sOUJAmCgbLPqD//FJzMDA3Sh3HiT2pIx2lCNQ1FBsApmYT8Ujjl3y697YlYVE4fymaMCL0h207L/ZZ0aO7/cWxlLp3dfFKSrcDF2XjwFHrGuuBM4RIHQQbdPDzKkbwg1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554417; 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=r58GvhxLrmY2dDytrFRmBew30BmoSL5RtB2hkWehbGM=; b=UGaUDe9o4VxRWPkezaZzN3tYLNSaZ0scW/WOlEoSW59m+eGOJeuxrI0DQl7hkGBpwaBaa5E9bPFYsmKvfILk4os+VydZ7jG6slKZ0PE3uW0D9AVdLX1Flg4ES3qKMH9XACDVj2HReDAmPp4NF6k/YhXSoqttrqsYEkpG/BmO5bg= 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 1622554417859789.0993204260883; Tue, 1 Jun 2021 06:33:37 -0700 (PDT) Received: from localhost ([::1]:45886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4WW-0003G5-JY for importer@patchew.org; Tue, 01 Jun 2021 09:33:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Of-0003gY-Mv for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Od-0007yR-Ah for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:29 -0400 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-344-yv-i0tTEM0Gg5CFbvDz1-g-1; Tue, 01 Jun 2021 09:25:24 -0400 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 2F4856D4F4 for ; Tue, 1 Jun 2021 13:25:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 552905C1C4; Tue, 1 Jun 2021 13:25:14 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D492818007B5; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553926; 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=r58GvhxLrmY2dDytrFRmBew30BmoSL5RtB2hkWehbGM=; b=aSbZET7qaDIWbo8Y9mVU01V+FnGTqp1TBp7mYQ0R54BII0MpmutHzj9q8zllz2ST4L5ZaT MhgtesLWiXRlmKSuvRLxMPo5x9Y6nYWEQuOOFUs7fSFIfC2idG0lo3a3+duQ79xZWnk6cM lYRiOahJiLkdcOxI3+8NZC4jsTZ6VGc= X-MC-Unique: yv-i0tTEM0Gg5CFbvDz1-g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 11/13] virtio-gpu: split trace points Date: Tue, 1 Jun 2021 15:24:12 +0200 Message-Id: <20210601132414.432430-12-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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" Create separate trace points for the simple and virgl variants of the virtio-gpu device. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- hw/display/virtio-gpu-virgl.c | 48 +++++++++++++++++------------------ hw/display/trace-events | 30 ++++++++++++++-------- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index 092c6dc380d9..ae48b98382ad 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -28,8 +28,8 @@ static void virgl_cmd_create_resource_2d(VirtIOGPU *g, struct virgl_renderer_resource_create_args args; =20 VIRTIO_GPU_FILL_CMD(c2d); - trace_virtio_gpu_cmd_res_create_2d(c2d.resource_id, c2d.format, - c2d.width, c2d.height); + trace_virtio_gpu_gl_cmd_res_create_2d(c2d.resource_id, c2d.format, + c2d.width, c2d.height); =20 args.handle =3D c2d.resource_id; args.target =3D 2; @@ -52,8 +52,8 @@ static void virgl_cmd_create_resource_3d(VirtIOGPU *g, struct virgl_renderer_resource_create_args args; =20 VIRTIO_GPU_FILL_CMD(c3d); - trace_virtio_gpu_cmd_res_create_3d(c3d.resource_id, c3d.format, - c3d.width, c3d.height, c3d.depth); + trace_virtio_gpu_gl_cmd_res_create_3d(c3d.resource_id, c3d.format, + c3d.width, c3d.height, c3d.depth= ); =20 args.handle =3D c3d.resource_id; args.target =3D c3d.target; @@ -77,7 +77,7 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g, int num_iovs =3D 0; =20 VIRTIO_GPU_FILL_CMD(unref); - trace_virtio_gpu_cmd_res_unref(unref.resource_id); + trace_virtio_gpu_gl_cmd_res_unref(unref.resource_id); =20 virgl_renderer_resource_detach_iov(unref.resource_id, &res_iovs, @@ -94,8 +94,8 @@ static void virgl_cmd_context_create(VirtIOGPU *g, struct virtio_gpu_ctx_create cc; =20 VIRTIO_GPU_FILL_CMD(cc); - trace_virtio_gpu_cmd_ctx_create(cc.hdr.ctx_id, - cc.debug_name); + trace_virtio_gpu_gl_cmd_ctx_create(cc.hdr.ctx_id, + cc.debug_name); =20 virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen, cc.debug_name); @@ -107,7 +107,7 @@ static void virgl_cmd_context_destroy(VirtIOGPU *g, struct virtio_gpu_ctx_destroy cd; =20 VIRTIO_GPU_FILL_CMD(cd); - trace_virtio_gpu_cmd_ctx_destroy(cd.hdr.ctx_id); + trace_virtio_gpu_gl_cmd_ctx_destroy(cd.hdr.ctx_id); =20 virgl_renderer_context_destroy(cd.hdr.ctx_id); } @@ -129,8 +129,8 @@ static void virgl_cmd_resource_flush(VirtIOGPU *g, int i; =20 VIRTIO_GPU_FILL_CMD(rf); - trace_virtio_gpu_cmd_res_flush(rf.resource_id, - rf.r.width, rf.r.height, rf.r.x, rf.r.y= ); + trace_virtio_gpu_gl_cmd_res_flush(rf.resource_id, + rf.r.width, rf.r.height, rf.r.x, rf.= r.y); =20 for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { if (g->parent_obj.scanout[i].resource_id !=3D rf.resource_id) { @@ -148,8 +148,8 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g, int ret; =20 VIRTIO_GPU_FILL_CMD(ss); - trace_virtio_gpu_cmd_set_scanout(ss.scanout_id, ss.resource_id, - ss.r.width, ss.r.height, ss.r.x, ss.r= .y); + trace_virtio_gpu_gl_cmd_set_scanout(ss.scanout_id, ss.resource_id, + ss.r.width, ss.r.height, ss.r.x, s= s.r.y); =20 if (ss.scanout_id >=3D g->parent_obj.conf.max_outputs) { qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout id specified %= d", @@ -194,7 +194,7 @@ static void virgl_cmd_submit_3d(VirtIOGPU *g, size_t s; =20 VIRTIO_GPU_FILL_CMD(cs); - trace_virtio_gpu_cmd_ctx_submit(cs.hdr.ctx_id, cs.size); + trace_virtio_gpu_gl_cmd_ctx_submit(cs.hdr.ctx_id, cs.size); =20 buf =3D g_malloc(cs.size); s =3D iov_to_buf(cmd->elem.out_sg, cmd->elem.out_num, @@ -224,7 +224,7 @@ static void virgl_cmd_transfer_to_host_2d(VirtIOGPU *g, struct virtio_gpu_box box; =20 VIRTIO_GPU_FILL_CMD(t2d); - trace_virtio_gpu_cmd_res_xfer_toh_2d(t2d.resource_id); + trace_virtio_gpu_gl_cmd_res_xfer_toh_2d(t2d.resource_id); =20 box.x =3D t2d.r.x; box.y =3D t2d.r.y; @@ -248,7 +248,7 @@ static void virgl_cmd_transfer_to_host_3d(VirtIOGPU *g, struct virtio_gpu_transfer_host_3d t3d; =20 VIRTIO_GPU_FILL_CMD(t3d); - trace_virtio_gpu_cmd_res_xfer_toh_3d(t3d.resource_id); + trace_virtio_gpu_gl_cmd_res_xfer_toh_3d(t3d.resource_id); =20 virgl_renderer_transfer_write_iov(t3d.resource_id, t3d.hdr.ctx_id, @@ -266,7 +266,7 @@ virgl_cmd_transfer_from_host_3d(VirtIOGPU *g, struct virtio_gpu_transfer_host_3d tf3d; =20 VIRTIO_GPU_FILL_CMD(tf3d); - trace_virtio_gpu_cmd_res_xfer_fromh_3d(tf3d.resource_id); + trace_virtio_gpu_gl_cmd_res_xfer_fromh_3d(tf3d.resource_id); =20 virgl_renderer_transfer_read_iov(tf3d.resource_id, tf3d.hdr.ctx_id, @@ -287,7 +287,7 @@ static void virgl_resource_attach_backing(VirtIOGPU *g, int ret; =20 VIRTIO_GPU_FILL_CMD(att_rb); - trace_virtio_gpu_cmd_res_back_attach(att_rb.resource_id); + trace_virtio_gpu_gl_cmd_res_back_attach(att_rb.resource_id); =20 ret =3D virtio_gpu_create_mapping_iov(g, att_rb.nr_entries, sizeof(att= _rb), cmd, NULL, &res_iovs, &res_niov); @@ -311,7 +311,7 @@ static void virgl_resource_detach_backing(VirtIOGPU *g, int num_iovs =3D 0; =20 VIRTIO_GPU_FILL_CMD(detach_rb); - trace_virtio_gpu_cmd_res_back_detach(detach_rb.resource_id); + trace_virtio_gpu_gl_cmd_res_back_detach(detach_rb.resource_id); =20 virgl_renderer_resource_detach_iov(detach_rb.resource_id, &res_iovs, @@ -329,8 +329,8 @@ static void virgl_cmd_ctx_attach_resource(VirtIOGPU *g, struct virtio_gpu_ctx_resource att_res; =20 VIRTIO_GPU_FILL_CMD(att_res); - trace_virtio_gpu_cmd_ctx_res_attach(att_res.hdr.ctx_id, - att_res.resource_id); + trace_virtio_gpu_gl_cmd_ctx_res_attach(att_res.hdr.ctx_id, + att_res.resource_id); =20 virgl_renderer_ctx_attach_resource(att_res.hdr.ctx_id, att_res.resourc= e_id); } @@ -341,8 +341,8 @@ static void virgl_cmd_ctx_detach_resource(VirtIOGPU *g, struct virtio_gpu_ctx_resource det_res; =20 VIRTIO_GPU_FILL_CMD(det_res); - trace_virtio_gpu_cmd_ctx_res_detach(det_res.hdr.ctx_id, - det_res.resource_id); + trace_virtio_gpu_gl_cmd_ctx_res_detach(det_res.hdr.ctx_id, + det_res.resource_id); =20 virgl_renderer_ctx_detach_resource(det_res.hdr.ctx_id, det_res.resourc= e_id); } @@ -483,7 +483,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, return; } =20 - trace_virtio_gpu_fence_ctrl(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type); + trace_virtio_gpu_gl_fence_ctrl(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.typ= e); virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type); } =20 @@ -500,7 +500,7 @@ static void virgl_write_fence(void *opaque, uint32_t fe= nce) if (cmd->cmd_hdr.fence_id > fence) { continue; } - trace_virtio_gpu_fence_resp(cmd->cmd_hdr.fence_id); + trace_virtio_gpu_gl_fence_resp(cmd->cmd_hdr.fence_id); virtio_gpu_ctrl_response_nodata(g, cmd, VIRTIO_GPU_RESP_OK_NODATA); QTAILQ_REMOVE(&g->fenceq, cmd, next); g_free(cmd); diff --git a/hw/display/trace-events b/hw/display/trace-events index d9606677a436..9c1c972c29c6 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -25,30 +25,38 @@ vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%= dx%d @ %d bpp" # virtio-gpu-base.c virtio_gpu_features(bool virgl) "virgl %d" =20 -# virtio-gpu-3d.c # virtio-gpu.c virtio_gpu_cmd_get_display_info(void) "" virtio_gpu_cmd_get_edid(uint32_t scanout) "scanout %d" virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t= h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uin= t32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h) "res 0x%x, fmt 0x%x, w %d, h %d" -virtio_gpu_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d" virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, siz= e %" PRId64 virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x" virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x" virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x" virtio_gpu_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_xfer_toh_3d(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_xfer_fromh_3d(uint32_t res) "res 0x%x" virtio_gpu_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t x,= uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_cmd_ctx_create(uint32_t ctx, const char *name) "ctx 0x%x, name = %s" -virtio_gpu_cmd_ctx_destroy(uint32_t ctx) "ctx 0x%x" -virtio_gpu_cmd_ctx_res_attach(uint32_t ctx, uint32_t res) "ctx 0x%x, res 0= x%x" -virtio_gpu_cmd_ctx_res_detach(uint32_t ctx, uint32_t res) "ctx 0x%x, res 0= x%x" -virtio_gpu_cmd_ctx_submit(uint32_t ctx, uint32_t size) "ctx 0x%x, size %d" virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const c= har *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x" -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 + +# virtio-gpu-virgl.c +virtio_gpu_gl_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint3= 2_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_gl_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h) "res 0x%x, fmt 0x%x, w %d, h %d" +virtio_gpu_gl_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d" +virtio_gpu_gl_cmd_res_unref(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_back_attach(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_back_detach(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_toh_3d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_fromh_3d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t= x, uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_gl_cmd_ctx_create(uint32_t ctx, const char *name) "ctx 0x%x, na= me %s" +virtio_gpu_gl_cmd_ctx_destroy(uint32_t ctx) "ctx 0x%x" +virtio_gpu_gl_cmd_ctx_res_attach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" +virtio_gpu_gl_cmd_ctx_res_detach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" +virtio_gpu_gl_cmd_ctx_submit(uint32_t ctx, uint32_t size) "ctx 0x%x, size = %d" +virtio_gpu_gl_fence_ctrl(uint64_t fence, uint32_t type) "fence 0x%" PRIx64= ", type 0x%x" +virtio_gpu_gl_fence_resp(uint64_t fence) "fence 0x%" PRIx64 =20 # vga.c vga_std_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x" --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554139; cv=none; d=zohomail.com; s=zohoarc; b=QSp8u+B/a+mhZSH8HQ/mnPsuFYDNuLQjKH7HphikRs1MIGE4h4vaPyvJrH8RbDoETxQ7kRB8Squt/6uLwEZtuZwTDcWeD55lXlvqzTLo7GaztcDKQ2si2VK6otmjJmxW+wZAMdiM9AQkJsHT2MK6wWe/NfwNc2FBfTvXrh7dwVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554139; 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=7as5qAeWLteVagtE7XzCCalzb5tH4oL3W1dF5yWD0cs=; b=YZ+gvnvn6v2GOOiEdr8kWjzZDkNUloYMCIedwRhfpfBldm2rMD2WzBl+udiQw50SGRy9WN1/ESFBhdZOaPMhW0d1l6MAv/W9/WoHzHr2fWjDsfUS3kw9A5qhrpdAlJlREx9lI7QbqkOImRr/yhQjCpDsxw7Arh/GIi8qLUsclxc= 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 162255413935046.475466036757894; Tue, 1 Jun 2021 06:28:59 -0700 (PDT) Received: from localhost ([::1]:33690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4S2-00038n-Iw for importer@patchew.org; Tue, 01 Jun 2021 09:28:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Og-0003kV-R8 for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Oe-000803-KN for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:30 -0400 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-473-EK_C0p0DP7WtlgHGCamxOw-1; Tue, 01 Jun 2021 09:25:26 -0400 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 565558049D4 for ; Tue, 1 Jun 2021 13:25:25 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3DD060C4A; Tue, 1 Jun 2021 13:25:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E8D5C18007B6; Tue, 1 Jun 2021 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553927; 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=7as5qAeWLteVagtE7XzCCalzb5tH4oL3W1dF5yWD0cs=; b=cvXssA/h2L0dPQ0842VMLZ76aVMMMPHTcu0gYXqa+vabwuquNptB2BkdlElSlY0Gi5e1Uh 5MipoBdyAWXFmK7xEldoW2dDw6gWGf51yBusOfdRpLempJzaB5+MWLDpPx7tPue8yBAfKd wPda5EwgPxWsoI/eBGaCoca9QMwWcyc= X-MC-Unique: EK_C0p0DP7WtlgHGCamxOw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 12/13] meson: move virtio trace events to separate file Date: Tue, 1 Jun 2021 15:24:13 +0200 Message-Id: <20210601132414.432430-13-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 virtio-gpu trace events to separate trace-events-virtio file. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- hw/display/trace-virtio.h | 1 + hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu.c | 2 +- hw/display/meson.build | 4 ++++ hw/display/trace-events | 17 ----------------- hw/display/trace-events-virtio | 16 ++++++++++++++++ 6 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 hw/display/trace-virtio.h create mode 100644 hw/display/trace-events-virtio diff --git a/hw/display/trace-virtio.h b/hw/display/trace-virtio.h new file mode 100644 index 000000000000..eb0d7dd8fc9f --- /dev/null +++ b/hw/display/trace-virtio.h @@ -0,0 +1 @@ +#include "trace/trace-hw_display_virtio_gpu.h" diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index dd294276cb38..4c654d5af594 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -17,7 +17,7 @@ #include "migration/blocker.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "trace.h" +#include "trace-virtio.h" =20 void virtio_gpu_base_reset(VirtIOGPUBase *g) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 4d549377cbc1..a7932126e3c7 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -15,7 +15,7 @@ #include "qemu/units.h" #include "qemu/iov.h" #include "ui/console.h" -#include "trace.h" +#include "trace-virtio.h" #include "sysemu/dma.h" #include "sysemu/sysemu.h" #include "hw/virtio/virtio.h" diff --git a/hw/display/meson.build b/hw/display/meson.build index ac98861986d1..645a12a7af99 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -62,6 +62,10 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), = pixman]) virtio_gpu_ss.add(when: 'CONFIG_LINUX', if_true: files('virtio-gpu-udmab= uf.c')) virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-u= ser-gpu.c')) + trace_events_config +=3D { + 'file' : meson.source_root() / 'hw' / 'display' / 'trace-events-virt= io', + 'module' : 'hw-display-virtio-gpu', + } hw_display_modules +=3D {'virtio-gpu': virtio_gpu_ss} =20 virtio_gpu_gl_ss =3D ss.source_set() diff --git a/hw/display/trace-events b/hw/display/trace-events index 9c1c972c29c6..27654aee8799 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -22,23 +22,6 @@ vmware_scratch_read(uint32_t index, uint32_t value) "ind= ex %d, value 0x%x" vmware_scratch_write(uint32_t index, uint32_t value) "index %d, value 0x%x" vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%dx%d @ %d bpp" =20 -# virtio-gpu-base.c -virtio_gpu_features(bool virgl) "virgl %d" - -# virtio-gpu.c -virtio_gpu_cmd_get_display_info(void) "" -virtio_gpu_cmd_get_edid(uint32_t scanout) "scanout %d" -virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t= h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uin= t32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h) "res 0x%x, fmt 0x%x, w %d, h %d" -virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, siz= e %" PRId64 -virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" -virtio_gpu_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t x,= uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const c= har *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x" - # virtio-gpu-virgl.c virtio_gpu_gl_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint3= 2_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" virtio_gpu_gl_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h) "res 0x%x, fmt 0x%x, w %d, h %d" diff --git a/hw/display/trace-events-virtio b/hw/display/trace-events-virtio new file mode 100644 index 000000000000..52d5c5152f79 --- /dev/null +++ b/hw/display/trace-events-virtio @@ -0,0 +1,16 @@ +# virtio-gpu-base.c +virtio_gpu_features(bool virgl) "virgl %d" + +# virtio-gpu.c +virtio_gpu_cmd_get_display_info(void) "" +virtio_gpu_cmd_get_edid(uint32_t scanout) "scanout %d" +virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t= h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uin= t32_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h) "res 0x%x, fmt 0x%x, w %d, h %d" +virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, siz= e %" PRId64 +virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x" +virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x" +virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x" +virtio_gpu_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" +virtio_gpu_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t x,= uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const c= har *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x" --=20 2.31.1 From nobody Sat May 18 18:58:05 2024 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=1622554287; cv=none; d=zohomail.com; s=zohoarc; b=ju7ydCGQIJ2h8LunHKId+Q5XBOxYUksHQ3mX3MmGR1DFRIPHinUb45/9yftIGsX0xHOsjedycbjorlWTzYKLLpvvuaLxYKVwU9pBfGLKDZCd5wOtyjR+8HVX6Qrttmjxk7ZIDVI19Sanj+9jWPKQxMTw+dV5v4kzDejv8GY7I/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622554287; 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=MREGTdfWsC+iEg1iPte2oenSmyrL5qC41bBzh+rI1Uw=; b=RcJfigsbyE2CMZHlyL4hSbwK/iXv5N2E8H9sB3rIla26xlpFRKsAOkxdyfhU05YsQBbjxfwiTl1nleVpVzWNy6PskgclMFd+IeE55P3mgCCSFP9OkJulaVfB+SRJe3n23xssoYzdPj8c+7oQdLoF+Sft1uLHHxqGCmIhsvv4QMc= 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 1622554287845217.63504862327727; Tue, 1 Jun 2021 06:31:27 -0700 (PDT) Received: from localhost ([::1]:41728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo4UQ-0000MJ-JQ for importer@patchew.org; Tue, 01 Jun 2021 09:31:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Oh-0003nJ-Jh for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo4Of-00081N-E7 for qemu-devel@nongnu.org; Tue, 01 Jun 2021 09:25:31 -0400 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-491-5mNAwBv6PMONYKOlL-f54A-1; Tue, 01 Jun 2021 09:25:27 -0400 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 33939189C461 for ; Tue, 1 Jun 2021 13:25:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-84.ams2.redhat.com [10.36.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A6F2361140; Tue, 1 Jun 2021 13:25:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 07F8C18007B9; Tue, 1 Jun 2021 15:24:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622553928; 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=MREGTdfWsC+iEg1iPte2oenSmyrL5qC41bBzh+rI1Uw=; b=ZqI9IbH/xOEei3Nu2u61uxt9sYtgk0V1SHPodZz3fNinypEBCMmIuHJHzakGTXlisKZyzh SV+RH60SMUZr8B3qqaQ76HtR0f9Ifu64h0bSFl88serS/+FJrnB7+aTnmOC3aOIjSQ2dAd 7d7g5YKCb2jorn+i6LwgKapcYN10Ln4= X-MC-Unique: 5mNAwBv6PMONYKOlL-f54A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 13/13] meson: move virtio-gl trace events to separate file Date: Tue, 1 Jun 2021 15:24:14 +0200 Message-Id: <20210601132414.432430-14-kraxel@redhat.com> In-Reply-To: <20210601132414.432430-1-kraxel@redhat.com> References: <20210601132414.432430-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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.371, 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 , "Michael S. Tsirkin" , "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 virtio-gpu-gl trace events to separate trace-events-virtio-gl file. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- hw/display/trace-virtio-gl.h | 1 + hw/display/virtio-gpu-virgl.c | 2 +- hw/display/meson.build | 4 ++++ hw/display/trace-events | 19 ------------------- hw/display/trace-events-virtio-gl | 18 ++++++++++++++++++ 5 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 hw/display/trace-virtio-gl.h create mode 100644 hw/display/trace-events-virtio-gl diff --git a/hw/display/trace-virtio-gl.h b/hw/display/trace-virtio-gl.h new file mode 100644 index 000000000000..7fbccbf8bd77 --- /dev/null +++ b/hw/display/trace-virtio-gl.h @@ -0,0 +1 @@ +#include "trace/trace-hw_display_virtio_gpu_gl.h" diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index ae48b98382ad..16f15ead4c76 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -13,7 +13,7 @@ =20 #include "qemu/osdep.h" #include "qemu/iov.h" -#include "trace.h" +#include "trace-virtio-gl.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-gpu.h" =20 diff --git a/hw/display/meson.build b/hw/display/meson.build index 645a12a7af99..373a0dce7cca 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -71,6 +71,10 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') virtio_gpu_gl_ss =3D ss.source_set() virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL', opengl], if_true: [files('virtio-gpu-gl.c', 'virtio-gpu-virg= l.c'), pixman, virgl]) + trace_events_config +=3D { + 'file' : meson.source_root() / 'hw' / 'display' / 'trace-events-virt= io-gl', + 'module' : 'hw-display-virtio-gpu-gl', + } hw_display_modules +=3D {'virtio-gpu-gl': virtio_gpu_gl_ss} endif =20 diff --git a/hw/display/trace-events b/hw/display/trace-events index 27654aee8799..2127af5a14ef 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -22,25 +22,6 @@ vmware_scratch_read(uint32_t index, uint32_t value) "ind= ex %d, value 0x%x" vmware_scratch_write(uint32_t index, uint32_t value) "index %d, value 0x%x" vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%dx%d @ %d bpp" =20 -# virtio-gpu-virgl.c -virtio_gpu_gl_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint3= 2_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_gl_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h) "res 0x%x, fmt 0x%x, w %d, h %d" -virtio_gpu_gl_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d" -virtio_gpu_gl_cmd_res_unref(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_back_attach(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_back_detach(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_xfer_toh_3d(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_xfer_fromh_3d(uint32_t res) "res 0x%x" -virtio_gpu_gl_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t= x, uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" -virtio_gpu_gl_cmd_ctx_create(uint32_t ctx, const char *name) "ctx 0x%x, na= me %s" -virtio_gpu_gl_cmd_ctx_destroy(uint32_t ctx) "ctx 0x%x" -virtio_gpu_gl_cmd_ctx_res_attach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" -virtio_gpu_gl_cmd_ctx_res_detach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" -virtio_gpu_gl_cmd_ctx_submit(uint32_t ctx, uint32_t size) "ctx 0x%x, size = %d" -virtio_gpu_gl_fence_ctrl(uint64_t fence, uint32_t type) "fence 0x%" PRIx64= ", type 0x%x" -virtio_gpu_gl_fence_resp(uint64_t fence) "fence 0x%" PRIx64 - # 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-virtio-gl b/hw/display/trace-events-vi= rtio-gl new file mode 100644 index 000000000000..1ccb0388917f --- /dev/null +++ b/hw/display/trace-events-virtio-gl @@ -0,0 +1,18 @@ +# virtio-gpu-virgl.c +virtio_gpu_gl_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint3= 2_t h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_gl_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h) "res 0x%x, fmt 0x%x, w %d, h %d" +virtio_gpu_gl_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, ui= nt32_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d" +virtio_gpu_gl_cmd_res_unref(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_back_attach(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_back_detach(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_toh_2d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_toh_3d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_xfer_fromh_3d(uint32_t res) "res 0x%x" +virtio_gpu_gl_cmd_res_flush(uint32_t res, uint32_t w, uint32_t h, uint32_t= x, uint32_t y) "res 0x%x, w %d, h %d, x %d, y %d" +virtio_gpu_gl_cmd_ctx_create(uint32_t ctx, const char *name) "ctx 0x%x, na= me %s" +virtio_gpu_gl_cmd_ctx_destroy(uint32_t ctx) "ctx 0x%x" +virtio_gpu_gl_cmd_ctx_res_attach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" +virtio_gpu_gl_cmd_ctx_res_detach(uint32_t ctx, uint32_t res) "ctx 0x%x, re= s 0x%x" +virtio_gpu_gl_cmd_ctx_submit(uint32_t ctx, uint32_t size) "ctx 0x%x, size = %d" +virtio_gpu_gl_fence_ctrl(uint64_t fence, uint32_t type) "fence 0x%" PRIx64= ", type 0x%x" +virtio_gpu_gl_fence_resp(uint64_t fence) "fence 0x%" PRIx64 --=20 2.31.1