Skip to content

Commit

Permalink
Merge branch 'linuxkerneltravel:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzihengya authored Mar 15, 2024
2 parents c72e28b + 642a510 commit 79fd6b2
Show file tree
Hide file tree
Showing 323 changed files with 902,412 additions and 10,637 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/eBPF_FUSE_read.yml

This file was deleted.

59 changes: 2 additions & 57 deletions .github/workflows/ebpf_stack_analyser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,64 +25,9 @@ jobs:
run: |
git submodule update --init --recursive
sudo apt install clang libelf1 libelf-dev zlib1g-dev
sudo cp eBPF_Supermarket/Stack_Analyser/FlameGraph/* /usr/bin/
- name: Run app with native lib
run: |
cd eBPF_Supermarket/Stack_Analyser/libbpf
cd eBPF_Supermarket/Stack_Analyser
make
sudo ./stack_analyzer on-cpu off-cpu mem io ra -t 5
bcc-project-build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Cache BCC build directory
id: cache-bcc
uses: actions/cache@v3
with:
path: bcc
key: ${{ runner.os }}-bcc

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo python -m pip install pyod
sudo python -m pip install psutil
sudo apt-get install -y linux-headers-$(uname -r)
sudo apt-get install -y python-is-python3
sudo apt-get install -y bison build-essential cmake flex git libedit-dev libllvm11 llvm-11-dev libclang-11-dev zlib1g-dev libelf-dev libfl-dev python3-distutils
sudo ln -s /usr/lib/llvm-11 /usr/local/llvm
- name: Build BCC
if: steps.cache-bcc.outputs.cache-hit != 'true'
run: |
wget https://github.com/iovisor/bcc/releases/download/v0.25.0/bcc-src-with-submodule.tar.gz
tar xf bcc-src-with-submodule.tar.gz
cd bcc/
mkdir build
cd build/
cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON_CMD=python3 ..
make
- name: Install BCC
run: |
cd bcc/build/
sudo make install
- name: Run stack_count
run: |
cd eBPF_Supermarket/Stack_Analyser/
sudo bcc/stack_count.py -d -f 5
- name: Run load_monitor
run: |
cd eBPF_Supermarket/Stack_Analyser/
sudo bcc/load_monitor.py -t 5
sudo ./stack_analyzer on-cpu off-cpu mem io ra -t 5
40 changes: 40 additions & 0 deletions .github/workflows/fast_fuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: fast_fuse

on:
push:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Filesystem_Subsystem/fast_fuse/**'
- '.github/workflows/fast_fuse.yml'
pull_request:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Filesystem_Subsystem/fast_fuse/**'
- '.github/workflows/ebpf_FUSE_read.yml'

jobs:
fast_fuse-build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Run fusedemo
run: |
cd eBPF_Supermarket/Filesystem_Subsystem/fast_fuse/fusedemo/
sudo apt update
sudo apt install fuse libfuse-dev meson wget git
wget https://github.com/libfuse/libfuse/releases/download/fuse-3.16.2/fuse-3.16.2.tar.gz
tar -zxvf fuse-3.16.2.tar.gz
mv fuse-3.16.2 libfuse
cd libfuse
cp ../fusedemo.c ./example/
cp ../Makefile ./
rm ./example/meson.build
cp ../meson.build ./example/
make
cd ./build/example/
mkdir ./yourdir
./fusedemo ./yourdir
df -T ./yourdir
39 changes: 39 additions & 0 deletions .github/workflows/magic_eyes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: MagicEyes

on:
push:
branches:
- "*"
paths:
- 'MagicEyes/**'
- '.github/workflows/magic_eyes.yml'
pull_request:
branches:
- "*"
paths:
- 'MagicEyes/**'
- '.github/workflows/magic_eyes.yml'

permissions:
contents: write

jobs:
build-and-run:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Install dependencies and Init Env
run: |
sudo apt update
sudo apt install libbpf-dev clang-14 llvm-14 libelf-dev libpcap-dev gcc-multilib build-essential cmake
git submodule update --init --recursive
- name: Build
run: |
cd MagicEyes/
mkdir build && cd build
cmake -DBUILD_ALL=ON ..
make
make install
45 changes: 45 additions & 0 deletions .github/workflows/net_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: net_manager

on:
push:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Network_Subsystem/net_manager/**'
- '.github/workflows/net_manager.yml'
pull_request:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Network_Subsystem/net_manager/**'
- '.github/workflows/net_manager.yml'

permissions:
contents: write

jobs:
build-and-run:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install dependencies and Init Env
run: |
sudo apt update
sudo apt install clang llvm libelf-dev libpcap-dev build-essential libc6-dev-i386 linux-headers-$(uname -r) linux-tools-common linux-tools-generic
sudo git submodule update --init --recursive
- name: Build and Run
run: |
cd eBPF_Supermarket/Network_Subsystem/net_manager/
sudo ./configure
sudo make
# 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


16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.idea/
.DS_Store
# for MagicEyes
./MagicEyes/build/
./MagicEyes/src-gen/
./MagicEyes/cmake-build-debug/

# local env files
.env.local
Expand Down Expand Up @@ -63,4 +67,14 @@ eBPF_Supermarket/kvm_watcher/**/temp*

