diff options
author | Yabin Cui <yabinc@google.com> | 2021-06-16 21:55:40 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-06-16 21:55:40 +0000 |
commit | 5c50d9486dca1adc26e09981f8a8898cff7c835a (patch) | |
tree | d5bef5781643537aa5688a373ad22233b1d75aec | |
parent | bed46c91093706fe025d8d048447405e9f58d5d5 (diff) | |
parent | afe2b8609acebda9c5149c58631c097b893a13fc (diff) | |
download | x86_64-linux-glibc2.17-4.8-5c50d9486dca1adc26e09981f8a8898cff7c835a.tar.gz |
glibc: update perf_event.h to build lldb on linux. am: afe2b8609aandroid-s-beta-5android-s-beta-4android-s-beta-3android-s-beta-5android-s-beta-4
Original change: https://android-review.googlesource.com/c/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/+/1737994
Change-Id: I4be7d4357c1c91d0f30ae052f5ab08a0ce93b0c5
-rw-r--r-- | sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch | 37 | ||||
-rw-r--r-- | sysroot/usr/include/linux/perf_event.h | 18 |
2 files changed, 55 insertions, 0 deletions
diff --git a/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch b/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch new file mode 100644 index 0000000..025fa94 --- /dev/null +++ b/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch @@ -0,0 +1,37 @@ +b/191084510. Update perf_event.h to has aux_size, to fix below error when building lldb on +linux: + +llvm-project/lldb/source/Plugins/Process/Linux/IntelPTManager.cpp:53:23: +error: no member named 'aux_size' in 'perf_event_mmap_page' + return m_mmap_meta->aux_size; + ~~~~~~~~~~~~~^ +----- +diff --git a/usr/include/linux/perf_event.h b/usr/include/linux/perf_event.h +index 1c749ee..606f875 100644 +--- a/usr/include/linux/perf_event.h ++++ b/usr/include/linux/perf_event.h +@@ -433,6 +433,24 @@ struct perf_event_mmap_page { + */ + __u64 data_head; /* head in the data section */ + __u64 data_tail; /* user-space written tail */ ++ __u64 data_offset; /* where the buffer starts */ ++ __u64 data_size; /* data buffer size */ ++ ++ /* ++ * AUX area is defined by aux_{offset,size} fields that should be set ++ * by the userspace, so that ++ * ++ * aux_offset >= data_offset + data_size ++ * ++ * prior to mmap()ing it. Size of the mmap()ed area should be aux_size. ++ * ++ * Ring buffer pointers aux_{head,tail} have the same semantics as ++ * data_{head,tail} and same ordering rules apply. ++ */ ++ __u64 aux_head; ++ __u64 aux_tail; ++ __u64 aux_offset; ++ __u64 aux_size; + }; + + #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) diff --git a/sysroot/usr/include/linux/perf_event.h b/sysroot/usr/include/linux/perf_event.h index 1c749ee..606f875 100644 --- a/sysroot/usr/include/linux/perf_event.h +++ b/sysroot/usr/include/linux/perf_event.h @@ -433,6 +433,24 @@ struct perf_event_mmap_page { */ __u64 data_head; /* head in the data section */ __u64 data_tail; /* user-space written tail */ + __u64 data_offset; /* where the buffer starts */ + __u64 data_size; /* data buffer size */ + + /* + * AUX area is defined by aux_{offset,size} fields that should be set + * by the userspace, so that + * + * aux_offset >= data_offset + data_size + * + * prior to mmap()ing it. Size of the mmap()ed area should be aux_size. + * + * Ring buffer pointers aux_{head,tail} have the same semantics as + * data_{head,tail} and same ordering rules apply. + */ + __u64 aux_head; + __u64 aux_tail; + __u64 aux_offset; + __u64 aux_size; }; #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |