add cswtch && runqlen #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: libbpf | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay/**' | |
- '.github/workflows/libbpf.yml' | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- 'eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay/**' | |
- '.github/workflows/libbpf.yml' | |
jobs: | |
libbpf-project-build-and-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt install clang libelf1 libelf-dev zlib1g-dev | |
sudo apt install libbpf-dev | |
sudo apt install linux-tools-5.15.0-53-generic | |
sudo apt install linux-cloud-tools-5.15.0-53-generic | |
- name: Run cs_delay | |
run: | | |
cd eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay | |
# sudo bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h | |
clang -g -O2 -target bpf -D__TARGET_ARCH_x86 -I/usr/include/x86_64-linux-gnu -I. -c cs_delay.bpf.c -o cs_delay.bpf.o | |
sudo bpftool gen skeleton cs_delay.bpf.o > cs_delay.skel.h | |
clang -g -O2 -Wall -I . -c cs_delay.c -o cs_delay.o | |
clang -Wall -O2 -g cs_delay.o -static -lbpf -lelf -lz -o cs_delay | |
sudo ./cs_delay |