From 75c0c026414239919603d6a5a35e333f257368c9 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Fri, 26 Apr 2019 15:21:12 +0200 Subject: Don't pass scope args to _exit trace points When we trace a scope, then we pass the scope args to the _entry trace point. There is no need to do that also for the _exit trace points, it just blows up the trace data for no obvious gain. Any decent tracing consumer can easily find the args for the _exit call by matching it to its _entry call. Note that this is standard practice in trace points, and also done like this in the Linux Kernel trace points for example. Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36 Reviewed-by: Thiago Macieira --- src/corelib/global/qtrace_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qtrace_p.h b/src/corelib/global/qtrace_p.h index 20f2beac98..4cef126bb6 100644 --- a/src/corelib/global/qtrace_p.h +++ b/src/corelib/global/qtrace_p.h @@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE const auto qTraceExit_ ## x ## __COUNTER__ = qScopeGuard([&]() { Q_TRACE(x, __VA_ARGS__); }); # define Q_TRACE_SCOPE(x, ...) \ Q_TRACE(x ## _entry, __VA_ARGS__); \ - Q_TRACE_EXIT(x ## _exit, __VA_ARGS__); + Q_TRACE_EXIT(x ## _exit); # define Q_UNCONDITIONAL_TRACE(x, ...) QtPrivate::do_trace_ ## x(__VA_ARGS__) # define Q_TRACE_ENABLED(x) QtPrivate::trace_ ## x ## _enabled() #else -- cgit v1.2.3