summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Sadineni <Harish.Sadineni@windriver.com>2026-03-07 21:54:12 -0800
committerKhem Raj <raj.khem@gmail.com>2026-03-17 13:25:15 -0700
commit4937ed55d8e91cf2b89abed5f5358fb2cec39d56 (patch)
treebbc1ac6e1926e137e44177691dc7e94a5f8f2ce0
parentcdf9d099b983d09cd7237e26ce86f808d7cbfe2a (diff)
downloadmeta-openembedded-4937ed55d8e91cf2b89abed5f5358fb2cec39d56.tar.gz
bcc: Add ARM and AArch64 support to static tracepoints
This resolves USDT probe test failures on ARM64 platforms. Without these changes, the .note.stapsdt section containing probe information was missing entirely on ARM64, causing test failures when attempting to find and attach to USDT probes in the BCC test suite. Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491] Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch25
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch67
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb2
3 files changed, 94 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch
new file mode 100644
index 0000000000..2c1ff2dd73
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch
@@ -0,0 +1,25 @@
1From c2bd977c6c885d5cdca94ef5ac31bfcd9c4347ea Mon Sep 17 00:00:00 2001
2From: Harish Sadineni <Harish.Sadineni@windriver.com>
3Date: Sat, 7 Mar 2026 21:44:41 +0000
4Subject: [PATCH 1/2] folly/tracing: Remove x86-specific naming from tracing
5 header
6
7Rename StaticTracepoint-ELFx86.h to StaticTracepoint-ELF.h so the header
8name is no longer tied to a specific architecture, enabling future
9support for additional architectures.
10
11Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491]
12
13Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
14---
15 .../tracing/{StaticTracepoint-ELFx86.h => StaticTracepoint-ELF.h} | 0
16 1 file changed, 0 insertions(+), 0 deletions(-)
17 rename tests/python/include/folly/tracing/{StaticTracepoint-ELFx86.h => StaticTracepoint-ELF.h} (100%)
18
19diff --git a/tests/python/include/folly/tracing/StaticTracepoint-ELFx86.h b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h
20similarity index 100%
21rename from tests/python/include/folly/tracing/StaticTracepoint-ELFx86.h
22rename to tests/python/include/folly/tracing/StaticTracepoint-ELF.h
23--
242.49.1
25
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch
new file mode 100644
index 0000000000..2b97242753
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch
@@ -0,0 +1,67 @@
1From f290f9df0556735041bfee8e67fcad55edb4c70b Mon Sep 17 00:00:00 2001
2From: Harish Sadineni <Harish.Sadineni@windriver.com>
3Date: Sat, 7 Mar 2026 22:02:07 +0000
4Subject: [PATCH 2/2] folly/tracing: Add ARM and AArch64 support to static
5 tracepoints
6
7Extend the static tracepoint (SDT) macros to work on ARM and AArch64
8by:
9
10- Defining FOLLY_SDT_NOP as "nop" (the same mnemonic works for both
11 ARM and AArch64)
12- Adding `defined(__aarch64__) || defined(__arm__)` to the preprocessor
13 guard in StaticTracepoint.h
14
15This resolves USDT probe test failures on ARM64 platforms.
16Without these changes, the .note.stapsdt section containing probe
17information was missing entirely on ARM64, causing test failures when
18attempting to find and attach to USDT probes in the BCC test suite.
19
20Fixes: #5354
21
22Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491]
23
24Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
25---
26 tests/python/include/folly/tracing/StaticTracepoint-ELF.h | 6 ++++++
27 tests/python/include/folly/tracing/StaticTracepoint.h | 4 ++--
28 2 files changed, 8 insertions(+), 2 deletions(-)
29
30diff --git a/tests/python/include/folly/tracing/StaticTracepoint-ELF.h b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h
31index 033809cb..47828309 100644
32--- a/tests/python/include/folly/tracing/StaticTracepoint-ELF.h
33+++ b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h
34@@ -25,7 +25,13 @@
35 #endif
36
37 // Instruction to emit for the probe.
38+#if defined(__x86_64__) || defined(__i386__)
39 #define FOLLY_SDT_NOP nop
40+#elif defined(__aarch64__) || defined(__arm__)
41+#define FOLLY_SDT_NOP nop
42+#else
43+#error "Unsupported architecture"
44+#endif
45
46 // Note section properties.
47 #define FOLLY_SDT_NOTE_NAME "stapsdt"
48diff --git a/tests/python/include/folly/tracing/StaticTracepoint.h b/tests/python/include/folly/tracing/StaticTracepoint.h
49index 858b7dbc..86f8e40c 100644
50--- a/tests/python/include/folly/tracing/StaticTracepoint.h
51+++ b/tests/python/include/folly/tracing/StaticTracepoint.h
52@@ -16,10 +16,10 @@
53
54 #pragma once
55
56-#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__)) && \
57+#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(__arm__)) && \
58 !FOLLY_DISABLE_SDT
59
60-#include <folly/tracing/StaticTracepoint-ELFx86.h>
61+#include <folly/tracing/StaticTracepoint-ELF.h>
62
63 #define FOLLY_SDT(provider, name, ...) \
64 FOLLY_SDT_PROBE_N( \
65--
662.49.0
67
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb
index 3a34f04349..4051d7fe11 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb
@@ -24,6 +24,8 @@ SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https;tag=v${PV
24 file://0001-Fix-a-build-failure-with-clang21-5369.patch \ 24 file://0001-Fix-a-build-failure-with-clang21-5369.patch \
25 file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \ 25 file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \
26 file://0002-Add-riscv-syscall-prefix-detection-in-C-API.patch \ 26 file://0002-Add-riscv-syscall-prefix-detection-in-C-API.patch \
27 file://0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch \
28 file://0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch \
27 file://run-ptest \ 29 file://run-ptest \
28 file://ptest_wrapper.sh \ 30 file://ptest_wrapper.sh \
29 file://fix_for_memleak.patch \ 31 file://fix_for_memleak.patch \