Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AFE9C433EF for ; Wed, 27 Oct 2021 09:42:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7580860EDF for ; Wed, 27 Oct 2021 09:42:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7580860EDF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eik.bme.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:54678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mffSD-0007tx-BF for qemu-devel@archiver.kernel.org; Wed, 27 Oct 2021 05:42:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mffQK-0006w4-9f for qemu-devel@nongnu.org; Wed, 27 Oct 2021 05:40:44 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:39586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mffQG-0001fK-93 for qemu-devel@nongnu.org; Wed, 27 Oct 2021 05:40:41 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 5148F756036; Wed, 27 Oct 2021 11:40:37 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 322B575603A; Wed, 27 Oct 2021 11:40:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id 302B3748F58; Wed, 27 Oct 2021 11:40:37 +0200 (CEST) Date: Wed, 27 Oct 2021 11:40:37 +0200 (CEST) From: BALATON Zoltan To: Richard Henderson Subject: Re: [PATCH 3/6] hw/sh4: Change debug printfs to traces In-Reply-To: Message-ID: References: <031a5111bb1ef1e66fd8f05fbe4a5ecbbcb25396.1635298341.git.balaton@eik.bme.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Magnus Damm , qemu-devel@nongnu.org, Yoshinori Sato Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, 26 Oct 2021, Richard Henderson wrote: > On 10/26/21 6:32 PM, BALATON Zoltan wrote: >> + trace_sh_serial("write", size, offs, val); >> switch (offs) { >> case 0x00: /* SMR */ >> s->smr = val & ((s->feat & SH_SERIAL_FEAT_SCIF) ? 0x7b : 0xff); >> @@ -302,10 +298,7 @@ static uint64_t sh_serial_read(void *opaque, hwaddr >> offs, >> break; >> } >> } >> -#ifdef DEBUG_SERIAL >> - printf("sh_serial: read offs=0x%02x val=0x%x\n", >> - offs, ret); >> -#endif >> + trace_sh_serial("read ", size, offs, ret); > > I suggest two separate sh_serial_{read,write} tracepoints. Thought about that but it's unlikely one would only want to trace one direction, more likely to want all access to the device. But if it's a requirement I can split this into separate _read and _write. Regards, BALATON Zoltan