forked from cilium/tetragon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The bpf_printk() helper is sometimes useful for debugging but we don't want to include it in production code since it makes programs incredibly slow. However, it's nice to have a consistent set of debugging messages we can lean on when it's time to investigate an issue on the BPF side. This commit introduces a new DEBUG macro that is a NOP unless we set DEBUG=1 in the BPF Makefile, in which case it turns into a bpf_printk() call. This will enable us to over time build up and check in a suite of debugging statements for diagnosing problems during the development cycle without impeding performance in production contexts. Signed-off-by: William Findlay <[email protected]>
- Loading branch information
1 parent
9b9ed8b
commit b80a068
Showing
3 changed files
with
17 additions
and
3 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