[ltt-dev] [RFC] TRACE_EVENT: mapping "=" and memcpy to macros
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Mon Oct 25 13:39:43 EDT 2010
LTTng needs to override the assignment primitives to deal with cross-page
writes. A first step needed to move LTTng to TRACE_EVENT is to introduce the
following macros:
for ftrace and perf:
#define __assign(dest, src) (dest) = (src)
#define __assign_memcpy(dest, src, len) memcpy(dest, src, len)
which would turn (e.g.)
TP_fast_assign(
memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
__entry->pid = t->pid;
),
into
TP_fast_assign(
__assign_memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
__assign(__entry->pid, t->pid);
),
So LTTng (and other tracers) can override these with their own primitives. This
is a basic step required to bring the LTTng tree closer to mainline.
Thoughts ?
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list