trace: fix trace_event_get_state() for SystemTap and LTTng UST
Status from this message: Thanks, applied to my tracing tree:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 8 repliesApplied
- v12 patches 5 repliesSuperseded
Changes in v2 from the cover letter
* Don't special-case QEMU dstate [Daniel Berrange]
* Use _backends() postfix to clarify function purpose [Lluís]
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | trace: add TRACE_<event>_BACKEND_DSTATE()scripts/ scripts/ scripts/ +6 more | +51 | 3 replies | |
| 2/2 | trace: add trace_event_get_state_backends()docs/ hw/ net/ +2 more | +31 | 4 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Daniel P. Berrange |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/2] trace: fix trace_event_get_state() for SystemTap and LTTng UST
v2:
* Don't special-case QEMU dstate [Daniel Berrange]
* Use _backends() postfix to clarify function purpose [Lluís]
Trace events that compute their arguments can affect performance. The following idom can be used to avoid computing arguments when the trace event is disabled:
if (trace_event_get_state(TRACE_MY_EVENT)) {
char *str = g_strdup_printf("Expensive string ...", ...);
trace_my_event(str);
g_free(str);
}Unfortunately this breaks the trace event for SystemTap and LTTng UST since those tracers manage their own enabled/disabled state.
These patches add per-backend dstate to trace_event_get_state() so that the trace event fires as expected when enabled via SystemTap or LTTng UST.
Stefan Hajnoczi (2):
trace: add TRACE_<event>_BACKEND_DSTATE()
trace: add trace_event_get_state_backends()
docs/devel/tracing.txt | 2 +- trace/control.h | 18 +++++++++++++++++- hw/usb/hcd-ohci.c | 13 +++++-------- net/colo-compare.c | 11 ++++++----- net/filter-rewriter.c | 4 ++-- scripts/tracetool/__init__.py | 1 + scripts/tracetool/backend/__init__.py | 3 +++ scripts/tracetool/backend/dtrace.py | 12 ++++++++++++ scripts/tracetool/backend/ftrace.py | 5 +++++ scripts/tracetool/backend/log.py | 5 +++++ scripts/tracetool/backend/simple.py | 5 +++++ scripts/tracetool/backend/syslog.py | 5 +++++ scripts/tracetool/backend/ust.py | 5 +++++ scripts/tracetool/format/h.py | 10 ++++++++++ 14 files changed, 82 insertions(+), 17 deletions(-)
Signature · 1 line
2.13.3