build: improve detection of eBPF support #22238

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:no_probes_darwin_for_now changing 1 files +9 −7
  1. fanquake commented at 5:49 am on June 14, 2021: member

    Just checking for the sys/sdt.h header isn’t enough, as systems like macOS have the header, but it doesn’t actually have the DTRACE_PROBE* probes, which leads to compile failures. The contents of sys/sdt.h in the macOS SDK is:

     0#ifndef _SYS_SDT_H
     1#define _SYS_SDT_H
     2
     3/*
     4 * This is a wrapper header that wraps the mach visible sdt.h header so that
     5 * the header file ends up visible where software expects it to be.  We also
     6 * do the C/C++ symbol wrapping here, since Mach headers are technically C
     7 * interfaces.
     8 *
     9 * Note:  The process of adding USDT probes to code is slightly different
    10 * than documented in the "Solaris Dynamic Tracing Guide".
    11 * The DTRACE_PROBE*() macros are not supported on Mac OS X -- instead see
    12 * "BUILDING CODE CONTAINING USDT PROBES" in the dtrace(1) manpage
    13 *
    14 */
    15#include <sys/cdefs.h>
    16__BEGIN_DECLS
    17#include <mach/sdt.h>
    18__END_DECLS
    19
    20#endif  /* _SYS_SDT_H */
    

    The BUILDING CODE CONTAINING USDT PROBES section from the dtrace manpage is available here, and outlines the more involved process of using USDT probes on macOS.

  2. fanquake added the label Build system on Jun 14, 2021
  3. theStack commented at 4:40 pm on June 14, 2021: member
    Concept ACK
  4. practicalswift commented at 11:14 am on June 15, 2021: contributor
    Concept ACK
  5. build: improve detection of eBPF support
    Just checking for the `sys/sdt.h` header isn't enough, as systems like
    macOS have the header, but it doesn't actually have the dtrace probes,
    which leads to compile failures.
    8f7704d032
  6. fanquake force-pushed on Jun 16, 2021
  7. jb55 commented at 7:38 pm on June 17, 2021: member
    utACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031
  8. practicalswift commented at 8:01 pm on June 17, 2021: contributor
    cr ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031
  9. hebasto approved
  10. hebasto commented at 9:43 pm on June 17, 2021: member

    ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031, tested on macOS Big Sur 11.4 (20F71) and on Linux Mint 20.1 (x86_64) with depends.

    It would be nice to have the default value of --enable-ebpf equal to auto, and emit an error message when --enable-ebpf=yes but its conditions are not met.

  11. fanquake merged this on Jun 18, 2021
  12. fanquake closed this on Jun 18, 2021

  13. fanquake deleted the branch on Jun 18, 2021
  14. sidhujag referenced this in commit 0252cd649a on Jun 18, 2021
  15. gwillen referenced this in commit 1e1d471ad7 on Jun 1, 2022
  16. kouloumos referenced this in commit 7d116a529d on Jul 4, 2022
  17. kouloumos referenced this in commit 84d9d6e893 on Jul 4, 2022
  18. kouloumos referenced this in commit 025eeb941a on Jul 4, 2022
  19. kouloumos referenced this in commit a8d9397fe7 on Jul 4, 2022
  20. kouloumos referenced this in commit 84fd2fd077 on Jul 4, 2022
  21. kouloumos referenced this in commit 85ae175a11 on Jul 6, 2022
  22. kouloumos referenced this in commit 72ede097bc on Jul 6, 2022
  23. kouloumos referenced this in commit 9b73b32a0a on Jul 6, 2022
  24. kouloumos referenced this in commit b0c2a3a3c4 on Jul 7, 2022
  25. kouloumos referenced this in commit 3631fb6f46 on Jul 7, 2022
  26. kouloumos referenced this in commit fdc8459d71 on Jul 7, 2022
  27. kouloumos referenced this in commit c3e09d3c14 on Jul 7, 2022
  28. kouloumos referenced this in commit 318cfc91ce on Jul 7, 2022
  29. kouloumos referenced this in commit 7abb1ae932 on Jul 7, 2022
  30. kouloumos referenced this in commit ac2175fcbc on Jul 7, 2022
  31. kouloumos referenced this in commit fb2632eac1 on Jul 7, 2022
  32. kouloumos referenced this in commit 2aba2c7f1e on Jul 9, 2022
  33. kouloumos referenced this in commit 4ff71a16bf on Jul 9, 2022
  34. kouloumos referenced this in commit c1da07c007 on Aug 17, 2022
  35. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-08 22:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me