From nobody Mon Feb 9 17:22:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590669507; cv=none; d=zohomail.com; s=zohoarc; b=ORSkpDPZ0dH2yPmcvLU6g/xXtTkoDfXIfYqf5WHTM1oPkAmGeLFiyma+58pD5cJWF+qaTarr3cBXxy7SFXGakPnGemeA5WuhYcsjjjT01k0v2MtJE1OsotjalVlHIDy8pOCUorAo/IFRPXTuWSbAu90SYvZJBW9TZgQqTajB9sc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590669507; 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=+afJjiLO1e/ioNxL9yvN1UMqnBe577QM6XrVyi3y+YM=; b=Vwmo5TT3bK4+ZfA7W399rqkqfLrRMytCxxhKIxm6/yF+inUZV4BH/E1T4eN48dU0ctoLMaqbWNCScbEZnvC6dj/AslbtA50NZlWCTxsHygo9F0sN0e5loVE+1rEt3HyVA3SolGiDqJruX12dTKskL1ELiLU5Ll4g9akbVbfS2+E= 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 1590669507592907.0598647811836; Thu, 28 May 2020 05:38:27 -0700 (PDT) Received: from localhost ([::1]:38212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeHnm-00054f-BW for importer@patchew.org; Thu, 28 May 2020 08:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeHlq-0001Uv-RR for qemu-devel@nongnu.org; Thu, 28 May 2020 08:36:26 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:45129 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jeHlp-00059v-CL for qemu-devel@nongnu.org; Thu, 28 May 2020 08:36:26 -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-432-CyMFlhC2MRWfaQ5r7Euz5g-1; Thu, 28 May 2020 08:36:19 -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 D2274474; Thu, 28 May 2020 12:36:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76D147E467; Thu, 28 May 2020 12:36:17 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A502A9D57; Thu, 28 May 2020 14:36:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590669384; 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=+afJjiLO1e/ioNxL9yvN1UMqnBe577QM6XrVyi3y+YM=; b=Mf+tKORfhqdFEv7b8UCiCiJwKKSLlKzXXcxRJlxTvUtmwnZ53AEynaok97GGuL3L8M2nrY Eh32JWJmMcGymK+C74UAigQNy6WnWUo8EhowhjaS96OwDsdRrRAkwpHPlsZ5dUjIXzCVZ/ Gu69gI/USyCqwOlX/47ahZz+mZugC0A= X-MC-Unique: CyMFlhC2MRWfaQ5r7Euz5g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 08/21] hw/display/dpcd: Convert debug printf()s to trace events Date: Thu, 28 May 2020 14:35:56 +0200 Message-Id: <20200528123609.27362-9-kraxel@redhat.com> In-Reply-To: <20200528123609.27362-1-kraxel@redhat.com> References: <20200528123609.27362-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=205.139.110.61; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/28 06:31:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Mitsyanko , Alistair Francis , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20200526062252.19852-9-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- hw/display/dpcd.c | 16 +++------------- hw/display/trace-events | 4 ++++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c index 0c1b7b35fbb4..64463654a1a0 100644 --- a/hw/display/dpcd.c +++ b/hw/display/dpcd.c @@ -32,16 +32,7 @@ #include "hw/misc/auxbus.h" #include "migration/vmstate.h" #include "hw/display/dpcd.h" - -#ifndef DEBUG_DPCD -#define DEBUG_DPCD 0 -#endif - -#define DPRINTF(fmt, ...) do { = \ - if (DEBUG_DPCD) { = \ - qemu_log("dpcd: " fmt, ## __VA_ARGS__); = \ - } = \ -} while (0) +#include "trace.h" =20 #define DPCD_READABLE_AREA 0x600 =20 @@ -70,8 +61,8 @@ static uint64_t dpcd_read(void *opaque, hwaddr offset, un= signed size) offset); ret =3D 0; } + trace_dpcd_read(offset, ret); =20 - DPRINTF("read 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", ret, offset); return ret; } =20 @@ -80,8 +71,7 @@ static void dpcd_write(void *opaque, hwaddr offset, uint6= 4_t value, { DPCDState *e =3D DPCD(opaque); =20 - DPRINTF("write 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", (uint8_t)value, of= fset); - + trace_dpcd_write(offset, value); if (offset < DPCD_READABLE_AREA) { e->dpcd_info[offset] =3D value; } else { diff --git a/hw/display/trace-events b/hw/display/trace-events index bb089a5f5e0c..72d4c9812c69 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -157,3 +157,7 @@ artist_draw_line(unsigned int start_x, unsigned int sta= rt_y, unsigned int end_x, # cg3.c cg3_read(uint32_t addr, uint32_t val, unsigned size) "read addr:0x%06"PRIx= 32" val:0x%08"PRIx32" size:%u" cg3_write(uint32_t addr, uint32_t val, unsigned size) "write addr:0x%06"PR= Ix32" val:0x%08"PRIx32" size:%u" + +# dpcd.c +dpcd_read(uint32_t addr, uint8_t val) "read addr:0x%"PRIx32" val:0x%02x" +dpcd_write(uint32_t addr, uint8_t val) "write addr:0x%"PRIx32" val:0x%02x" --=20 2.18.4