Commit 96a298a8 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Add evaluation code and data for NSDI'18.

parent 7817e094
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
data_files:
sender: "sender.csv"
receiver: "receiver.csv"
threads:
- app_send
- trans_send
- trans_recv
- app_recv
cycle_reference:
app_send:
Start: PrrtSendStart
Stop: PrrtSendEnd
trans_send:
Start: PrrtTransmitStart
Stop: LinkTransmitEnd
trans_recv:
Start: LinkReceive
Stop: PrrtReturnPackage
app_recv:
Start: PrrtReceivePackage
Stop: PrrtDeliver
time_reference:
sender:
Start: PrrtSendStart
Stop: LinkTransmitEnd
receiver:
Start: LinkReceive
Stop: PrrtDeliver
stamps:
PrrtSendStart:
Source: sender
Thread: app_send
Type: time
PrrtSubmitPackage:
Source: sender
Thread: app_send
Type: cycle
PrrtSendEnd:
Source: sender
Thread: app_send
Type: time
PrrtTransmitStart:
Source: sender
Thread: trans_send
Type: time
PrrtTransmitEnd:
Source: sender
Thread: trans_send
Type: cycle
PrrtEncodeStart:
Source: sender
Thread: trans_send
Type: cycle
PrrtEncodeEnd:
Source: sender
Thread: trans_send
Type: cycle
LinkTransmitStart:
Source: sender
Thread: trans_send
Type: cycle
ChannelTransmit:
Source: sender
Thread: trans_send
Type: time
LinkTransmitEnd:
Source: sender
Thread: trans_send
Type: time
ChannelReceive:
Source: receiver
Thread: trans_recv
Type: time
LinkReceive:
Source: receiver
Thread: trans_recv
Type: time
SendFeedbackStart:
Source: receiver
Thread: trans_recv
Type: cycle
SendFeedbackEnd:
Source: receiver
Thread: trans_recv
Type: cycle
DecodeStart:
Source: receiver
Thread: trans_recv
Type: cycle
DecodeEnd:
Source: receiver
Thread: trans_recv
Type: cycle
HandlePacketStart:
Source: receiver
Thread: trans_recv
Type: cycle
HandlePacketEnd:
Source: receiver
Thread: trans_recv
Type: cycle
PrrtReturnPackage:
Source: receiver
Thread: trans_recv
Type: time
PrrtDeliver:
Source: receiver
Thread: app_recv
Type: time
CopyOutputStart:
Source: receiver
Thread: app_recv
Type: cycle
CopyOutputEnd:
Source: receiver
Thread: app_recv
Type: cycle
PrrtReceivePackage:
Source: receiver
Thread: app_recv
Type: time
durations:
Send:
Start: PrrtSendStart
Stop: PrrtSendEnd
Source: sender
PrrtTransmit:
Start: PrrtTransmitStart
Stop: PrrtTransmitEnd
Source: sender
LinkTransmit:
Start: LinkTransmitStart
Stop: LinkTransmitEnd
Source: sender
Submit:
Start: PrrtSendStart
Stop: PrrtSubmitPackage
Source: sender
Enqueue:
Start: PrrtSubmitPackage
Stop: PrrtSendEnd
Source: sender
SenderIPC:
Start: PrrtSubmitPackage
Stop: PrrtTransmitStart
Source: sender
SenderEnqueued:
Start: PrrtSendEnd
Stop: LinkTransmitStart
Source: sender
ReceiverIPC:
Start: PrrtReturnPackage
Stop: PrrtReceivePackage
Source: receiver
HandlePacket:
Start: HandlePacketStart
Stop: HandlePacketEnd
Source: receiver
Feedback:
Start: SendFeedbackStart
Stop: SendFeedbackEnd
Source: receiver
Decoding:
Start: DecodeStart
Stop: DecodeEnd
Source: receiver
packet_types:
Data: 0
Redundancy: 1
...@@ -24,7 +24,8 @@ static inline unsigned long long timestampByTime(struct timespec *ts) ...@@ -24,7 +24,8 @@ static inline unsigned long long timestampByTime(struct timespec *ts)
void XlapTimestampTableDump(FILE *out, XlapTimestampPacketKind kind, XlapTimestampTable *table) void XlapTimestampTableDump(FILE *out, XlapTimestampPacketKind kind, XlapTimestampTable *table)
{ {
# define OUT(id) fprintf(out, ",%llu,%llu", timestampByTime(&table->rows[row].time[ts_##id].actual.t), (unsigned long long) table->rows[row].time[ts_##id].actual.c); # define OUT(id) fprintf(out, ",%llu,%llu", timestampByTime(&table->rows[row].time[ts_##id].actual.t), (unsigned long long) table->rows[row].time[ts_##id].actual.c);
for (unsigned int row = 0; row < TS_ROWS; row++) { // Start at 1 to remove the scratch row 0 from output.
for (unsigned int row = 1; row < TS_ROWS; row++) {
fprintf(out, "%u,%u", row, (unsigned) kind); fprintf(out, "%u,%u", row, (unsigned) kind);
PP_foreach(PP_join_space, OUT, TIMESTAMP_ID_LIST) PP_foreach(PP_join_space, OUT, TIMESTAMP_ID_LIST)
fprintf(out, "\n"); fprintf(out, "\n");
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
* might remain zero * might remain zero
*/ */
typedef union XlapTimestamp { typedef union XlapTimestamp {
struct XlapActualTimestamp { struct XlapActualTimestamp {
uint64_t c; uint64_t c;
struct timespec t; struct timespec t;
} actual; } actual;
char _cacheline[64]; char _cacheline[64];
} XlapTimestamp; } XlapTimestamp;
#include "pp.h" #include "pp.h"
...@@ -23,27 +23,29 @@ typedef union XlapTimestamp { ...@@ -23,27 +23,29 @@ typedef union XlapTimestamp {
* Comma-separated list of timestamp IDs * Comma-separated list of timestamp IDs
*/ */
#define TIMESTAMP_ID_LIST \ #define TIMESTAMP_ID_LIST \
PrrtSendStart, \ PrrtSendStart, \
PrrtSendEnd, \ PrrtSendEnd, \
PrrtSubmitPackage, \ PrrtSubmitPackage, \
PrrtEncodeStart, \ PrrtEncodeStart, \
PrrtEncodeEnd, \ PrrtEncodeEnd, \
PrrtTransmitStart, \ PrrtTransmitStart, \
PrrtTransmitEnd, \ PrrtTransmitEnd, \
LinkTransmitStart, \ LinkTransmitStart, \
LinkTransmitEnd, \ LinkTransmitEnd, \
LinkReceive, \ ChannelTransmit, \
DecodeStart, \ ChannelReceive, \
DecodeEnd, \ LinkReceive, \
HandlePacketStart, \ DecodeStart, \
HandlePacketEnd, \ DecodeEnd, \
CopyOutputStart, \ HandlePacketStart, \
CopyOutputEnd, \ HandlePacketEnd, \
SendFeedbackStart, \ CopyOutputStart, \
SendFeedbackEnd, \ CopyOutputEnd, \
PrrtReturnPackage, \ SendFeedbackStart, \
PrrtReceivePackage, \ SendFeedbackEnd, \
PrrtDeliver \ PrrtReturnPackage, \
PrrtReceivePackage, \
PrrtDeliver \
#define TIMESSTAMP_ID_TO_NAME(id) ts_##id #define TIMESSTAMP_ID_TO_NAME(id) ts_##id
...@@ -51,24 +53,24 @@ typedef union XlapTimestamp { ...@@ -51,24 +53,24 @@ typedef union XlapTimestamp {
* enum containing all timestamp IDs * enum containing all timestamp IDs
*/ */
typedef enum XlapTimestampId { typedef enum XlapTimestampId {
PP_foreach(PP_join_comma, TIMESSTAMP_ID_TO_NAME, TIMESTAMP_ID_LIST), PP_foreach(PP_join_comma, TIMESSTAMP_ID_TO_NAME, TIMESTAMP_ID_LIST),
ts_count ts_count
} XlapTimestampId; } XlapTimestampId;
/* /*
* enum to distinguish between data and redundancy packet timstamps * enum to distinguish between data and redundancy packet timstamps
*/ */
typedef enum XlapTimestampPacketKind { typedef enum XlapTimestampPacketKind {
ts_data_packet = 0, ts_data_packet = 0,
ts_any_packet = 0, ts_any_packet = 0,
ts_redundancy_packet = 1, ts_redundancy_packet = 1,
} XlapTimestampPacketKind; } XlapTimestampPacketKind;
/* /*
* Table that stores timestamps for each timestamp ID * Table that stores timestamps for each timestamp ID
*/ */
typedef struct XlapTimestampTableRow { typedef struct XlapTimestampTableRow {
XlapTimestamp time[ts_count]; XlapTimestamp time[ts_count];
} XlapTimestampTableRow; } XlapTimestampTableRow;
/* /*
...@@ -82,23 +84,65 @@ typedef struct XlapTimestampTableRow { ...@@ -82,23 +84,65 @@ typedef struct XlapTimestampTableRow {
* Table that stores timestamp table rows * Table that stores timestamp table rows
*/ */
#ifdef XLAP #ifdef XLAP
typedef struct XlapTimestampTable { typedef struct XlapTimestampTable {
XlapTimestampTableRow rows[TS_ROWS]; XlapTimestampTableRow rows[TS_ROWS];
} XlapTimestampTable; } XlapTimestampTable;
#else /* XLAP */ #else /* XLAP */
typedef char XlapTimestampTable; typedef char XlapTimestampTable;
#endif #endif
/* /*
* Dummy data structure to store a single timestamp table row. * Dummy data structure to store a single timestamp table row.
*/ */
#ifdef XLAP #ifdef XLAP
typedef struct XlapTimestampPlaceholder { typedef struct XlapTimestampPlaceholder {
_Atomic(XlapTimestampTable *) tstable[1]; _Atomic(XlapTimestampTable *) tstable[1];
XlapTimestampTableRow rows[1]; XlapTimestampTableRow rows[1];
} XlapTimestampPlaceholder; } XlapTimestampPlaceholder;
#else /* XLAP */ #else /* XLAP */
typedef char XlapTimestampPlaceholder; typedef char XlapTimestampPlaceholder;
#endif
/*
* update the clock value of a timestamp by setting an explicit value
*
* This macro will cause a SIGSEGV if the application does not install a
* timestamp table to the socket.
*/
#ifdef XLAP
# define XlapTimeStampValue(sck, kind, seqno, id, value) do { \
atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.t = value; \
} while (0)
#else /* XLAP */
# define XlapTimeStampValue(sck, kind, seqno, id, value) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
(void) (value); \
} while (0)
#endif
/*
* update the clock value of a cyclestamp by setting an explicit value
*
* This macro will cause a SIGSEGV if the application does not install a
* timestamp table to the socket.
*/
#ifdef XLAP
# define XlapCycleStampValue(sck, kind, seqno, id, value) do { \
atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.c = value; \
} while (0)
#else /* XLAP */
# define XlapCycleStampValue(sck, kind, seqno, id, value) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
(void) (value); \
} while (0)
#endif #endif
/* /*
...@@ -109,15 +153,15 @@ typedef struct XlapTimestampTableRow { ...@@ -109,15 +153,15 @@ typedef struct XlapTimestampTableRow {
*/ */
#ifdef XLAP #ifdef XLAP
# define XlapTimeStampClock(sck, kind, seqno, id) do { \ # define XlapTimeStampClock(sck, kind, seqno, id) do { \
clock_gettime(CLOCK_MONOTONIC, &atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.t); \ clock_gettime(CLOCK_MONOTONIC, &atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.t); \
} while (0) } while (0)
#else /* XLAP */ #else /* XLAP */
# define XlapTimeStampClock(sck, kind, seqno, id) do { \ # define XlapTimeStampClock(sck, kind, seqno, id) do { \
(void) (sck); \ (void) (sck); \
(void) (kind); \ (void) (kind); \
(void) (seqno); \ (void) (seqno); \
(void) (ts_##id); \ (void) (ts_##id); \
} while (0) } while (0)
#endif #endif
...@@ -129,15 +173,15 @@ typedef struct XlapTimestampTableRow { ...@@ -129,15 +173,15 @@ typedef struct XlapTimestampTableRow {
*/ */
#ifdef XLAP #ifdef XLAP
# define XlapTimeStampCycle(sck, kind, seqno, id) do { \ # define XlapTimeStampCycle(sck, kind, seqno, id) do { \
atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.c = __builtin_ia32_rdtsc(); \ atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.c = __builtin_ia32_rdtsc(); \
} while (0) } while (0)
#else /* XLAP */ #else /* XLAP */
# define XlapTimeStampCycle(sck, kind, seqno, id) do { \ # define XlapTimeStampCycle(sck, kind, seqno, id) do { \
(void) (sck); \ (void) (sck); \
(void) (kind); \ (void) (kind); \
(void) (seqno); \ (void) (seqno); \
(void) (ts_##id); \ (void) (ts_##id); \
} while (0) } while (0)
#endif #endif
...@@ -146,16 +190,16 @@ typedef struct XlapTimestampTableRow { ...@@ -146,16 +190,16 @@ typedef struct XlapTimestampTableRow {
*/ */
#ifdef XLAP #ifdef XLAP
# define XlapTimestampTableInstall(sck, kind, tstp) do { \ # define XlapTimestampTableInstall(sck, kind, tstp) do { \
XlapTimestampTable *__tstp = (tstp); \ XlapTimestampTable *__tstp = (tstp); \
memset(__tstp, 0, sizeof(XlapTimestampTable)); \ memset(__tstp, 0, sizeof(XlapTimestampTable)); \
atomic_store_explicit(&(sck)->tstable[kind], __tstp, memory_order_release); \ atomic_store_explicit(&(sck)->tstable[kind], __tstp, memory_order_release); \
} while (0) } while (0)
#else /* XLAP */ #else /* XLAP */
# define XlapTimestampTableInstall(sck, kind, tstp) do { \ # define XlapTimestampTableInstall(sck, kind, tstp) do { \
(void) (sck); \ (void) (sck); \
(void) (kind); \ (void) (kind); \
(void) (tstp); \ (void) (tstp); \
} while (0) } while (0)
#endif #endif
...@@ -163,24 +207,24 @@ typedef struct XlapTimestampTableRow { ...@@ -163,24 +207,24 @@ typedef struct XlapTimestampTableRow {
* print a timestamp dump header * print a timestamp dump header
*/ */
#ifdef XLAP #ifdef XLAP
extern void XlapTimestampTableDumpHeader(FILE *); extern void XlapTimestampTableDumpHeader(FILE *);
#else #else
# define XlapTimestampTableDumpHeader(f) do { \ # define XlapTimestampTableDumpHeader(f) do { \
(void) (f); \ (void) (f); \
} while (0) } while (0)
#endif #endif
/* /*
* dump a timestamp table * dump a timestamp table
*/ */
#ifdef XLAP #ifdef XLAP
extern void XlapTimestampTableDump(FILE *, XlapTimestampPacketKind, XlapTimestampTable *); extern void XlapTimestampTableDump(FILE *, XlapTimestampPacketKind, XlapTimestampTable *);
#else #else
# define XlapTimestampTableDump(f, k, t) do { \ # define XlapTimestampTableDump(f, k, t) do { \
(void) (f); \ (void) (f); \
(void) (k); \ (void) (k); \
(void) (t); \ (void) (t); \
} while (0) } while (0)
#endif #endif
/* /*
...@@ -188,14 +232,14 @@ typedef struct XlapTimestampTableRow { ...@@ -188,14 +232,14 @@ typedef struct XlapTimestampTableRow {
*/ */
#ifdef XLAP #ifdef XLAP
# define XlapTimestampPlaceholderInitialize(ph) do { \ # define XlapTimestampPlaceholderInitialize(ph) do { \
XlapTimestampPlaceholder *__ph = (ph); \ XlapTimestampPlaceholder *__ph = (ph); \
atomic_store_explicit(&__ph->tstable[0], (XlapTimestampTable *) &__ph->rows, memory_order_release); \ atomic_store_explicit(&__ph->tstable[0], (XlapTimestampTable *) &__ph->rows, memory_order_release); \
memset(&__ph->rows, 0x0, sizeof(XlapTimestampTableRow)); \ memset(&__ph->rows, 0x0, sizeof(XlapTimestampTableRow)); \
} while (0) } while (0)
#else #else
# define XlapTimestampPlaceholderInitialize(ph) do { \ # define XlapTimestampPlaceholderInitialize(ph) do { \
(void) (ph); \ (void) (ph); \
} while (0) } while (0)
#endif #endif
/* /*
...@@ -206,21 +250,21 @@ typedef struct XlapTimestampTableRow { ...@@ -206,21 +250,21 @@ typedef struct XlapTimestampTableRow {
*/ */
#ifdef XLAP #ifdef XLAP
# define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \ # define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \
XlapTimestampPlaceholder *__ph = (ph); \ XlapTimestampPlaceholder *__ph = (ph); \
XlapTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \ XlapTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \
for (unsigned int __t = 0; __t < ts_count; __t++) { \ for (unsigned int __t = 0; __t < ts_count; __t++) { \
__ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_sec += __ph->rows[0].time[__t].actual.t.tv_sec; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_sec += __ph->rows[0].time[__t].actual.t.tv_sec; \
__ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_nsec += __ph->rows[0].time[__t].actual.t.tv_nsec; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.t.tv_nsec += __ph->rows[0].time[__t].actual.t.tv_nsec; \
__ts->rows[seqno % TS_ROWS].time[__t].actual.c += __ph->rows[0].time[__t].actual.c; \ __ts->rows[seqno % TS_ROWS].time[__t].actual.c += __ph->rows[0].time[__t].actual.c; \
} \ } \
} while (0) } while (0)
#else #else
# define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \ # define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \
(void) (sck); \ (void) (sck); \
(void) (kind); \ (void) (kind); \
(void) (seqno); \ (void) (seqno); \
(void) (ph); \ (void) (ph); \
} while (0) } while (0)
#endif #endif
#endif // XLAP_H #endif // XLAP_H
data_files: data_files:
sender: "rtn2017/results/on/2017_03_28_09_33_00_Sender.csv" sender: "nsdi2018/results/2018_02_14_12_57_01_sender.csv"
receiver: "rtn2017/results/on/2017_03_28_09_33_00_Receiver.csv" receiver: "nsdi2018/results/2018_02_14_12_57_01_receiver.csv"
threads:
- app_send
- trans_send
- trans_recv
- app_recv
cycle_reference: cycle_reference:
sender: app_send:
Start: PrrtSendStart Start: PrrtSendStart
Stop: PrrtSendEnd
trans_send:
Start: PrrtTransmitStart
Stop: LinkTransmitEnd Stop: LinkTransmitEnd
receiver: trans_recv:
Start: LinkReceive
Stop: PrrtReturnPackage
app_recv:
Start: PrrtReceivePackage Start: PrrtReceivePackage
Stop: PrrtDeliver Stop: PrrtDeliver
time_reference: time_reference:
...@@ -18,70 +29,98 @@ time_reference: ...@@ -18,70 +29,98 @@ time_reference:
stamps: stamps:
PrrtSendStart: PrrtSendStart:
Source: sender Source: sender
Type: time Thread: app_send
PrrtSendEnd:
Source: sender
Type: time Type: time
PrrtSubmitPackage: PrrtSubmitPackage:
Source: sender Source: sender
Thread: app_send
Type: cycle Type: cycle
PrrtEncodeStart: PrrtSendEnd:
Source: sender
Type: cycle
PrrtEncodeEnd:
Source: sender Source: sender
Type: cycle Thread: app_send
Type: time
PrrtTransmitStart: PrrtTransmitStart:
Source: sender Source: sender
Thread: trans_send
Type: time
PrrtTransmitEnd:
Source: sender
Thread: trans_send
Type: cycle Type: cycle