11 Commits
Author SHA1 Message Date
Khem Raj 43b79d8e37 bcc: Skip the buildpaths HOME check for upstream example text
bcc's tools/funccount_example.txt documents tracing a binary that
upstream placed under /home/ubuntu:

  # ./funccount -p 1442 /home/ubuntu/contentions:*
  Tracing 15 functions for "/home/ubuntu/contentions:*"...
  If /home/ubuntu is in the $PATH, then the following command will also work:

That is documentation prose, not a leaked build path, but the buildpaths
QA check flags any packaged file containing the builder's HOME, so on a
host whose HOME is /home/ubuntu it warns twice - once for the copy in
${datadir}/bcc/tools/doc and once for the copy do_install_ptest places
in ${libdir}/tools:

  WARNING: bcc-0.37.0-r0 do_package_qa: QA Issue: File
  /usr/share/bcc/tools/doc/funccount_example.txt in package bcc contains
  a reference to the build host HOME directory. [buildpaths]
  WARNING: bcc-0.37.0-r0 do_package_qa: QA Issue: File
  /usr/lib/tools/funccount_example.txt in package bcc-ptest contains a
  reference to the build host HOME directory. [buildpaths]

Both packaged copies are byte identical to the file in the upstream tree
and contain no reference to TMPDIR, confirming nothing is baked in at
build time. Set OEQA_BUILDPATHS_SKIP as the QA message suggests, which
suppresses only the HOME half of the check; the TMPDIR half still guards
against real build path leaks. oe-core does the same for sudo, perl,
python3-numpy and python3-pytest.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-09-11 22:47:22 -07:00
Sunil DoraandDeepesh Varatharajan 1962463e22 bcc: Fix build with LLVM 23
LLVM 23 changed the MCContext constructor to take MCAsmInfo,
MCRegisterInfo and MCSubtargetInfo by reference rather than by pointer,
so bcc no longer builds:

  src/cc/bcc_debug.cc:151:68: error: no matching function for call to
  'llvm::MCContext::MCContext(...)'

Backport the upstream fix. It is guarded on LLVM_VERSION_MAJOR so older
Clang keeps working. There is no release carrying it yet; v0.37.0 is
still the newest tag.

Co-authored-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-09-04 17:10:39 -07:00
Khem Raj 6ac6d8adbf bcc: Stop baking the build directory into the ptest binaries
tests/cc passes -DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}" to
every test object so the tests can find archive.zip, the debuginfo libraries
and dummy_proc_map.txt at runtime. That put 13 copies of the absolute build
directory into the installed test binary:

  QA Issue: File /usr/lib/bcc/ptest/tests/cc/test_libbcc_no_libbpf in package
  bcc-ptest contains reference to TMPDIR [buildpaths]

and, on autobuilders whose TMPDIR sits below $HOME, additionally:

  QA Issue: ... contains a reference to the build host HOME directory.

The recipe worked around this by installing the assets to ${D}${B}/tests/cc,
i.e. by reproducing the build path inside the image, and by demoting
buildpaths to a warning.

Add a patch introducing a TEST_ASSET_DIR cache variable, defaulting to
CMAKE_CURRENT_BINARY_DIR so the upstream default is unchanged, and point it at
${PTEST_PATH}/tests/cc. The assets are now installed next to the test binaries
and no build path is embedded, so the buildpaths overrides can go away.

Also install dummy_proc_map.txt, which the tests reference but which was never
shipped.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-28 22:48:28 -07:00
Wang Mingyu c75b94b284 bcc: upgrade 0.36.1 -> 0.37.0
0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch
0002-Add-riscv-syscall-prefix-detection-in-C-API.patch
0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch
0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch
0001-Fix-build-with-LLVM-22.patch
removed since they're included in 0.37.0

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-08 11:05:01 -07:00
Khem Raj c358831993 bcc: Upgrade to 0.36.1
* Drop upstreamed patches
* Backport clang-22 fix
* Disable git lfs

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-03-30 19:46:38 -07:00
Gyorgy Sarvari cce9a3b937 bcc: add missing build dependency
Without xz present, compilation fails with the following error:

| <...>/x86_64-oe-linux-ld: warning: liblzma.so.5, needed by <...>/libbcc.so, not found (try using -rpath or -rpath-link)
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_code@XZ_5.0'
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_end@XZ_5.0'
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_stream_decoder@XZ_5.0'
| collect2: error: ld returned 1 exit status

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-03-18 14:33:24 -07:00
Harish Sadineni 4937ed55d8 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>
2026-03-17 13:25:15 -07:00
Harish Sadineni cdf9d099b9 bcc: Add riscv syscall prefix detection in C++ API
Fixes issue where bpf.get_syscall_fnname() on riscv64 returns bare syscall
name instead of the prefixed _riscv_sys variant, causing kprobe
attachment failures.

Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5490]

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-03-17 13:25:15 -07:00
Harish Sadineni eed01e5cc0 bcc: Add ARM64 syscall prefix detection in C++ API
Fixes issue where bpf.get_syscall_fnname() on ARM64 returns bare syscall name
instead of the prefixed _arm64_sys variant, causing kprobe attachment failures.
Now detects ARM64 prefix alongside x64 (x64_sys) and generic (sys) prefixes.

Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5489]

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-03-17 13:25:15 -07:00
Khem Raj ec3c60bd9f bcc: Fix build with LLVM/Clang 21
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-08-29 22:02:54 -07:00
Khem Raj 1db713b038 bpftrace,bcc: Migrate recipe from meta-clang to meta-oe
These recipes depend on clang, and clang being on core
it is better place for these tools to be in a common
layer for now that is meta-oe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-16 08:47:50 -07:00