-
Notifications
You must be signed in to change notification settings - Fork 308
Use the verbose parameter to enable the tracer's debugging without recompiling the program #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
16053f2
to
81eafe1
Compare
verbose
parameter without recompiling the BPF program
Hmm, I had thought about this as well, but I'm not sure whether it's a good idea: the debug blobs are 1MB each, and we'll be updating them frequently. This will probably have rather significant impact on the repository size in the long run. If we want this, we'll probably have to stop committing tracer blobs into git, which in turn means that this repository can no longer be pulled in as a Go module (without an external build system). |
What if we put the debug blobs in a separate module and do not commit these debug blobs to git to reduce the impact on the repository size, while keeping the original tracker blobs unchanged? Would this address your concerns? |
Hmm yeah, something along those lines could work. We don't have to go with a separate Go module, though, if that is what you are proposing. It'd probably be enough to |
Your suggestion is a great idea. |
2d37db8
to
84fddb9
Compare
…compiling the program
verbose
parameter without recompiling the BPF programc9882cf
to
03072ed
Compare
thanks for adding this. the new param can also be wired up to the docker build: diff --git a/Makefile b/Makefile
index e017b4a..5fb2c0f 100644
--- a/Makefile
+++ b/Makefile
@@ -115,7 +115,7 @@ docker-image:
agent:
docker run -v "$$PWD":/agent -it --rm --user $(shell id -u):$(shell id -g) profiling-agent \
- "make TARGET_ARCH=$(TARGET_ARCH) VERSION=$(VERSION) REVISION=$(REVISION) BUILD_TIMESTAMP=$(BUILD_TIMESTAMP)"
+ "make TARGET_ARCH=$(TARGET_ARCH) VERSION=$(VERSION) REVISION=$(REVISION) BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) BUILD_TYPE=$(BUILD_TYPE)"
legal:
@go install github.com/google/go-licenses@latest
|
Hi! Best regards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a pass, will take another look
cc1cbf9
to
0413c89
Compare
Thanks for your suggestions. |
The ebpf programs with debug symbols should load (did this in the past, but not recently).
the agent stops with the following error
Is there anything that needs to be tuned? |
I don't have this issue on my Mint 21.3 system. I'll try upgrading the kernel.
The output is as follows:
|
@tsint The issue is unrelated to this PR. It also happens on |
@tsint Do you mind to update |
No problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
@tsint There is a minor merge conflict in |
OK. |
Currently, to enable BPF debugging, you need to recompile the profiler, replace the application on the server, and then replace it back after obtaining useful information. This is very inconvenient, so I thought of directly integrating the BPF program with BPF debugging enabled into the profiler. If BPF debugging needs to be enabled, you only need to restart the application and modify the parameters.
As shown below, you can easily obtain the BPF debug log output.