Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
X-Lap
Commits
96a298a8
Commit
96a298a8
authored
Feb 16, 2018
by
Andreas Schmidt
Browse files
Add evaluation code and data for NSDI'18.
parent
7817e094
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
notebook.ipynb
View file @
96a298a8
This diff is collapsed.
Click to expand it.
nsdi2018/results/2018_02_14_12_57_01_receiver.csv
0 → 100644
View file @
96a298a8
This diff is collapsed.
Click to expand it.
nsdi2018/results/2018_02_14_12_57_01_sender.csv
0 → 100644
View file @
96a298a8
This diff is collapsed.
Click to expand it.
nsdi2018/xlap.yml
0 → 100644
View file @
96a298a8
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
xlap.c
View file @
96a298a8
...
...
@@ -24,7 +24,8 @@ static inline unsigned long long timestampByTime(struct timespec *ts)
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);
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
);
PP_foreach
(
PP_join_space
,
OUT
,
TIMESTAMP_ID_LIST
)
fprintf
(
out
,
"
\n
"
);
...
...
xlap.h
View file @
96a298a8
...
...
@@ -10,11 +10,11 @@
* might remain zero
*/
typedef
union
XlapTimestamp
{
struct
XlapActualTimestamp
{
uint64_t
c
;
struct
timespec
t
;
}
actual
;
char
_cacheline
[
64
];
struct
XlapActualTimestamp
{
uint64_t
c
;
struct
timespec
t
;
}
actual
;
char
_cacheline
[
64
];
}
XlapTimestamp
;
#include
"pp.h"
...
...
@@ -23,27 +23,29 @@ typedef union XlapTimestamp {
* Comma-separated list of timestamp IDs
*/
#define TIMESTAMP_ID_LIST \
PrrtSendStart, \
PrrtSendEnd, \
PrrtSubmitPackage, \
PrrtEncodeStart, \
PrrtEncodeEnd, \
PrrtTransmitStart, \
PrrtTransmitEnd, \
LinkTransmitStart, \
LinkTransmitEnd, \
LinkReceive, \
DecodeStart, \
DecodeEnd, \
HandlePacketStart, \
HandlePacketEnd, \
CopyOutputStart, \
CopyOutputEnd, \
SendFeedbackStart, \
SendFeedbackEnd, \
PrrtReturnPackage, \
PrrtReceivePackage, \
PrrtDeliver \
PrrtSendStart, \
PrrtSendEnd, \
PrrtSubmitPackage, \
PrrtEncodeStart, \
PrrtEncodeEnd, \
PrrtTransmitStart, \
PrrtTransmitEnd, \
LinkTransmitStart, \
LinkTransmitEnd, \
ChannelTransmit, \
ChannelReceive, \
LinkReceive, \
DecodeStart, \
DecodeEnd, \
HandlePacketStart, \
HandlePacketEnd, \
CopyOutputStart, \
CopyOutputEnd, \
SendFeedbackStart, \
SendFeedbackEnd, \
PrrtReturnPackage, \
PrrtReceivePackage, \
PrrtDeliver \
#define TIMESSTAMP_ID_TO_NAME(id) ts_##id
...
...
@@ -51,24 +53,24 @@ typedef union XlapTimestamp {
* enum containing all timestamp IDs
*/
typedef
enum
XlapTimestampId
{
PP_foreach
(
PP_join_comma
,
TIMESSTAMP_ID_TO_NAME
,
TIMESTAMP_ID_LIST
),
ts_count
PP_foreach
(
PP_join_comma
,
TIMESSTAMP_ID_TO_NAME
,
TIMESTAMP_ID_LIST
),
ts_count
}
XlapTimestampId
;
/*
* enum to distinguish between data and redundancy packet timstamps
*/
typedef
enum
XlapTimestampPacketKind
{
ts_data_packet
=
0
,
ts_any_packet
=
0
,
ts_redundancy_packet
=
1
,
ts_data_packet
=
0
,
ts_any_packet
=
0
,
ts_redundancy_packet
=
1
,
}
XlapTimestampPacketKind
;
/*
* Table that stores timestamps for each timestamp ID
*/
typedef
struct
XlapTimestampTableRow
{
XlapTimestamp
time
[
ts_count
];
XlapTimestamp
time
[
ts_count
];
}
XlapTimestampTableRow
;
/*
...
...
@@ -82,23 +84,65 @@ typedef struct XlapTimestampTableRow {
* Table that stores timestamp table rows
*/
#ifdef XLAP
typedef
struct
XlapTimestampTable
{
XlapTimestampTableRow
rows
[
TS_ROWS
];
}
XlapTimestampTable
;
typedef
struct
XlapTimestampTable
{
XlapTimestampTableRow
rows
[
TS_ROWS
];
}
XlapTimestampTable
;
#else
/* XLAP */
typedef
char
XlapTimestampTable
;
typedef
char
XlapTimestampTable
;
#endif
/*
* Dummy data structure to store a single timestamp table row.
*/
#ifdef XLAP
typedef
struct
XlapTimestampPlaceholder
{
_Atomic
(
XlapTimestampTable
*
)
tstable
[
1
];
XlapTimestampTableRow
rows
[
1
];
}
XlapTimestampPlaceholder
;
typedef
struct
XlapTimestampPlaceholder
{
_Atomic
(
XlapTimestampTable
*
)
tstable
[
1
];
XlapTimestampTableRow
rows
[
1
];
}
XlapTimestampPlaceholder
;
#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
/*
...
...
@@ -109,15 +153,15 @@ typedef struct XlapTimestampTableRow {
*/
#ifdef XLAP
# 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); \
} while (0)
clock_gettime(CLOCK_MONOTONIC, &atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.t); \
} while (0)
#else
/* XLAP */
# define XlapTimeStampClock(sck, kind, seqno, id) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
#endif
...
...
@@ -129,15 +173,15 @@ typedef struct XlapTimestampTableRow {
*/
#ifdef XLAP
# 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(); \
} while (0)
atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire)->rows[(seqno) % TS_ROWS].time[ts_##id].actual.c = __builtin_ia32_rdtsc(); \
} while (0)
#else
/* XLAP */
# define XlapTimeStampCycle(sck, kind, seqno, id) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
#endif
...
...
@@ -146,16 +190,16 @@ typedef struct XlapTimestampTableRow {
*/
#ifdef XLAP
# define XlapTimestampTableInstall(sck, kind, tstp) do { \
XlapTimestampTable *__tstp = (tstp); \
memset(__tstp, 0, sizeof(XlapTimestampTable)); \
atomic_store_explicit(&(sck)->tstable[kind], __tstp, memory_order_release); \
} while (0)
XlapTimestampTable *__tstp = (tstp); \
memset(__tstp, 0, sizeof(XlapTimestampTable)); \
atomic_store_explicit(&(sck)->tstable[kind], __tstp, memory_order_release); \
} while (0)
#else
/* XLAP */
# define XlapTimestampTableInstall(sck, kind, tstp) do { \
(void) (sck); \
(void) (kind); \
(void) (tstp); \
} while (0)
(void) (sck); \
(void) (kind); \
(void) (tstp); \
} while (0)
#endif
...
...
@@ -163,24 +207,24 @@ typedef struct XlapTimestampTableRow {
* print a timestamp dump header
*/
#ifdef XLAP
extern
void
XlapTimestampTableDumpHeader
(
FILE
*
);
extern
void
XlapTimestampTableDumpHeader
(
FILE
*
);
#else
# define XlapTimestampTableDumpHeader(f) do { \
(void) (f); \
} while (0)
(void) (f); \
} while (0)
#endif
/*
* dump a timestamp table
*/
#ifdef XLAP
extern
void
XlapTimestampTableDump
(
FILE
*
,
XlapTimestampPacketKind
,
XlapTimestampTable
*
);
extern
void
XlapTimestampTableDump
(
FILE
*
,
XlapTimestampPacketKind
,
XlapTimestampTable
*
);
#else
# define XlapTimestampTableDump(f, k, t) do { \
(void) (f); \
(void) (k); \
(void) (t); \
} while (0)
(void) (f); \
(void) (k); \
(void) (t); \
} while (0)
#endif
/*
...
...
@@ -188,14 +232,14 @@ typedef struct XlapTimestampTableRow {
*/
#ifdef XLAP
# define XlapTimestampPlaceholderInitialize(ph) do { \
XlapTimestampPlaceholder *__ph = (ph); \
atomic_store_explicit(&__ph->tstable[0], (XlapTimestampTable *) &__ph->rows, memory_order_release); \
memset(&__ph->rows, 0x0, sizeof(XlapTimestampTableRow)); \
} while (0)
XlapTimestampPlaceholder *__ph = (ph); \
atomic_store_explicit(&__ph->tstable[0], (XlapTimestampTable *) &__ph->rows, memory_order_release); \
memset(&__ph->rows, 0x0, sizeof(XlapTimestampTableRow)); \
} while (0)
#else
# define XlapTimestampPlaceholderInitialize(ph) do { \
(void) (ph); \
} while (0)
(void) (ph); \
} while (0)
#endif
/*
...
...
@@ -206,21 +250,21 @@ typedef struct XlapTimestampTableRow {
*/
#ifdef XLAP
# define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \
XlapTimestampPlaceholder *__ph = (ph); \
XlapTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \
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_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; \
} \
} while (0)
XlapTimestampPlaceholder *__ph = (ph); \
XlapTimestampTable *__ts = atomic_load_explicit(&(sck)->tstable[kind], memory_order_acquire); \
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_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; \
} \
} while (0)
#else
# define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ph); \
} while (0)
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ph); \
} while (0)
#endif
#endif // XLAP_H
xlap.yml
View file @
96a298a8
data_files
:
sender
:
"
rtn2017/results/on/2017_03_28_09_33_00_Sender.csv"
receiver
:
"
rtn2017/results/on/2017_03_28_09_33_00_Receiver.csv"
sender
:
"
nsdi2018/results/2018_02_14_12_57_01_sender.csv"
receiver
:
"
nsdi2018/results/2018_02_14_12_57_01_receiver.csv"
threads
:
-
app_send
-
trans_send
-
trans_recv
-
app_recv
cycle_reference
:
send
er
:
app_
send
:
Start
:
PrrtSendStart
Stop
:
PrrtSendEnd
trans_send
:
Start
:
PrrtTransmitStart
Stop
:
LinkTransmitEnd
receiver
:
trans_recv
:
Start
:
LinkReceive
Stop
:
PrrtReturnPackage
app_recv
:
Start
:
PrrtReceivePackage
Stop
:
PrrtDeliver
time_reference
:
...
...
@@ -18,70 +29,98 @@ time_reference:
stamps
:
PrrtSendStart
:
Source
:
sender
Type
:
time
PrrtSendEnd
:
Source
:
sender
Thread
:
app_send
Type
:
time
PrrtSubmitPackage
:
Source
:
sender
Thread
:
app_send
Type
:
cycle
PrrtEncodeStart
:
Source
:
sender
Type
:
cycle
PrrtEncodeEnd
:
PrrtSendEnd
:
Source
:
sender
Type
:
cycle
Thread
:
app_send
Type
:
time
PrrtTransmitStart
:
Source
:
sender
Thread
:
trans_send
Type
:
time
PrrtTransmitEnd
:
Source
:
sender
Thread
:
trans_send
Type
:
cycle
Prrt
Transmit
Start
:
Prrt
Encode
Start
:
Source
:
sender
Thread
:
trans_send
Type
:
cycle
Prrt
Transmit
End
:
Prrt
Encode
End
:
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
Link
Receive
:
Channel
Receive
:
Source
:
receiver
Thread
:
trans_recv
Type
:
time
PrrtDel
ive
r
:
LinkRece
ive
:
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
Type
:
cycle
PrrtReturnPackage
:
Source
:
receiver
Thread
:
app_recv
Type
:
cycle