diff mbox

[v2,1/2] qapi: add missing trace_visit_type_enum() call

Message ID 20170126171613.1399-2-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi Jan. 26, 2017, 5:16 p.m. UTC
A trace event exists for enums but it's never called.  This patch fixes
this oversight so that enums are traced just like the other QAPI types.

Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 qapi/qapi-visit-core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake Jan. 26, 2017, 5:49 p.m. UTC | #1
On 01/26/2017 11:16 AM, Stefan Hajnoczi wrote:
> A trace event exists for enums but it's never called.  This patch fixes
> this oversight so that enums are traced just like the other QAPI types.
> 
> Suggested-by: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  qapi/qapi-visit-core.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
> index 63bd97b..e6e93f0 100644
> --- a/qapi/qapi-visit-core.c
> +++ b/qapi/qapi-visit-core.c
> @@ -374,6 +374,7 @@ void visit_type_enum(Visitor *v, const char *name, int *obj,
>                       const char *const strings[], Error **errp)
>  {
>      assert(obj && strings);
> +    trace_visit_type_enum(v, name, obj);
>      switch (v->type) {
>      case VISITOR_INPUT:
>          input_type_enum(v, name, obj, strings, errp);
>
diff mbox

Patch

diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 63bd97b..e6e93f0 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -374,6 +374,7 @@  void visit_type_enum(Visitor *v, const char *name, int *obj,
                      const char *const strings[], Error **errp)
 {
     assert(obj && strings);
+    trace_visit_type_enum(v, name, obj);
     switch (v->type) {
     case VISITOR_INPUT:
         input_type_enum(v, name, obj, strings, errp);