diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:14:35 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:14:35 +0000 |
commit | 45c3d871fd009dcabb3aca74a5f9f7d84deeceee (patch) | |
tree | 91a1f8a4374f4eba7a4487d24faf4757daed7e76 | |
parent | a24c7e2aa3fcec36a9c2809c6f7ad6ba10f44f73 (diff) | |
parent | f60dce0e55842ac7acfedb4a9a14dee74c803245 (diff) | |
download | libbpf-t_frc_neu_330443000.tar.gz |
Snap for 8512216 from f60dce0e55842ac7acfedb4a9a14dee74c803245 to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: I7a2799b4031d7bc0f02e088ee1d8c9da91e6e84b
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | TEST_MAPPING | 12 | ||||
-rw-r--r-- | android/btfloader.cpp | 2 | ||||
-rw-r--r-- | src/skel_internal.h | 4 |
4 files changed, 17 insertions, 5 deletions
@@ -45,10 +45,12 @@ genrule { "bpf/bpf_helpers.h", "bpf/bpf_tracing.h", "bpf/btf.h", + "bpf/hashmap.h", "bpf/libbpf_common.h", "bpf/libbpf.h", "bpf/libbpf_legacy.h", "bpf/libbpf_version.h", + "bpf/nlattr.h", "bpf/skel_internal.h", "bpf/xsk.h", ], @@ -82,6 +84,8 @@ cc_library_static { "libz", ], visibility: [ + "//external/bpftool", + "//external/bcc/libbpf-tools", "//external/dwarves", "//external/stg", ], diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..b6a940b --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,12 @@ +{ + "presubmit": [ + { + "name": "libbpf_load_test" + } + ], + "hwasan-postsubmit": [ + { + "name": "libbpf_load_test" + } + ] +} diff --git a/android/btfloader.cpp b/android/btfloader.cpp index 24df4d6..cd82262 100644 --- a/android/btfloader.cpp +++ b/android/btfloader.cpp @@ -72,8 +72,8 @@ int main(int argc, char **argv) { bt->info = (BTF_INFO_KIND(bt->info)) << 24; } } + if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF; } - if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF; btfFd = btf__fd(btf); if (sendBtfFd(socketFd, btf__fd(btf))) return kERROR_SEND_BTF_FD; diff --git a/src/skel_internal.h b/src/skel_internal.h index 2761970..dcd3336 100644 --- a/src/skel_internal.h +++ b/src/skel_internal.h @@ -57,9 +57,6 @@ struct bpf_load_and_run_opts { const char *errstr; }; -// ANDROID: Since the glibc stub we have does not know about __NR_bpf, this -// fails to compile. For now, just do not provide this functionality. -#if 0 static inline int skel_sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, unsigned int size) { @@ -199,6 +196,5 @@ out: close(prog_fd); return err; } -#endif #endif |