|
From: | Alexander Graf |
Subject: | Re: [Qemu-devel] [PATCH] input: Add trace events for polled keyboard input |
Date: | Thu, 30 Mar 2017 16:12:43 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 03/30/2017 04:00 PM, Gerd Hoffmann wrote:
On Do, 2017-03-30 at 15:35 +0200, Alexander Graf wrote:When driving QEMU from the outside, we have basically no chance to determine how quickly the guest OS picks up key events, so we usually have to limit ourselves to very slow keyboard presses to make sure the guest always has enough chance to pick them up. This patch adds trace events for when the guest polls for HID keyboard events. That way we can be reasonably safely assume that the guest handled that one key event and can type the next.Hmm, I'm wondering why you are tracing the event details? Input layer has tracepoints for this already, so why duplicate this here? Especially as you have to do quite some effort to store the data for tracing?
Because we need to know when the events are off the queue, not pushed onto the queue.
For queue management (in automated testing I assume?) a simple "queue empty" trace point should do the trick, no? Or maybe a "queue has $i of $n slots filled atm" trace points, if you wanna know how much you can pass in without loosing events due to the queue being full.
That's a very good point. In fact, that would make things much much easier for the other side. If we just know "queue is drained", we know we can send new events.
Alex
[Prev in Thread] | Current Thread | [Next in Thread] |