On Tue, Jun 19, 2018 at 8:47 AM, Y Song <[email protected]> wrote: > On Tue, Jun 19, 2018 at 7:54 AM, William Tu <[email protected]> wrote: >> Hi, >> >> I'm trying to run coverage tests on my bpf program and it compiles fails. >> I guess BPF does not support '--coverage' flags? > > This will not work. > '-coverage' flag will introduce some additional global functions called > by the program, e.g., __llvm_gcov_init, __llvm_gcov_flush, etc. > global memset functions are > called from one of these functions, global variable __llvm_gcov_ctr is > also introduced. > > New clang compiler is much more tolerant on global functions in order > to support function calls in bpf bytecode. > > Even if you compile successfully, you may not load the program as > the program compiled with '-coverage' will reference to some > global variables where the loader cannot resolve.
I see. Thanks for the prompt reply! William -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1338): https://lists.iovisor.org/g/iovisor-dev/message/1338 Mute This Topic: https://lists.iovisor.org/mt/22433570/21656 Group Owner: [email protected] Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
