-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: implement Daemon tracing (#49)
* daemon: add handler for events * doc: fix unit test * fix ci * rename to daemon * daemon: add trace for close * enable modify attach target * fix docker * fix ci * Update Makefile * move daemon to project root * rename and update helpers for test --------- Co-authored-by: Littlefisher619 <i@littlefisher.me>
- Loading branch information
1 parent
c0fb4d4
commit e530cc3
Showing
40 changed files
with
1,063 additions
and
544 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
FROM ubuntu:23.04 | ||
WORKDIR /bpftime | ||
RUN apt-get update && apt install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libelf1 libelf-dev zlib1g-dev make cmake git libboost1.74-all-dev \ | ||
binutils-dev libyaml-cpp-dev gcc g++ ca-certificates clang llvm | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
RUN apt-get install -y --no-install-recommends curl && \ | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
COPY . . | ||
RUN git submodule update --init --recursive | ||
ENV CXX=g++ | ||
ENV CC=gcc | ||
ENV PATH="${PATH}:/root/.cargo/bin" | ||
RUN make release && make install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,63 @@ | ||
.PHONY: install coverage test docs help build clean build-arm run-arm run-arm64 build-arm64 build-arm32 | ||
.DEFAULT_GOAL := help | ||
|
||
define BROWSER_PYSCRIPT | ||
import os, webbrowser, sys | ||
|
||
try: | ||
from urllib import pathname2url | ||
except: | ||
from urllib.request import pathname2url | ||
|
||
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | ||
endef | ||
export BROWSER_PYSCRIPT | ||
|
||
define PRINT_HELP_PYSCRIPT | ||
import re, sys | ||
|
||
for line in sys.stdin: | ||
match = re.match(r'^([a-zA-Z\d_-]+):.*?## (.*)$$', line) | ||
if match: | ||
target, help = match.groups() | ||
print("%-20s %s" % (target, help)) | ||
endef | ||
export PRINT_HELP_PYSCRIPT | ||
|
||
BROWSER := python3 -c "$$BROWSER_PYSCRIPT" | ||
INSTALL_LOCATION := ~/.local | ||
|
||
help: | ||
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | ||
|
||
build-unit-test: | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DCMAKE_BUILD_TYPE:STRING=Debug | ||
cmake --build build --config Debug -j --target bpftime_runtime_tests | ||
unit-test: | ||
./build/runtime/unit-test/bpftime_runtime_tests | ||
test: ## test the package | ||
make -C third_party/libbpf/src | ||
make -C runtime/test/bpf | ||
cp -r runtime/test/bpf/* build/runtime/test/ | ||
cd build/runtime && ctest -VV | ||
|
||
build: ## build the package | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 | ||
cmake --build build --config Debug -j | ||
cd tools/cli-rs && cargo build | ||
|
||
release: ## build the package | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=0 -DCMAKE_BUILD_TYPE:STRING=Release | ||
cmake --build build --config Release --target install | ||
cd tools/cli-rs && cargo build | ||
|
||
build-vm: ## build only the core library | ||
make -C vm build | ||
|
||
build-llvm: ## build with llvm as jit backend | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DBPFTIME_LLVM_JIT=1 | ||
cmake --build build --config Debug | ||
|
||
clean: ## clean the project | ||
rm -rf build | ||
make -C runtime clean | ||
make -C vm clean | ||
|
||
install: release ## Invoke cmake to install.. | ||
cd tools/cli-rs && mkdir -p ~/.bpftime && cp ./target/release/bpftime ~/.bpftime | ||
.PHONY: install coverage test docs help build clean build-arm run-arm run-arm64 build-arm64 build-arm32 | ||
.DEFAULT_GOAL := help | ||
|
||
define BROWSER_PYSCRIPT | ||
import os, webbrowser, sys | ||
|
||
try: | ||
from urllib import pathname2url | ||
except: | ||
from urllib.request import pathname2url | ||
|
||
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | ||
endef | ||
export BROWSER_PYSCRIPT | ||
|
||
define PRINT_HELP_PYSCRIPT | ||
import re, sys | ||
|
||
for line in sys.stdin: | ||
match = re.match(r'^([a-zA-Z\d_-]+):.*?## (.*)$$', line) | ||
if match: | ||
target, help = match.groups() | ||
print("%-20s %s" % (target, help)) | ||
endef | ||
export PRINT_HELP_PYSCRIPT | ||
|
||
BROWSER := python3 -c "$$BROWSER_PYSCRIPT" | ||
INSTALL_LOCATION := ~/.local | ||
|
||
help: | ||
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | ||
|
||
build-unit-test: | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DCMAKE_BUILD_TYPE:STRING=Debug | ||
cmake --build build --config Debug --target bpftime_runtime_tests | ||
|
||
unit-test: | ||
./build/runtime/unit-test/bpftime_runtime_tests | ||
|
||
build: ## build the package | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 | ||
cmake --build build --config Debug | ||
cd tools/cli-rs && cargo build | ||
|
||
release: ## build the package | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=0 -DCMAKE_BUILD_TYPE:STRING=Release | ||
cmake --build build --config Release --target install | ||
cd tools/cli-rs && cargo build --release | ||
|
||
build-vm: ## build only the core library | ||
make -C vm build | ||
|
||
build-llvm: ## build with llvm as jit backend | ||
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DBPFTIME_LLVM_JIT=1 | ||
cmake --build build --config Debug | ||
|
||
clean: ## clean the project | ||
rm -rf build | ||
make -C runtime clean | ||
make -C vm clean | ||
|
||
install: release ## Invoke cmake to install.. | ||
cd tools/cli-rs && mkdir -p ~/.bpftime && cp ./target/release/bpftime ~/.bpftime |
Binary file not shown.
Binary file not shown.
File renamed without changes.
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
File renamed without changes.
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
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
Oops, something went wrong.