logging: enable thread_local usage on macOS #18082

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:macos_thread_local changing 1 files +0 −5
  1. fanquake commented at 4:41 AM on February 6, 2020: member

    Now that we're building against a newer SDK (10.14), we should be able to enable thread_local usage on macOS. Have tested building and running locally, as well as cross-compiling and running the binaries on a macOS 10.14 system.

    master 8a56f79d491271120abc3843c46e9dda44edd308

    src/bitcoind -logthreadnames=1
    2020-02-06T04:38:33Z [] Bitcoin Core version v0.19.99.0-8a56f79d4 (release build)
    2020-02-06T04:38:33Z [] Assuming ancestors of block 00000000000000000005f8920febd3925f8272a6a71237563d78c2edfdd09ddf have valid signatures.
    2020-02-06T04:38:33Z [] Setting nMinimumChainWork=000000000000000000000000000000000000000008ea3cf107ae0dec57f03fe8
    2020-02-06T04:38:33Z [] Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    2020-02-06T04:38:33Z [] Using RdSeed as additional entropy source
    

    this PR d76894987d0277e8011932ab7dfd77c537f8ea6e

    checking for thread_local support... yes
    ...
    src/bitcoind -logthreadnames=1
    2020-02-06T04:17:49Z [net] net thread start
    2020-02-06T04:17:49Z [opencon] opencon thread start
    2020-02-06T04:17:49Z [dnsseed] dnsseed thread start
    2020-02-06T04:17:49Z [init] init message: Done loading
    2020-02-06T04:17:49Z [msghand] msghand thread start
    2020-02-06T04:17:49Z [addcon] addcon thread start
    ...
    2020-02-06T04:17:54Z [init] tor: Thread interrupt
    2020-02-06T04:17:54Z [init] Shutdown: In progress...
    

    From the Xcode 8 release notes

    C++ now supports the thread_local keyword, which declares thread-local storage (TLS) and supports C++ classes with non-trivial constructors and destructors. (9001553)

  2. logging: enable thread_local usage on macOS d76894987d
  3. fanquake added the label macOS on Feb 6, 2020
  4. fanquake added the label Utils/log/libs on Feb 6, 2020
  5. jonasschnelli commented at 7:52 AM on February 6, 2020: contributor

    Tested ACK d76894987d0277e8011932ab7dfd77c537f8ea6e

    Build: https://bitcoinbuilds.org/index.php?job=27ae787b-7dd7-41dd-8bc2-da161a8ef0be

    Output:

     % ./bitcoind --regtest -logthreadnames=1
    2020-02-06T07:51:09Z [init] Bitcoin Core version v0.19.99.0-b11939cb-dirty (release build)
    2020-02-06T07:51:09Z [init] Validating signatures for all blocks
    ...
    2020-02-06T07:51:12Z [loadblk] UpdateTip: new best=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 height=0 version=0x00000001 log2_work=1 tx=1 date='2011-02-02T23:16:42Z' progress=1.000000 cache=0.0MiB(0txo)
    2020-02-06T07:51:12Z [loadblk] Failed to open mempool file from disk. Continuing anyway.
    2020-02-06T07:51:12Z [scheduler] scheduler thread interrupt
    2020-02-06T07:51:12Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
    ...
    
  6. hebasto approved
  7. hebasto commented at 8:47 PM on February 6, 2020: member

    ACK d76894987d0277e8011932ab7dfd77c537f8ea6e

    $ ./src/qt/bitcoin-qt -logthreadnames -printtoconsole -testnet
    2020-02-06T20:38:44Z [main] Bitcoin Core version v0.19.99.0-d76894987 (release build)
    2020-02-06T20:38:44Z [main] Qt 5.13.0 (dynamic), plugin=cocoa (dynamic)
    2020-02-06T20:38:44Z [main] System: macOS Mojave (10.14), x86_64-little_endian-lp64
    2020-02-06T20:38:44Z [main] Screen: Display 1280x1024, pixel ratio=1.0
    2020-02-06T20:38:45Z [main] Assuming ancestors of block 00000000000000b7ab6ce61eb6d571003fbe5fe892da4c9b740c49a07542462d have valid signatures.
    2020-02-06T20:38:45Z [main] Setting nMinimumChainWork=00000000000000000000000000000000000000000000012b2a3a62424f21c918
    2020-02-06T20:38:45Z [main] Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    2020-02-06T20:38:45Z [main] Using RdSeed as additional entropy source
    2020-02-06T20:38:45Z [main] Using RdRand as an additional entropy source
    2020-02-06T20:38:45Z [qt-init] Default data directory /Users/hebasto/Library/Application Support/Bitcoin
    2020-02-06T20:38:45Z [qt-init] Using data directory /Users/hebasto/Library/Application Support/Bitcoin/testnet3
    ...
    2020-02-06T20:38:55Z [qt-init] Shutdown: In progress...
    2020-02-06T20:38:55Z [torcontrol] torcontrol thread exit
    2020-02-06T20:38:55Z [dnsseed] dnsseed thread exit
    2020-02-06T20:38:55Z [addcon] addcon thread exit
    2020-02-06T20:38:55Z [net] net thread exit
    2020-02-06T20:38:55Z [msghand] msghand thread exit
    2020-02-06T20:38:58Z [opencon] opencon thread exit
    2020-02-06T20:38:58Z [scheduler] scheduler thread interrupt
    2020-02-06T20:38:58Z [shutoff] Dumped mempool: 1.8e-05s to copy, 0.002822s to dump
    2020-02-06T20:38:59Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
    2020-02-06T20:38:59Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
    2020-02-06T20:38:59Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
    2020-02-06T20:38:59Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
    2020-02-06T20:38:59Z [main] [default wallet] Releasing wallet
    2020-02-06T20:38:59Z [shutoff] Shutdown: done
    
  8. jonasschnelli added the label Needs gitian build on Feb 6, 2020
  9. DrahtBot removed the label Needs gitian build on Feb 7, 2020
  10. MarcoFalke commented at 12:42 PM on February 7, 2020: member

    I am still working on getting the macos bins to build on DrahtBot :hammer:

  11. MarcoFalke commented at 12:42 PM on February 7, 2020: member

    Concept ACK

  12. nijynot commented at 3:37 PM on February 9, 2020: contributor

    ACK d768949

    Running on macOS 10.15.1.

    master 75fb37ce6

    2020-02-09T15:17:15Z [] Bitcoin Core version v0.19.99.0-75fb37ce6 (release build)
    2020-02-09T15:17:15Z [] Assuming ancestors of block 00000000000000000005f8920febd3925f8272a6a71237563d78c2edfdd09ddf have valid signatures.
    2020-02-09T15:17:15Z [] Setting nMinimumChainWork=000000000000000000000000000000000000000008ea3cf107ae0dec57f03fe8
    2020-02-09T15:17:15Z [] Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    2020-02-09T15:17:15Z [] Using RdSeed as additional entropy source
    2020-02-09T15:17:15Z [] Using RdRand as an additional entropy source
    

    this pr d768949

    2020-02-09T15:36:46Z [init] Bitcoin Core version v0.19.99.0-d76894987 (release build)
    2020-02-09T15:36:46Z [init] Assuming ancestors of block 00000000000000000005f8920febd3925f8272a6a71237563d78c2edfdd09ddf have valid signatures.
    2020-02-09T15:36:46Z [init] Setting nMinimumChainWork=000000000000000000000000000000000000000008ea3cf107ae0dec57f03fe8
    2020-02-09T15:36:46Z [init] Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    2020-02-09T15:36:46Z [init] Using RdSeed as additional entropy source
    2020-02-09T15:36:46Z [init] Using RdRand as an additional entropy source
    
  13. MarcoFalke deleted a comment on Feb 9, 2020
  14. laanwj referenced this in commit 0193fd766b on Feb 10, 2020
  15. laanwj merged this on Feb 10, 2020
  16. laanwj closed this on Feb 10, 2020

  17. fanquake deleted the branch on Feb 10, 2020
  18. DrahtBot locked this on Feb 15, 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: 2026-04-13 15:14 UTC

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