зеркало из https://github.com/microsoft/msquic.git
log_wrapper.sh to convert trace to text (#3271)
This commit is contained in:
Родитель
2d76cf2633
Коммит
bef15dddbb
|
@ -130,17 +130,21 @@ As already indicated, there are lots of ways to collect ETW traces. Feel free to
|
|||
|
||||
## Linux
|
||||
|
||||
This script wraps steps bellows
|
||||
### All in one command
|
||||
This script wraps collecting trace then converting to text as well
|
||||
**WARN**: This wrapper doesn't work with `./scripts/test.ps1` etc. as it is also creating lttng session internally.
|
||||
```
|
||||
./scripts/log_wrapper.sh ${Your binary}
|
||||
```sh
|
||||
cd ${MSQUIC_PATH}
|
||||
./scripts/log_wrapper.sh ${YOUR_COMMAND}
|
||||
# e.g.
|
||||
./scripts/log_wrapper.sh ./artifacts/bin/linux/x64_Debug_openssl/msquictest --gtest_filter=Basic.*
|
||||
ls msquic_lttng0
|
||||
# data quic.babel.txt quic.log
|
||||
```
|
||||
### Step by step command
|
||||
Instead, you can use the following commands:
|
||||
|
||||
To start collecting a trace, you can use the following commands:
|
||||
|
||||
```
|
||||
```sh
|
||||
mkdir msquic_lttng
|
||||
lttng create msquic -o=./msquic_lttng
|
||||
lttng enable-event --userspace "CLOG_*"
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
lttng destroy msquic 2> /dev/null
|
||||
|
||||
dirname="msquic_lttng"
|
||||
num=`find ./* -maxdepth 0 -name "$dirname*" | wc -l`
|
||||
mkdir $dirname$num && lttng create msquic -o=./$dirname$num && sessionCreated=$? && lttng enable-event --userspace "CLOG_*" && lttng add-context --userspace --type=vpid --type=vtid && lttng start
|
||||
dirprefix="msquic_lttng"
|
||||
num=`find ./* -maxdepth 0 -name "$dirprefix*" | wc -l`
|
||||
dirname=$dirprefix$num
|
||||
mkdir -p $dirname/data && lttng create msquic -o=./$dirname/data && sessionCreated=$? && lttng enable-event --userspace "CLOG_*" && lttng add-context --userspace --type=vpid --type=vtid && lttng start
|
||||
if [ $? -eq 0 ]; then
|
||||
$*
|
||||
lttng stop
|
||||
|
@ -12,4 +13,7 @@ fi
|
|||
|
||||
if [ $sessionCreated -eq 0 ]; then
|
||||
lttng destroy msquic
|
||||
|
||||
babeltrace --names all $dirname/data > $dirname/quic.babel.txt
|
||||
${HOME}/.dotnet/tools/clog2text_lttng -i $dirname/quic.babel.txt -s ./src/manifest/clog.sidecar -o $dirname/quic.log --showTimestamp --showCpuInfo
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче