Skip to content

完善基于ebpf观测用户态函数时延项目:利用ptrace机制解决短时间程序的观测 #9

完善基于ebpf观测用户态函数时延项目:利用ptrace机制解决短时间程序的观测

完善基于ebpf观测用户态函数时延项目:利用ptrace机制解决短时间程序的观测 #9

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
sudo build/utrace -c test/sleep
sudo build/utrace -c test/mmap
sudo build/utrace -c test/strcpy