[RFC] TRACE_EVENT: mapping "=" and memcpy to macros
From: Mathieu Desnoyers
Date: Mon Oct 25 2010 - 13:39:52 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/