# eBPF_proc_image
eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/.output/*
eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/proc_image
eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/proc_image

# libbpf_bootstrap
.output

# eBPF skeletons
*.skel.h

# Stack_Analyser
eBPF_Supermarket/Stack_Analyser/stack_analyzer
eBPF_Supermarket/Stack_Analyser/exporter/exporter
22 changes: 17 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@
[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/libbpf-bootstrap"]
path = eBPF_Supermarket/Stack_Analyser/libbpf/libbpf-bootstrap
[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/Stack_Analyser/speedscope"]
path = eBPF_Supermarket/Stack_Analyser/speedscope
url = https://github.com/jlfwong/speedscope
[submodule "eBPF_Supermarket/Memory_Subsystem/blazesym"]
path = eBPF_Supermarket/Memory_Subsystem/blazesym
url = https://github.com/libbpf/blazesym.git
Expand All @@ -61,3 +58,18 @@
[submodule "eBPF_Supermarket/Memory_Subsystem/libbpf"]
path = eBPF_Supermarket/Memory_Subsystem/libbpf
url = https://github.com/libbpf/libbpf.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
[submodule "eBPF_Supermarket/Network_Subsystem/net_manager/lib/xdp-tools"]
path = eBPF_Supermarket/Network_Subsystem/net_manager/lib/xdp-tools
url = https://github.com/xdp-project/xdp-tools.git
[submodule "MagicEyes/blazesym"]
path = MagicEyes/blazesym
url = https://github.com/libbpf/blazesym.git
[submodule "MagicEyes/bpftool"]
path = MagicEyes/bpftool
url = https://github.com/libbpf/bpftool.git
[submodule "MagicEyes/libbpf"]
path = MagicEyes/libbpf
url = https://github.com/libbpf/libbpf.git
9 changes: 5 additions & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
* @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/Filesystem_Subsystem @13186379707 @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/Network_Subsystem/net_watcher @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/CPU_Subsystem/cpu_watcher @helight @LinkinPF @chenamy2017 @zhangzihengya
/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image @helight @LinkinPF @chenamy2017 @zhangzihengya
/eBPF_Supermarket/Stack_Analyser @helight @LinkinPF @chenamy2017 @GorilaMond
/eBPF_Supermarket/kvm_watcher @helight @LinkinPF @chenamy2017 @nanshuaibo
/eBPF_Supermarket/CPU_Subsystem/cpu_watcher @zhangzihengya @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image @zhangzihengya @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/Stack_Analyser @GorilaMond @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/kvm_watcher @nanshuaibo @helight @LinkinPF @chenamy2017
/eBPF_Supermarket/Memory_Subsystem @helight @LinkinPF @chenamy2017
/MagicEyes @ziyangfu @helight @LinkinPF @chenamy2017
Loading

0 comments on commit 79fd6b2

Please sign in to comment.