Skip to content
  • Denis V. Lunev's avatar
    bd6952a3
    monitor: Reduce handle_qmp_command() tracing overhead · bd6952a3
    Denis V. Lunev authored
    
    
    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.
    
    [Commit message and description suggested by Markus Armbruster to
    provide more detail about the rationale for this patch.
    
    Use trace_event_get_state_backends() instead of trace_event_get_state()
    to honor DTrace/UST backend dstates.
    --Stefan]
    
    Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-id: 20170725143923.11241-1-den@openvz.org
    CC: Stefan Hajnoczi <stefanha@redhat.com>
    CC: Lluís Vilanova <vilanova@ac.upc.edu>
    CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
    CC: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    bd6952a3
    monitor: Reduce handle_qmp_command() tracing overhead
    Denis V. Lunev authored
    
    
    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.
    
    [Commit message and description suggested by Markus Armbruster to
    provide more detail about the rationale for this patch.
    
    Use trace_event_get_state_backends() instead of trace_event_get_state()
    to honor DTrace/UST backend dstates.
    --Stefan]
    
    Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-id: 20170725143923.11241-1-den@openvz.org
    CC: Stefan Hajnoczi <stefanha@redhat.com>
    CC: Lluís Vilanova <vilanova@ac.upc.edu>
    CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
    CC: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Loading