Add filtering functionality and refactor the codebase #20
Workflow file for this run
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: user_function_tracer | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- "eBPF_Supermarket/User_Function_Tracer/**" | |
- ".github/workflows/user_function_tracer.yml" | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- "eBPF_Supermarket/User_Function_Tracer/**" | |
- ".github/workflows/user_function_tracer.yml" | |
jobs: | |
build-and-run-tracer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y clang cmake ninja-build libelf1 libelf-dev zlib1g-dev libbpf-dev linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) | |
- name: Build and run | |
run: | | |
cd eBPF_Supermarket/User_Function_Tracer | |
mkdir -p vmlinux | |
bash tools/gen_vmlinux_h.sh > vmlinux/vmlinux.h | |
cmake -B build -S . -G Ninja | |
cmake --build build | |
gcc test/sleep.c -o test/sleep | |
gcc test/mmap.c -o test/mmap | |
gcc test/strcpy.c -o test/strcpy | |
gcc test/fib.c -o test/fib | |
gcc test/thread.c -o test/thread | |
sudo build/utrace -c test/sleep | |
sudo build/utrace -c test/mmap | |
sudo build/utrace -c test/strcpy | |
sudo build/utrace -c test/fib | |
sudo build/utrace -c test/thread |