Eric Blake <[email protected]> writes:
> On 07/28/2017 12:01 PM, Markus Armbruster wrote:
>> "Denis V. Lunev" <[email protected]> writes:
>>
>>> Calculate req_json only if trace_handle_qmp_command enabled.
>>>
>>> Signed-off-by: Denis V. Lunev <[email protected]>
>>> CC: Stefan Hajnoczi <[email protected]>
>>> CC: LluĂs Vilanova <[email protected]>
>>> CC: Dr. David Alan Gilbert <[email protected]>
>>> CC: Markus Armbruster <[email protected]>
>>> ---
>
>> 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.
What about:
monitor: Reduce handle_qmp_command() tracing overhead
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. Wasted when we aren't tracing. Avoid that.
Denis?