-
Notifications
You must be signed in to change notification settings - Fork 317
coredump: enable cgo warnings #613
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
base: main
Are you sure you want to change the base?
coredump: enable cgo warnings #613
Conversation
a013733
to
e88a47c
Compare
#cgo CFLAGS: -Wno-unused-label | ||
#cgo CFLAGS: -Wno-sign-compare | ||
#cgo CFLAGS: -Wno-unknown-pragmas | ||
#cgo CFLAGS: -Wno-unused-parameter |
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.
Unfortunately can not enable this one in cgo
because of golang/go#71225
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.
# go.opentelemetry.io/ebpf-profiler/tools/coredump
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03___bpf_log':
cgo-generated-wrappers:91:43: error: unused parameter 'p' [-Werror=unused-parameter]
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03___push_frame':
cgo-generated-wrappers:92:46: error: unused parameter 'p' [-Werror=unused-parameter]
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03_bpf_ktime_get_ns':
cgo-generated-wrappers:93:50: error: unused parameter 'p' [-Werror=unused-parameter]
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03_bpf_get_current_comm':
cgo-generated-wrappers:94:54: error: unused parameter 'p' [-Werror=unused-parameter]
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03___bpf_probe_read_user':
cgo-generated-wrappers:95:55: error: unused parameter 'p' [-Werror=unused-parameter]
cgo-generated-wrappers: In function '_cgoexp_b173915d1d03___bpf_map_lookup_elem':
cgo-generated-wrappers:96:55: error: unused parameter 'p' [-Werror=unused-parameter]
cc1: all warnings being treated as errors
This reverts commit 2174352.
87e233e
to
b8e751b
Compare
This should be ready for another round of review |
support/ebpf/dotnet_tracer.ebpf.c
Outdated
#if !defined(TESTING_COREDUMP) | ||
#pragma unroll 256 | ||
#endif |
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.
Avoid code repetition by defining a macro (e.g. UNROLL
), which is empty for gcc.
Just in case, https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/613/files#r2218507693 can't be solved to use the same compiler everywhere.
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.
Applied, please take a look.
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 for working on this, LGTM
-Wunused-parameter
in the ebpf makefile(void)
.