diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-07-31 15:07:18 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-08-01 12:13:07 +0100 |
commit | d87aa138039a4be6d705793fd3e397c69c52405a (patch) | |
tree | f0880c8b8daf9469aa4df2c93b256d3f044898ce /docs | |
parent | 3932ef3ffb54baf22ab05767e827bda1834d20df (diff) |
trace: add trace_event_get_state_backends()
Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so
the following trace event will not fire when solely enabled by SystemTap
or LTTng UST:
if (trace_event_get_state(TRACE_MY_EVENT)) {
str = g_strdup_printf("Expensive string to generate ...",
...);
trace_my_event(str);
g_free(str);
}
Add trace_event_get_state_backends() to fetch backend dstate. Those
backends that use QEMU dstate fetch it as part of
generate_h_backend_dstate().
Update existing trace_event_get_state() callers to use
trace_event_get_state_backends() instead.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170731140718.22010-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/devel/tracing.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/devel/tracing.txt b/docs/devel/tracing.txt index 5768a0b7a2..07abbb345c 100644 --- a/docs/devel/tracing.txt +++ b/docs/devel/tracing.txt @@ -353,7 +353,7 @@ guard such computations and avoid its compilation when the event is disabled: } You can check both if the event has been disabled and is dynamically enabled at -the same time using the 'trace_event_get_state' routine (see header +the same time using the 'trace_event_get_state_backends' routine (see header "trace/control.h" for more information). === "tcg" === |