[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/1] monitor: improve tracing in handle_qmp_c
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/1] monitor: improve tracing in handle_qmp_command |
Date: |
Fri, 28 Jul 2017 13:14:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/28/2017 12:01 PM, Markus Armbruster wrote:
> "Denis V. Lunev" <address@hidden> writes:
>
>> Calculate req_json only if trace_handle_qmp_command enabled.
>>
>> Signed-off-by: Denis V. Lunev <address@hidden>
>> CC: Stefan Hajnoczi <address@hidden>
>> CC: LluĂs Vilanova <address@hidden>
>> CC: Dr. David Alan Gilbert <address@hidden>
>> CC: Markus Armbruster <address@hidden>
>> ---
> Conflicts with Eric's commit 8a4613a, but I can resolve that in my tree.
>
> The commit message is too terse. "Improve tracing" makes me think of
> more informative traces, but that's not the case. What exactly is
> improved here?
Reduce overhead when not tracing. Without the patch, we are malloc'ing
a QString and spending CPU cycles on converting a QObject to string,
just for the sake of sticking the string in the trace message - if we
aren't tracing, it's wasted effort.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature