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 @@ +From c2bd977c6c885d5cdca94ef5ac31bfcd9c4347ea Mon Sep 17 00:00:00 2001 +From: Harish Sadineni +Date: Sat, 7 Mar 2026 21:44:41 +0000 +Subject: [PATCH 1/2] folly/tracing: Remove x86-specific naming from tracing + header + +Rename StaticTracepoint-ELFx86.h to StaticTracepoint-ELF.h so the header +name is no longer tied to a specific architecture, enabling future +support for additional architectures. + +Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491] + +Signed-off-by: Harish Sadineni +--- + .../tracing/{StaticTracepoint-ELFx86.h => StaticTracepoint-ELF.h} | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + rename tests/python/include/folly/tracing/{StaticTracepoint-ELFx86.h => StaticTracepoint-ELF.h} (100%) + +diff --git a/tests/python/include/folly/tracing/StaticTracepoint-ELFx86.h b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h +similarity index 100% +rename from tests/python/include/folly/tracing/StaticTracepoint-ELFx86.h +rename to tests/python/include/folly/tracing/StaticTracepoint-ELF.h +-- +2.49.1 + 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 @@ +From f290f9df0556735041bfee8e67fcad55edb4c70b Mon Sep 17 00:00:00 2001 +From: Harish Sadineni +Date: Sat, 7 Mar 2026 22:02:07 +0000 +Subject: [PATCH 2/2] folly/tracing: Add ARM and AArch64 support to static + tracepoints + +Extend the static tracepoint (SDT) macros to work on ARM and AArch64 +by: + +- Defining FOLLY_SDT_NOP as "nop" (the same mnemonic works for both + ARM and AArch64) +- Adding `defined(__aarch64__) || defined(__arm__)` to the preprocessor + guard in StaticTracepoint.h + +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. + +Fixes: #5354 + +Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491] + +Signed-off-by: Harish Sadineni +--- + tests/python/include/folly/tracing/StaticTracepoint-ELF.h | 6 ++++++ + tests/python/include/folly/tracing/StaticTracepoint.h | 4 ++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/python/include/folly/tracing/StaticTracepoint-ELF.h b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h +index 033809cb..47828309 100644 +--- a/tests/python/include/folly/tracing/StaticTracepoint-ELF.h ++++ b/tests/python/include/folly/tracing/StaticTracepoint-ELF.h +@@ -25,7 +25,13 @@ + #endif + + // Instruction to emit for the probe. ++#if defined(__x86_64__) || defined(__i386__) + #define FOLLY_SDT_NOP nop ++#elif defined(__aarch64__) || defined(__arm__) ++#define FOLLY_SDT_NOP nop ++#else ++#error "Unsupported architecture" ++#endif + + // Note section properties. + #define FOLLY_SDT_NOTE_NAME "stapsdt" +diff --git a/tests/python/include/folly/tracing/StaticTracepoint.h b/tests/python/include/folly/tracing/StaticTracepoint.h +index 858b7dbc..86f8e40c 100644 +--- a/tests/python/include/folly/tracing/StaticTracepoint.h ++++ b/tests/python/include/folly/tracing/StaticTracepoint.h +@@ -16,10 +16,10 @@ + + #pragma once + +-#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__)) && \ ++#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(__arm__)) && \ + !FOLLY_DISABLE_SDT + +-#include ++#include + + #define FOLLY_SDT(provider, name, ...) \ + FOLLY_SDT_PROBE_N( \ +-- +2.49.0 + 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 file://0001-Fix-a-build-failure-with-clang21-5369.patch \ file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \ file://0002-Add-riscv-syscall-prefix-detection-in-C-API.patch \ + file://0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch \ + file://0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch \ file://run-ptest \ file://ptest_wrapper.sh \ file://fix_for_memleak.patch \