Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools" |
| 2 | HOMEPAGE = "https://github.com/gperftools/gperftools" |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 3 | DESCRIPTION = "The gperftools, previously called google-perftools, package contains some \ |
| 4 | utilities to improve and analyze the performance of C++ programs. \ |
| 5 | Included are an optimized thread-caching malloc() and cpu and heap profiling utilities. \ |
| 6 | " |
| 7 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | LICENSE = "BSD-3-Clause" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" |
| 10 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | DEPENDS:append:libc-musl = " libucontext" |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 12 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 13 | SRCREV = "365060c4213a48adb27f63d5dfad41b3dfbdd62e" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 14 | SRC_URI = "git://github.com/gperftools/gperftools;branch=master;protocol=https \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \ |
| 16 | file://disable_libunwind_aarch64.patch \ |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 17 | file://0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | " |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | SRC_URI:append:libc-musl = " file://ppc-musl.patch" |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 21 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 22 | inherit autotools |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | # On mips, we have the following error. |
| 27 | # do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008 |
| 28 | # Segmentation fault (core dumped) |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | COMPATIBLE_HOST:mipsarch = "null" |
| 30 | COMPATIBLE_HOST:riscv64 = "null" |
| 31 | COMPATIBLE_HOST:riscv32 = "null" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | |
| 33 | # Disable thumb1 |
| 34 | # {standard input}: Assembler messages: |
| 35 | # {standard input}:434: Error: lo register required -- `ldr pc,[sp]' |
| 36 | # Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | ARM_INSTRUCTION_SET:armv5 = "arm" |
| 38 | ARM_INSTRUCTION_SET:toolchain-clang:arm = "arm" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 39 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 40 | EXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler" |
| 41 | EXTRA_OECONF:append:libc-musl:powerpc = " --disable-cpu-profiler" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | PACKAGECONFIG ?= "libunwind static" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | PACKAGECONFIG:remove:arm:libc-musl = "libunwind" |
| 44 | PACKAGECONFIG:remove:riscv64 = "libunwind" |
| 45 | PACKAGECONFIG:remove:riscv32 = "libunwind" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | |
| 47 | PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" |
| 48 | PACKAGECONFIG[static] = "--enable-static,--disable-static," |
| 49 | |
| 50 | PACKAGE_BEFORE_PN += "libtcmalloc-minimal" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | FILES:libtcmalloc-minimal = "${libdir}/libtcmalloc_minimal*${SOLIBS} ${libdir}/libtcmalloc_minimal_debug*${SOLIBS}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | |
| 53 | # pprof tool requires Getopt::long and POSIX perl5 modules. |
| 54 | # Also runs `objdump` on each cpuprofile data file |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | RDEPENDS:${PN} += " \ |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 56 | binutils \ |
| 57 | curl \ |
| 58 | perl-module-carp \ |
| 59 | perl-module-cwd \ |
| 60 | perl-module-getopt-long \ |
| 61 | perl-module-overloading \ |
| 62 | perl-module-posix \ |
| 63 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | RDEPENDS:${PN} += "libtcmalloc-minimal (= ${EXTENDPKGV})" |