Skip to contentSkip to conversation

TRACE_EVENT: mapping "=" and memcpy to macros

RFC Mathieu Desnoyers 1 participant 1 message Oct 25, 2010 7 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 913BC6918ED247478A38326BC12AAECE04D399B2@ESESSCMS0358.eemea.ericsson.se

A message that is not in the archive (sent off-list or not yet received): 913BC6918ED247478A38326BC12AAECE04D399CF@ESESSCMS0358.eemea.ericsson.se

A message that is not in the archive (sent off-list or not yet received): 913BC6918ED247478A38326BC12AAECE04D39AD7@ESESSCMS0358.eemea.ericsson.se

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20101025171954.GD11891@Krystal

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

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

Signature · 4 lines
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com