- if (qos > pos.fcp_qos) pos.fcp_qos = qos;
- // using these *_INC macros is so that the compiler generates better
- // assembly: using the struct individual fields forces the compiler
- // to handle carry propagations, and we know it won't happen
- pos.fcp_pos += roundup(ft_size + pubsize, 8) *
- FIREHOSE_CHUNK_POS_ENTRY_OFFS_INC;
- pos.fcp_pos -= privsize * FIREHOSE_CHUNK_POS_PRIVATE_OFFS_INC;
- pos.fcp_pos += FIREHOSE_CHUNK_POS_REFCNT_INC;
- const uint16_t minimum_payload_size = 16;
- if (!firehose_chunk_pos_fits(pos,
- roundup(ft_size + minimum_payload_size , 8))) {
- // if we can't even have minimum_payload_size bytes of payload
- // for the next tracepoint, just flush right away
- pos.fcp_flag_full = true;