зеркало из https://github.com/microsoft/msquic.git
Refactor epoll Send Path (#3274)
This commit is contained in:
Родитель
9b1df5b839
Коммит
250b1dff07
|
@ -98,6 +98,15 @@ $TempDir = $null
|
|||
if ($IsLinux) {
|
||||
$InstanceName = $InstanceName.Replace(".", "_")
|
||||
$TempDir = Join-Path $HOME "QUICLogs" $InstanceName
|
||||
|
||||
try { lttng version | Out-Null }
|
||||
catch {
|
||||
Write-Host "Installing lttng"
|
||||
sudo apt-add-repository ppa:lttng/stable-2.12
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lttng-tools
|
||||
sudo apt-get install -y liblttng-ust-dev
|
||||
}
|
||||
}
|
||||
|
||||
# Start log collection.
|
||||
|
@ -142,21 +151,18 @@ function Log-Start {
|
|||
# Cancels log collection, discarding any logs.
|
||||
function Log-Cancel {
|
||||
if ($IsWindows) {
|
||||
try {
|
||||
wpr.exe -cancel -instancename $InstanceName 2>&1
|
||||
} catch {
|
||||
}
|
||||
$global:LASTEXITCODE = 0
|
||||
try { wpr.exe -cancel -instancename $InstanceName 2>&1 } catch { }
|
||||
} elseif ($IsMacOS) {
|
||||
} else {
|
||||
if (!(Test-Path $TempDir)) {
|
||||
Write-Debug "LTTng session ($InstanceName) not currently running"
|
||||
} else {
|
||||
Invoke-Expression "lttng destroy -n $InstanceName" | Write-Debug
|
||||
Remove-Item -Path $TempDir -Recurse -Force | Out-Null
|
||||
try { Invoke-Expression "lttng destroy -n $InstanceName" | Write-Debug } catch { }
|
||||
try { Remove-Item -Path $TempDir -Recurse -Force | Out-Null } catch { }
|
||||
Write-Debug "Destroyed LTTng session ($InstanceName) and deleted $TempDir"
|
||||
}
|
||||
}
|
||||
$global:LASTEXITCODE = 0
|
||||
}
|
||||
|
||||
# Stops log collection, keeping the logs.
|
||||
|
|
|
@ -29,42 +29,6 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathOpenUdpSocketFailed
|
||||
// [data] UDP send segmentation helper socket failed to open, 0x%x
|
||||
// QuicTraceLogWarning(
|
||||
DatapathOpenUdpSocketFailed,
|
||||
"[data] UDP send segmentation helper socket failed to open, 0x%x",
|
||||
SockError);
|
||||
// arg2 = arg2 = SockError = arg2
|
||||
----------------------------------------------------------*/
|
||||
#ifndef _clog_3_ARGS_TRACE_DatapathOpenUdpSocketFailed
|
||||
#define _clog_3_ARGS_TRACE_DatapathOpenUdpSocketFailed(uniqueId, encoded_arg_string, arg2)\
|
||||
tracepoint(CLOG_DATAPATH_EPOLL_C, DatapathOpenUdpSocketFailed , arg2);\
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathQueryUdpSegmentFailed
|
||||
// [data] Query for UDP_SEGMENT failed, 0x%x
|
||||
// QuicTraceLogWarning(
|
||||
DatapathQueryUdpSegmentFailed,
|
||||
"[data] Query for UDP_SEGMENT failed, 0x%x",
|
||||
SockError);
|
||||
// arg2 = arg2 = SockError = arg2
|
||||
----------------------------------------------------------*/
|
||||
#ifndef _clog_3_ARGS_TRACE_DatapathQueryUdpSegmentFailed
|
||||
#define _clog_3_ARGS_TRACE_DatapathQueryUdpSegmentFailed(uniqueId, encoded_arg_string, arg2)\
|
||||
tracepoint(CLOG_DATAPATH_EPOLL_C, DatapathQueryUdpSegmentFailed , arg2);\
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathRecvEmpty
|
||||
// [data][%p] Dropping datagram with empty payload.
|
||||
|
@ -235,20 +199,20 @@ tracepoint(CLOG_DATAPATH_EPOLL_C, DatapathDestroyed , arg2);\
|
|||
// Decoder Ring for DatapathSend
|
||||
// [data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!
|
||||
// QuicTraceEvent(
|
||||
DatapathSend,
|
||||
"[data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!",
|
||||
SocketContext->Binding,
|
||||
SendData->TotalSize,
|
||||
SendData->BufferCount,
|
||||
SendData->SegmentSize,
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(*RemoteAddress), RemoteAddress),
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(*LocalAddress), LocalAddress));
|
||||
// arg2 = arg2 = SocketContext->Binding = arg2
|
||||
DatapathSend,
|
||||
"[data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!",
|
||||
Socket,
|
||||
SendData->TotalSize,
|
||||
SendData->BufferCount,
|
||||
SendData->SegmentSize,
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(Route->RemoteAddress), &Route->RemoteAddress),
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(Route->LocalAddress), &Route->LocalAddress));
|
||||
// arg2 = arg2 = Socket = arg2
|
||||
// arg3 = arg3 = SendData->TotalSize = arg3
|
||||
// arg4 = arg4 = SendData->BufferCount = arg4
|
||||
// arg5 = arg5 = SendData->SegmentSize = arg5
|
||||
// arg6 = arg6 = CASTED_CLOG_BYTEARRAY(sizeof(*RemoteAddress), RemoteAddress) = arg6
|
||||
// arg7 = arg7 = CASTED_CLOG_BYTEARRAY(sizeof(*LocalAddress), LocalAddress) = arg7
|
||||
// arg6 = arg6 = CASTED_CLOG_BYTEARRAY(sizeof(Route->RemoteAddress), &Route->RemoteAddress) = arg6
|
||||
// arg7 = arg7 = CASTED_CLOG_BYTEARRAY(sizeof(Route->LocalAddress), &Route->LocalAddress) = arg7
|
||||
----------------------------------------------------------*/
|
||||
#ifndef _clog_10_ARGS_TRACE_DatapathSend
|
||||
#define _clog_10_ARGS_TRACE_DatapathSend(uniqueId, encoded_arg_string, arg2, arg3, arg4, arg5, arg6, arg6_len, arg7, arg7_len)\
|
||||
|
|
|
@ -1,44 +1,6 @@
|
|||
|
||||
|
||||
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathOpenUdpSocketFailed
|
||||
// [data] UDP send segmentation helper socket failed to open, 0x%x
|
||||
// QuicTraceLogWarning(
|
||||
DatapathOpenUdpSocketFailed,
|
||||
"[data] UDP send segmentation helper socket failed to open, 0x%x",
|
||||
SockError);
|
||||
// arg2 = arg2 = SockError = arg2
|
||||
----------------------------------------------------------*/
|
||||
TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathOpenUdpSocketFailed,
|
||||
TP_ARGS(
|
||||
unsigned int, arg2),
|
||||
TP_FIELDS(
|
||||
ctf_integer(unsigned int, arg2, arg2)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathQueryUdpSegmentFailed
|
||||
// [data] Query for UDP_SEGMENT failed, 0x%x
|
||||
// QuicTraceLogWarning(
|
||||
DatapathQueryUdpSegmentFailed,
|
||||
"[data] Query for UDP_SEGMENT failed, 0x%x",
|
||||
SockError);
|
||||
// arg2 = arg2 = SockError = arg2
|
||||
----------------------------------------------------------*/
|
||||
TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathQueryUdpSegmentFailed,
|
||||
TP_ARGS(
|
||||
unsigned int, arg2),
|
||||
TP_FIELDS(
|
||||
ctf_integer(unsigned int, arg2, arg2)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------
|
||||
// Decoder Ring for DatapathRecvEmpty
|
||||
// [data][%p] Dropping datagram with empty payload.
|
||||
|
@ -247,20 +209,20 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathDestroyed,
|
|||
// Decoder Ring for DatapathSend
|
||||
// [data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!
|
||||
// QuicTraceEvent(
|
||||
DatapathSend,
|
||||
"[data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!",
|
||||
SocketContext->Binding,
|
||||
SendData->TotalSize,
|
||||
SendData->BufferCount,
|
||||
SendData->SegmentSize,
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(*RemoteAddress), RemoteAddress),
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(*LocalAddress), LocalAddress));
|
||||
// arg2 = arg2 = SocketContext->Binding = arg2
|
||||
DatapathSend,
|
||||
"[data][%p] Send %u bytes in %hhu buffers (segment=%hu) Dst=%!ADDR!, Src=%!ADDR!",
|
||||
Socket,
|
||||
SendData->TotalSize,
|
||||
SendData->BufferCount,
|
||||
SendData->SegmentSize,
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(Route->RemoteAddress), &Route->RemoteAddress),
|
||||
CASTED_CLOG_BYTEARRAY(sizeof(Route->LocalAddress), &Route->LocalAddress));
|
||||
// arg2 = arg2 = Socket = arg2
|
||||
// arg3 = arg3 = SendData->TotalSize = arg3
|
||||
// arg4 = arg4 = SendData->BufferCount = arg4
|
||||
// arg5 = arg5 = SendData->SegmentSize = arg5
|
||||
// arg6 = arg6 = CASTED_CLOG_BYTEARRAY(sizeof(*RemoteAddress), RemoteAddress) = arg6
|
||||
// arg7 = arg7 = CASTED_CLOG_BYTEARRAY(sizeof(*LocalAddress), LocalAddress) = arg7
|
||||
// arg6 = arg6 = CASTED_CLOG_BYTEARRAY(sizeof(Route->RemoteAddress), &Route->RemoteAddress) = arg6
|
||||
// arg7 = arg7 = CASTED_CLOG_BYTEARRAY(sizeof(Route->LocalAddress), &Route->LocalAddress) = arg7
|
||||
----------------------------------------------------------*/
|
||||
TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathSend,
|
||||
TP_ARGS(
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -254,5 +254,6 @@ typedef struct DATAPATH_SQE {
|
|||
#define CXPLAT_CQE_TYPE_WORKER_UPDATE_POLL CXPLAT_CQE_TYPE_QUIC_BASE + 2
|
||||
#define CXPLAT_CQE_TYPE_SOCKET_SHUTDOWN CXPLAT_CQE_TYPE_QUIC_BASE + 3
|
||||
#define CXPLAT_CQE_TYPE_SOCKET_IO CXPLAT_CQE_TYPE_QUIC_BASE + 4
|
||||
#define CXPLAT_CQE_TYPE_SOCKET_FLUSH_TX CXPLAT_CQE_TYPE_QUIC_BASE + 5
|
||||
|
||||
extern CXPLAT_RUNDOWN_REF CxPlatWorkerRundown;
|
||||
|
|
Загрузка…
Ссылка в новой задаче