Skip to content

Commit

Permalink
Merge branch 'develop' into modefiy
Browse files Browse the repository at this point in the history
  • Loading branch information
sf1999817 authored Sep 20, 2024
2 parents 4dc6834 + 54a710b commit 9a526ea
Show file tree
Hide file tree
Showing 421 changed files with 47,112 additions and 6,883 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ebpf_cpu_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libbpf-dev clang llvm libelf-dev libpcap-dev gcc-multilib build-essential
sudo apt install -y libbpf-dev clang llvm libelf-dev libpcap-dev gcc-multilib build-essential
git submodule update --init --recursive
- name: Run cpu_watcher
- name: Build cpu_watcher
run: |
cd eBPF_Supermarket/CPU_Subsystem/cpu_watcher/
make
sudo ./cpu_watcher
- name: Run cpu_watcher
run: |
sudo ./eBPF_Supermarket/CPU_Subsystem/cpu_watcher/cpu_watcher
- name: Build test_cpuwatcher
run: |
cd eBPF_Supermarket/CPU_Subsystem/cpu_watcher/test
make
- name: Run test_cpuwatcher
run: |
./eBPF_Supermarket/CPU_Subsystem/cpu_watcher/test/test_cpuwatcher
10 changes: 6 additions & 4 deletions .github/workflows/ebpf_kvm_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Test program execution
- name: Install dependencies
run: |
cd eBPF_Supermarket/kvm_watcher/
make deps
make
- name: Test program execution
continue-on-error: true
run: |
cd eBPF_Supermarket/kvm_watcher/
make
3 changes: 2 additions & 1 deletion .github/workflows/ebpf_mem_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
- name: Run mem_watcher
continue-on-error: true
run: |
cd eBPF_Supermarket/Memory_Subsystem/mem_watcher/
cd eBPF_Supermarket/Memory_Subsystem/vmlinux/x86
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
cd ../../mem_watcher
make
sudo timeout 20 ./mem_watcher
10 changes: 7 additions & 3 deletions .github/workflows/ebpf_net_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ jobs:
cd eBPF_Supermarket/Network_Subsystem/net_manager/
sudo ./configure
sudo make
ifconfig
# run
sudo timeout -s SIGINT 5 ./xdp_loader -d ens33 -S || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo ./xacladm load ens33 ./conf.d/mac_load.conf
sudo xdp-loader unload ens33 --all
cd testenv
sudo ./testenv.sh setup --name veth-basic02
cd ..
sudo timeout -s SIGINT 5 ./netmanager -d eth0 -S || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo ./netmanager -d eth0 -S



7 changes: 7 additions & 0 deletions .github/workflows/ebpf_net_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ jobs:
sudo timeout -s SIGINT 5 ./netwatcher -k || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -k -T || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -I || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -S || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -D || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -M || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -R || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -C || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -T || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
sudo timeout -s SIGINT 5 ./netwatcher -U || if [[ $? != 124 && $? != 0 ]];then exit $?;fi
timeout-minutes: 5
35 changes: 18 additions & 17 deletions .github/workflows/ebpf_stack_analyser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,31 @@ jobs:

- name: Install native lib dependencies
run: |
git submodule update --init --recursive
git submodule update --init --recursive eBPF_Supermarket/lib/ MagicEyes/
sudo apt install clang libelf1 libelf-dev zlib1g-dev
- name: Run app with native lib
- name: Compile test examples
run: |
cd eBPF_Supermarket/Stack_Analyser/testdir
gcc -o ./usdt_pthread -lpthread ./usdt_pthread.c
gcc -o ./uprobe_malloc ./uprobe_malloc.c
- name: Compile and run app with native lib
run: |
cd eBPF_Supermarket/Stack_Analyser
make
gcc -o ./testdir/usdt_pthread ./testdir/usdt_pthread.c
sudo ./stack_analyzer on_cpu off_cpu memleak io readahead llc_stat probe u:pthread:pthread_create -c "./testdir/usdt_pthread" -t 5
magic-eyes-build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
make -j$(nproc)
- name: Install native lib dependencies
run: |
git submodule update --init --recursive
sudo apt install clang libelf1 libelf-dev zlib1g-dev
sudo ./stack_analyzer on_cpu off_cpu memleak io readahead llc_stat probe "vfs_open" probe "t:sched:sched_switch" -d 5
sudo ./stack_analyzer probe "u:pthread:pthread_create" -c "./testdir/usdt_pthread" -d 5
sudo ./stack_analyzer probe "c:malloc" -c "./testdir/uprobe_malloc" -d 5
- name: Run app with native lib
- name: Compile and run MagicEyes app with native lib
run: |
mkdir -p MagicEyes/build
cd MagicEyes/build
cmake -DBUILD_STACK_ANALYZER=ON ..
make
sudo ./src/backend/system_diagnosis/stack_analyzer/stack_analyzer on_cpu off_cpu memleak io readahead llc_stat probe u:pthread:pthread_create -c "../../eBPF_Supermarket/Stack_Analyser/testdir/usdt_pthread" -t 5
make -j$(nproc)
sudo ./src/backend/system_diagnosis/stack_analyzer/stack_analyzer on_cpu off_cpu memleak io readahead llc_stat probe "p::vfs_open" probe "t:sched:sched_switch" -d 5
sudo ./src/backend/system_diagnosis/stack_analyzer/stack_analyzer probe "u:pthread:pthread_create" -c "../../eBPF_Supermarket/Stack_Analyser/testdir/usdt_pthread" -d 5
sudo ./src/backend/system_diagnosis/stack_analyzer/stack_analyzer probe "c:malloc" -c "../../eBPF_Supermarket/Stack_Analyser/testdir/uprobe_malloc" -d 5
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/controller
# Stack_Analyser
eBPF_Supermarket/Stack_Analyser/stack_analyzer
eBPF_Supermarket/Stack_Analyser/exporter/exporter
eBPF_Supermarket/Stack_Analyser/bpf_skel
eBPF_Supermarket/Stack_Analyser/bpf_skel
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
[submodule "eBPF_Supermarket/CPU_Subsystem/libbpf"]
path = eBPF_Supermarket/CPU_Subsystem/libbpf
url = https://github.com/libbpf/libbpf.git
[submodule "eBPF_Supermarket/Stack_Analyser/libbpf-bootstrap"]
path = eBPF_Supermarket/Stack_Analyser/libbpf-bootstrap
url = https://github.com/libbpf/libbpf-bootstrap.git
[submodule "eBPF_Supermarket/Network_Subsystem/net_manager/lib/libbpf"]
path = eBPF_Supermarket/Network_Subsystem/net_manager/lib/libbpf
url = https://github.com/libbpf/libbpf.git
Expand All @@ -73,3 +70,9 @@
[submodule "eBPF_Supermarket/Memory_Subsystem/bpftool"]
path = eBPF_Supermarket/Memory_Subsystem/bpftool
url = https://github.com/libbpf/bpftool.git
[submodule "eBPF_Supermarket/lib/bpftool"]
path = eBPF_Supermarket/lib/bpftool
url = https://github.com/libbpf/bpftool.git
[submodule "eBPF_Supermarket/lib/libbpf"]
path = eBPF_Supermarket/lib/libbpf
url = https://github.com/libbpf/libbpf.git
Loading

0 comments on commit 9a526ea

Please sign in to comment.