Skip to content

Commit

Permalink
Updates for QuicTrace (microsoft#2804)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Jun 7, 2022
1 parent 9641da7 commit 9beb5ad
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 208 deletions.
16 changes: 12 additions & 4 deletions src/core/packet_builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,11 @@ QuicPacketBuilderFinalize(
goto Exit;
}

QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);

if (Connection->State.HeaderProtectionEnabled) {

uint8_t* PnStart = Payload - Builder->PacketNumberLength;
Expand Down Expand Up @@ -895,6 +900,13 @@ QuicPacketBuilderFinalize(
CXPLAT_DBG_ASSERT(Builder->Key->PacketKey != NULL);
CXPLAT_DBG_ASSERT(Builder->Key->HeaderKey != NULL);
}

} else {

QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);
}

//
Expand All @@ -905,10 +917,6 @@ QuicPacketBuilderFinalize(
Builder->Metadata->SentTime = CxPlatTimeUs32();
Builder->Metadata->PacketLength =
Builder->HeaderLength + PayloadLength;
QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);

QuicTraceEvent(
ConnPacketSent,
Expand Down
36 changes: 18 additions & 18 deletions src/generated/linux/packet_builder.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,24 @@ tracepoint(CLOG_PACKET_BUILDER_C, PacketEncrypt , arg2);\



/*----------------------------------------------------------
// Decoder Ring for PacketFinalize
// [pack][%llu] Finalizing
// QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);
// arg2 = arg2 = Builder->Metadata->PacketId = arg2
----------------------------------------------------------*/
#ifndef _clog_3_ARGS_TRACE_PacketFinalize
#define _clog_3_ARGS_TRACE_PacketFinalize(uniqueId, encoded_arg_string, arg2)\
tracepoint(CLOG_PACKET_BUILDER_C, PacketFinalize , arg2);\

#endif




/*----------------------------------------------------------
// Decoder Ring for ConnErrorStatus
// [conn][%p] ERROR, %u, %s.
Expand All @@ -187,24 +205,6 @@ tracepoint(CLOG_PACKET_BUILDER_C, ConnErrorStatus , arg2, arg3, arg4);\



/*----------------------------------------------------------
// Decoder Ring for PacketFinalize
// [pack][%llu] Finalizing
// QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);
// arg2 = arg2 = Builder->Metadata->PacketId = arg2
----------------------------------------------------------*/
#ifndef _clog_3_ARGS_TRACE_PacketFinalize
#define _clog_3_ARGS_TRACE_PacketFinalize(uniqueId, encoded_arg_string, arg2)\
tracepoint(CLOG_PACKET_BUILDER_C, PacketFinalize , arg2);\

#endif




/*----------------------------------------------------------
// Decoder Ring for ConnPacketSent
// [conn][%p][TX][%llu] %hhu (%hu bytes)
Expand Down
38 changes: 19 additions & 19 deletions src/generated/linux/packet_builder.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,25 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, PacketEncrypt,



/*----------------------------------------------------------
// Decoder Ring for PacketFinalize
// [pack][%llu] Finalizing
// QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);
// arg2 = arg2 = Builder->Metadata->PacketId = arg2
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, PacketFinalize,
TP_ARGS(
unsigned long long, arg2),
TP_FIELDS(
ctf_integer(uint64_t, arg2, arg2)
)
)



/*----------------------------------------------------------
// Decoder Ring for ConnErrorStatus
// [conn][%p] ERROR, %u, %s.
Expand Down Expand Up @@ -181,25 +200,6 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, ConnErrorStatus,



/*----------------------------------------------------------
// Decoder Ring for PacketFinalize
// [pack][%llu] Finalizing
// QuicTraceEvent(
PacketFinalize,
"[pack][%llu] Finalizing",
Builder->Metadata->PacketId);
// arg2 = arg2 = Builder->Metadata->PacketId = arg2
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, PacketFinalize,
TP_ARGS(
unsigned long long, arg2),
TP_FIELDS(
ctf_integer(uint64_t, arg2, arg2)
)
)



/*----------------------------------------------------------
// Decoder Ring for ConnPacketSent
// [conn][%p][TX][%llu] %hhu (%hu bytes)
Expand Down
Loading

0 comments on commit 9beb5ad

Please sign in to comment.