hw/tpm: Make TRACE_TPM_UTIL_SHOW_BUFFER check local to tpm_util.c
commitf670a562af4bd6ef9adee7654cf5129f14a277a8
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 12 Jun 2020 08:54:40 +0000 (12 10:54 +0200)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 19 Jun 2020 11:25:31 +0000 (19 07:25 -0400)
treebd3fd3cbfbca18d510a6fadaf85dda78b07b6fa1
parent680725651799e4f1c74a29b6fc5813708c786747
hw/tpm: Make TRACE_TPM_UTIL_SHOW_BUFFER check local to tpm_util.c

The trace_event_get_state_backends() call is useful to avoid
making extensive calls (usually preparing arguments passed to
the tracing framework. In this case, the extensive work is
done in tpm_util_show_buffer(), and the arguments used to
call it don't involve extra processing. Simplify by moving
the TRACE_TPM_UTIL_SHOW_BUFFER check to tpm_util_show_buffer.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20200612085444.8362-9-philmd@redhat.com
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
hw/tpm/tpm_tis_common.c
hw/tpm/tpm_util.c