Skip to content

Instantly share code, notes, and snippets.

View perronet's full-sized avatar
🎯
Focusing

Marco Perronet perronet

🎯
Focusing
View GitHub Profile
// Main schema
.symbol_type Modifier
.symbol_type ArrayType
.symbol_type ClassType
.symbol_type InterfaceType
.type ReferenceType = ArrayType | ClassType | InterfaceType
.symbol_type PrimitiveType
.type Type = PrimitiveType | ReferenceType
.decl isType(?t:Type)
.decl isReferenceType(?t:ReferenceType)
@perronet
perronet / gist:e1ffa754ce437a65c4f54bc64603068f
Created October 1, 2021 14:25
breaktrace_resize_buffer
This file has been truncated, but you can view the full file.
Setting buffer size.
T: 0 ( 3714) P:80 I:1000 C: 4944 Min: 13 Act: 2648 Avg: 41 Max: 2648
T: 1 ( 3715) P:80 I:1000 C: 4903 Min: 13 Act: 3605 Avg: 31 Max: 3605
T: 2 ( 3716) P:80 I:1000 C: 4864 Min: 13 Act: 3042 Avg: 30 Max: 3042
T: 3 ( 3717) P:80 I:1000 C: 4827 Min: 13 Act: 3046 Avg: 31 Max: 3046
T: 0 Spike: 2648: TS: 0
T: 1 Spike: 3605: TS: 0
T: 2 Spike: 3042: TS: 0
Start tracing.
Stop tracing.
# /dev/cpu_dma_latency set to 0us
Setting buffer size.
T: 0 ( 1506) P:80 I:1000 C: 10000 Min: 8 Act: 22 Avg: 21 Max: 62
T: 1 ( 1507) P:80 I:1000 C: 9949 Min: 8 Act: 21 Avg: 20 Max: 59
T: 2 ( 1508) P:80 I:1000 C: 9857 Min: 8 Act: 21 Avg: 20 Max: 130
T: 3 ( 1509) P:80 I:1000 C: 9809 Min: 8 Act: 22 Avg: 20 Max: 96
# /dev/cpu_dma_latency set to 0us
Small buffer.
Started cyclictest.
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 2.46 1.32 1.69 1/159 1673
T: 0 ( 1669) P:80 I:1000 C: 69997 Min: 12 Act: 25 Avg: 34 Max: 189
T: 1 ( 1670) P:80 I:1000 C: 69954 Min: 12 Act: 25 Avg: 30 Max: 148
T: 2 ( 1671) P:80 I:1000 C: 69905 Min: 12 Act: 30 Avg: 32 Max: 186
T: 3 ( 1672) P:80 I:1000 C: 69856 Min: 12 Act: 30 Avg: 32 Max: 172
Stopped cyclictest.
Small buffer.
Started cyclictest.
WARN: stat /dev/cpu_dma_latency failed: No such file or directory
policy: fifo: loadavg: 1.25 0.82 0.56 1/130 978
T: 0 ( 974) P:80 I:1000 C: 69983 Min: 13 Act: 43 Avg: 28 Max: 7802
T: 1 ( 975) P:80 I:1000 C: 69837 Min: 12 Act: 27 Avg: 29 Max: 12766
T: 2 ( 976) P:80 I:1000 C: 69869 Min: 13 Act: 35 Avg: 28 Max: 7128
T: 3 ( 977) P:80 I:1000 C: 69929 Min: 13 Act: 27 Avg: 27 Max: 1565
Start tracing.
Stop tracing.
WARN: stat /dev/cpu_dma_latency failed: No such file or directory
Setting buffer size.
T: 0 ( 850) P:80 I:1000 C: 9989 Min: 9 Act: 25 Avg: 24 Max: 10446
T: 1 ( 851) P:80 I:1000 C: 9981 Min: 8 Act: 27 Avg: 22 Max: 1554
T: 2 ( 852) P:80 I:1000 C: 9962 Min: 9 Act: 23 Avg: 22 Max: 2044
T: 3 ( 853) P:80 I:1000 C: 9946 Min: 10 Act: 25 Avg: 22 Max: 1675
#!/bin/bash
CYCLICTEST_LIFETIME=70
TRACING_LIFETIME=90
SPIKE_THRESH=500
# We skip the setup phase and the phase when the buffer is being written into files
sudo echo
echo "Small buffer."
#!/bin/bash
# These actions seem to create wakeup latency spikes
CYCLICTEST_LIFETIME=10
TRACING_LIFETIME=10
SPIKE_THRESH=500
# Setting a small buffer before growing it
echo 1408 | sudo tee /sys/kernel/debug/tracing/buffer_size_kb > /dev/null
#!/bin/bash
# Enter on the cgroup directory
cd /sys/fs/cgroup/cpuset
echo LOG: create an exclusive cpuset and assigned the CPU 0 to it
# Create cpuset groups
rmdir dl-group &> /dev/null
mkdir dl-group
# Restrict the task to the CPU 0
#!/bin/bash
# (RUN WITH SUDO)
# Spawn 2 SCHED_OTHER processes
sleep 10 &
PID1="$!"
sleep 10 &
PID2="$!"
# Print info