Skip to content

Commit

Permalink
fix benchmark docs errors and update more instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sy0307 committed Dec 23, 2024
1 parent 4d72459 commit 7b43529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ cmake -Bbuild -DLLVM_DIR=/usr/lib/llvm-15/cmake -DCMAKE_BUILD_TYPE:STRING=RelWit
cmake --build build --config RelWithDebInfo --target install -j
```

If you fail to build , notice LLVM version.

## build and run at a click

Build the agent first. In project root:
Expand Down Expand Up @@ -195,7 +197,7 @@ Tested on `kernel version 6.2` and `Intel(R) Xeon(R) Gold 5418Y` CPU.

### Uprobe and read/write with `bpf_probe_write_user` and `bpf_probe_read_user`

Userspace:
Kernelspace:

```txt
Benchmarking __bench_uprobe_uretprobe in thread 1
Expand Down Expand Up @@ -233,6 +235,8 @@ Benchmarking __bench_write in thread 1
Average time usage 389.037170 ns, iter 100000 times
```

noted that the performance of `bpf_probe_read_user` and `bpf_probe_write_user` will be influenced by the option of `ENABLE_PROBE_WRITE_USER` and `ENABLE_PROBE_READ_USER`.

### maps operations

Run the map op 1000 times in one function. Userspace map op is also faster than the kernel in the current version. Current version is 10x faster than stupid old version.
Expand Down

0 comments on commit 7b43529

Please sign in to comment.