Skip to content

Instantly share code, notes, and snippets.

@oluceps
Created February 21, 2023 04:34
Show Gist options
  • Save oluceps/da9290e1d275ffd56952cde0560cebe8 to your computer and use it in GitHub Desktop.
Save oluceps/da9290e1d275ffd56952cde0560cebe8 to your computer and use it in GitHub Desktop.
ls ../bpftools/runqlat/runqlat.h && ../../compiler/workspace/bin/ecc ../bpftools/runqlat/runqlat.bpf.c ../bpftools/runqlat/runqlat.h \
|| ../../compiler/workspace/bin/ecc ../bpftools/runqlat/runqlat.bpf.c
../bpftools/runqlat/runqlat.h
Compiling bpf object...
$ clang -g -O2 -target bpf -Wno-unknown-attributes -D__TARGET_ARCH_mips -idirafter /usr/local/include -idirafter /usr/lib/llvm-11/lib/clang/11.0.1/include -idirafter /usr/include/mipsel-linux-gnu -idirafter /usr/include -I/tmp/eunomia.ydDjcs/include -I/tmp/eunomia.ydDjcs/include/vmlinux/mips -I/root/eunomia-bpf/examples/bpftools/runqlat -c ../bpftools/runqlat/runqlat.bpf.temp.c -o ../bpftools/runqlat/runqlat.bpf.o
In file included from ../bpftools/runqlat/runqlat.bpf.temp.c:10:
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: error: use of unknown builtin '__builtin_preserve_type_info' [-Wimplicit-function-declaration]
if (bpf_core_type_exists(struct trace_event_raw_block_rq_completion___x))
^
/tmp/eunomia.ydDjcs/include/bpf/bpf_core_read.h:185:2: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: note: did you mean '__builtin_preserve_field_info'?
/tmp/eunomia.ydDjcs/include/bpf/bpf_core_read.h:185:2: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:28:6: note: '__builtin_preserve_field_info' declared here
if (bpf_core_field_exists(t->__state))
^
/tmp/eunomia.ydDjcs/include/bpf/bpf_core_read.h:132:2: note: expanded from macro 'bpf_core_field_exists'
__builtin_preserve_field_info(___bpf_field_ref(field), BPF_FIELD_EXISTS)
^
In file included from ../bpftools/runqlat/runqlat.bpf.temp.c:10:
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
if (bpf_core_type_exists(struct trace_event_raw_block_rq_completion___x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/eunomia.ydDjcs/include/bpf/bpf_core_read.h:185:31: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^~~~~~~~~~~~~~~~~~
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
/tmp/eunomia.ydDjcs/include/bpf/bpf_core_read.h:185:31: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
1 warning and 1 error generated.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)', src/compile_bpf.rs:171:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Compiling bpf object...
$ clang -g -O2 -target bpf -Wno-unknown-attributes -D__TARGET_ARCH_mips -idirafter /usr/local/include -idirafter /usr/lib/llvm-11/lib/clang/11.0.1/include -idirafter /usr/include/mipsel-linux-gnu -idirafter /usr/include -I/tmp/eunomia.TNpOeJ/include -I/tmp/eunomia.TNpOeJ/include/vmlinux/mips -I/root/eunomia-bpf/examples/bpftools/runqlat -c ../bpftools/runqlat/runqlat.bpf.c -o ../bpftools/runqlat/runqlat.bpf.o
In file included from ../bpftools/runqlat/runqlat.bpf.c:10:
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: error: use of unknown builtin '__builtin_preserve_type_info' [-Wimplicit-function-declaration]
if (bpf_core_type_exists(struct trace_event_raw_block_rq_completion___x))
^
/tmp/eunomia.TNpOeJ/include/bpf/bpf_core_read.h:185:2: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: note: did you mean '__builtin_preserve_field_info'?
/tmp/eunomia.TNpOeJ/include/bpf/bpf_core_read.h:185:2: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:28:6: note: '__builtin_preserve_field_info' declared here
if (bpf_core_field_exists(t->__state))
^
/tmp/eunomia.TNpOeJ/include/bpf/bpf_core_read.h:132:2: note: expanded from macro 'bpf_core_field_exists'
__builtin_preserve_field_info(___bpf_field_ref(field), BPF_FIELD_EXISTS)
^
In file included from ../bpftools/runqlat/runqlat.bpf.c:10:
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
if (bpf_core_type_exists(struct trace_event_raw_block_rq_completion___x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/eunomia.TNpOeJ/include/bpf/bpf_core_read.h:185:31: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^~~~~~~~~~~~~~~~~~
/root/eunomia-bpf/examples/bpftools/runqlat/core_fixes.bpf.h:79:6: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
/tmp/eunomia.TNpOeJ/include/bpf/bpf_core_read.h:185:31: note: expanded from macro 'bpf_core_type_exists'
__builtin_preserve_type_info(*(typeof(type) *)0, BPF_TYPE_EXISTS)
^
1 warning and 1 error generated.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)', src/compile_bpf.rs:171:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [Makefile:26: runqlat] Error 101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment