X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=libust%2Fserialize.c;h=d3c8cdb3d54b4dbe5dc97e810243cb705d685680;hb=12e81b07455a1aef2e2bcc73004f14a7b73596fa;hp=4c23e8dd02451d46d6b8de34c418d40e872bc9f3;hpb=7166e240639cec06f4273f65059300f98b5296f6;p=ust.git diff --git a/libust/serialize.c b/libust/serialize.c index 4c23e8d..d3c8cdb 100644 --- a/libust/serialize.c +++ b/libust/serialize.c @@ -32,11 +32,12 @@ #include #include -#include #define _LGPL_SOURCE #include #include +#include +#include #include "buffers.h" #include "tracer.h" //#include "list.h" @@ -50,11 +51,6 @@ enum ltt_type { LTT_TYPE_NONE, }; -static int ust_get_cpu(void) -{ - return sched_getcpu(); -} - #define LTT_ATTRIBUTE_NETWORK_BYTE_ORDER (1<<1) /* @@ -689,10 +685,9 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data, } /* reserve space : header and data */ - ret = ltt_reserve_slot(trace, channel, &transport_data, - data_size, &slot_size, &buf_offset, - &tsc, &rflags, - largest_align, cpu); + ret = ltt_reserve_slot(channel, trace, data_size, largest_align, + cpu, &buf, &slot_size, &buf_offset, + &tsc, &rflags); if (unlikely(ret < 0)) continue; /* buffer full */ @@ -701,8 +696,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data, //ust// buf = ((struct rchan *)channel->trans_channel_data)->buf[cpu]; buf = channel->buf[cpu]; /* Out-of-order write : header and data */ - buf_offset = ltt_write_event_header(trace, - channel, buf, buf_offset, + buf_offset = ltt_write_event_header(channel, buf, buf_offset, eID, data_size, tsc, rflags); ltt_write_event_data(buf, buf_offset, &closure, serialize_private,