qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] ati-vga: Silence some noisy traces
Date: Wed, 21 Aug 2019 11:13:21 +0200	[thread overview]
Message-ID: <20190821091321.tr45eiaqxjm3csvw@sirius.home.kraxel.org> (raw)
In-Reply-To: <489ce252f9d5f902f7d240ff9895e77bb335f1a9.1565907489.git.balaton@eik.bme.hu>

On Fri, Aug 16, 2019 at 12:18:09AM +0200, BALATON Zoltan wrote:
> Some registers are accessed very frequently so exclude these from
> traces to avoid flooding output with a lot of trace logs when traces
> are enabled thus helping debugging.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/display/ati.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/display/ati.c b/hw/display/ati.c
> index 5e2c4ba4aa..36d2a75f71 100644
> --- a/hw/display/ati.c
> +++ b/hw/display/ati.c
> @@ -489,7 +489,14 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, unsigned int size)
>      default:
>          break;
>      }
> -    if (addr < CUR_OFFSET || addr > CUR_CLR1 || ATI_DEBUG_HW_CURSOR) {
> +    if ((addr < CUR_OFFSET || addr > CUR_CLR1 + 3 || (ATI_DEBUG_HW_CURSOR &&
> +        (addr >= CUR_OFFSET && addr <= CUR_CLR1 + 3))) &&
> +        (addr < GEN_INT_CNTL || addr > GEN_INT_STATUS + 3) &&
> +        (addr < GPIO_MONID || addr > GPIO_MONID + 3) &&
> +        (addr < AMCGPIO_MASK_MIR || addr > AMCGPIO_EN_MIR + 3) &&
> +        (addr < 0x908 || addr > 0x90f) && (addr < 0xc4c || addr > 0xc53) &&
> +        addr != RBBM_STATUS && addr != 0x1714 &&
> +        addr != 0x7b8 && addr > MM_DATA + 3) {
>          trace_ati_mm_read(size, addr, ati_reg_name(addr & ~3ULL), val);

I'd suggest to split the trace_ati_mm_read tracepoint, so this can be
tweaked at runtime without patching the source code.

One tracepoint per register is probably a bit over the top.  Grouping
registers by function (i2c, crtc, irq, cursor, ...) looks useful to me.

cheers,
  Gerd



  reply	other threads:[~2019-08-21  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 22:18 [Qemu-devel] [PATCH 0/3] ati-vga fixes for MacOS driver BALATON Zoltan
2019-08-15 22:18 ` [Qemu-devel] [PATCH 2/3] ati-vga: Support unaligned access to hardware cursor registers BALATON Zoltan
2019-08-21  9:08   ` Gerd Hoffmann
2019-08-21 11:18     ` BALATON Zoltan
2019-08-15 22:18 ` [Qemu-devel] [PATCH 3/3] ati-vga: Silence some noisy traces BALATON Zoltan
2019-08-21  9:13   ` Gerd Hoffmann [this message]
2019-08-21 11:22     ` BALATON Zoltan
2019-08-15 22:18 ` [Qemu-devel] [PATCH 1/3] ati-vga: Implement dummy VBlank IRQ BALATON Zoltan
2019-08-21  9:14   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190821091321.tr45eiaqxjm3csvw@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).