X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libust%2Ftype-serializer.c;h=2c278dfe0f2a9222503e2b20caf80c0119b9e273;hb=8f09cb9340387a52b483752c5d2d6c36035b26bc;hp=3ee54ebab37eedcd41d101017bc8db3dfe53e0f0;hpb=12e81b07455a1aef2e2bcc73004f14a7b73596fa;p=ust.git diff --git a/libust/type-serializer.c b/libust/type-serializer.c index 3ee54eb..2c278df 100644 --- a/libust/type-serializer.c +++ b/libust/type-serializer.c @@ -7,9 +7,13 @@ * * Dual LGPL v2.1/GPL v2 license. */ + +/* This file contains functions for tracepoint custom probes support. */ + #include #include #include +#include #include "tracer.h" notrace @@ -39,7 +43,7 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data, cpu = ust_get_cpu(); /* Force volatile access. */ - STORE_SHARED(ltt_nesting, LOAD_SHARED(ltt_nesting) + 1); + CMM_STORE_SHARED(ltt_nesting, CMM_LOAD_SHARED(ltt_nesting) + 1); /* * asm volatile and "memory" clobber prevent the compiler from moving @@ -48,7 +52,7 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data, * traps, divisions by 0, ...) are triggered within the incremented * nesting count section. */ - barrier(); + cmm_barrier(); eID = mdata->event_id; chan_index = mdata->channel_id; @@ -56,7 +60,7 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data, * Iterate on each trace, typically small number of active traces, * list iteration with prefetch is usually slower. */ - list_for_each_entry_rcu(trace, <t_traces.head, list) { + cds_list_for_each_entry_rcu(trace, <t_traces.head, list) { if (unlikely(!trace->active)) continue; //ust// if (unlikely(!ltt_run_filter(trace, eID))) @@ -105,7 +109,7 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data, * traps, divisions by 0, ...) are triggered within the incremented * nesting count section. */ - barrier(); - STORE_SHARED(ltt_nesting, LOAD_SHARED(ltt_nesting) - 1); + cmm_barrier(); + CMM_STORE_SHARED(ltt_nesting, CMM_LOAD_SHARED(ltt_nesting) - 1); rcu_read_unlock(); }