38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
|
|
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)
|