MarcoFalke
2c35fe6238
Merge #15849: Thread names in logs and deadlock debug tools
8722e54e56 threads: add thread names to deadlock debugging message (James O'Beirne)
383b186c28 threads: prefix log messages with thread names (James O'Beirne)
ddd95ccb80 tests: add threadutil tests (James O'Beirne)
ae5f2b6a6c threads: introduce util/threadnames, refactor thread naming (James O'Beirne)
188ca75e5f disable HAVE_THREAD_LOCAL on unreliable platforms (James O'Beirne)
Pull request description:
I'm resurrecting this one (from #13168) because I need it to make progress on #15735.
It's now off by default and can be turned on with `-logthreadnames=1`.
Ran some benchmarks (IBD from local peer from 500_000 -> 504_000) and it's within spitting distance either on or off:
### threadnames off (default)
#### 2018-05-threadnames.3 vs. master (absolute)
| name | iterations | 2018-05-threadnames.3 | master |
|------------------------------------------------|-----------:|----------------------------|----------------------------|
| ibd.local.500000.504000.dbcache=2048 | 3 | 376.1584 (± 9.2944) | 392.3414 (± 13.4238) |
| ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 2236117.3333 (± 1845.9623) | 2238690.6667 (± 2669.3487) |
#### 2018-05-threadnames.3 vs. master (relative)
| name | iterations | 2018-05-threadnames.3 | master |
|------------------------------------------------|-----------:|----------------------:|-------:|
| ibd.local.500000.504000.dbcache=2048 | 3 | 1 | 1.043 |
| ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 1 | 1.001 |
### threadnames on
#### 2018-05-threadnames-take-2 vs. master (absolute)
| name | iterations | 2018-05-threadnames-take-2 | master |
|------------------------------------------------|-----------:|----------------------------|----------------------------|
| ibd.local.500000.504000.dbcache=2048 | 3 | 367.6861 (± 0.3941) | 364.1667 (± 0.9776) |
| ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 2238461.3333 (± 3697.8730) | 2237014.6667 (± 3307.6966) |
#### 2018-05-threadnames-take-2 vs. master (relative)
| name | iterations | 2018-05-threadnames-take-2 | master |
|------------------------------------------------|-----------:|---------------------------:|-------:|
| ibd.local.500000.504000.dbcache=2048 | 3 | 1.010 | 1.00 |
| ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 1.001 | 1.00 |
```
ACKs for commit 8722e5:
Empact:
utACK 8722e54e56
jnewbery:
utACK 8722e54e56fd959fd4ff2321b36a7640dee440c5
MarcoFalke:
re-utACK 8722e54e56fd959fd4ff2321b36a7640dee440c5 (Only change since my previous review is DEFAULT_LOGTHREADNAMES=false and stylistic updates
Tree-SHA512: 50af992708295b8d680cf10025262dd964e599a356bdfc1dfc84fb18c00afabcb34d3d12d551b0677ff81f8fccad0e17c1d5b24dfecb953a913bc77fdd1a4577
2019-04-30 15:26:01 -04:00
..
2019-04-17 14:20:44 -04:00
2019-03-05 11:19:32 +01:00
2019-04-09 17:53:08 -04:00
2019-03-29 10:22:24 +01:00
2019-04-06 12:10:55 -07:00
2019-04-27 09:28:54 -04:00
2019-01-26 12:45:48 -05:00
2019-04-09 17:53:08 -04:00
2019-04-18 12:46:07 -07:00
2019-04-25 14:15:43 -04:00
2019-04-30 15:26:01 -04:00
2019-04-27 15:29:48 +12:00
2019-04-23 16:43:10 +02:00
2019-01-23 16:28:27 +08:00
2019-04-30 15:26:01 -04:00
2018-09-07 08:21:14 -04:00
2019-04-29 13:42:25 -04:00
2019-04-29 00:07:55 +01:00
2019-01-25 14:16:07 -05:00
2018-04-13 15:37:20 -04:00
2019-01-16 13:54:18 -05:00
2019-01-16 13:54:18 -05:00
2019-03-01 16:15:50 -05:00
2019-02-27 16:53:44 -05:00
2018-12-29 10:15:01 +01:00
2018-11-04 22:46:07 -08:00
2018-12-04 19:55:04 +02:00
2018-11-05 17:03:11 +01:00
2019-01-22 21:10:48 +00:00
2019-01-22 21:10:48 +00:00
2018-11-04 22:46:07 -08:00
2018-11-05 17:03:11 +01:00
2018-08-27 18:19:33 +02:00
2018-03-22 16:23:04 +01:00
2019-03-11 10:28:42 -04:00
2019-04-09 17:53:08 -04:00
2019-01-30 16:26:52 -05:00
2019-02-06 14:16:43 -05:00
2019-04-29 13:42:25 -04:00
2018-11-05 09:25:15 -08:00
2018-11-13 12:41:41 -08:00
2019-04-06 12:10:55 -07:00
2019-04-06 12:10:55 -07:00
2018-08-25 17:41:00 +02:00
2018-08-13 01:24:55 +02:00
2019-03-27 18:29:48 -04:00
2019-03-27 18:29:48 -04:00
2019-02-17 03:38:08 +00:00
2018-10-07 13:11:36 +01:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-08-13 13:57:15 +02:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-05 09:25:15 -08:00
2019-04-26 13:09:30 -04:00
2019-01-23 16:28:27 +08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-03-26 17:38:00 -07:00
2018-07-27 07:15:02 -04:00
2019-03-26 17:38:00 -07:00
2018-11-04 22:46:07 -08:00
2018-08-27 18:19:33 +02:00
2018-09-04 13:11:26 +02:00
2018-11-04 22:46:07 -08:00
2019-04-28 04:42:38 +00:00
2019-02-22 17:38:45 -08:00
2019-02-22 17:38:45 -08:00
2019-04-10 12:16:52 +01:00
2018-12-29 10:15:01 +01:00
2018-11-05 09:25:15 -08:00
2018-11-30 18:48:58 +01:00
2018-11-04 22:46:07 -08:00
2018-08-11 09:34:47 +03:00
2019-04-29 13:42:25 -04:00
2019-04-09 17:53:08 -04:00
2019-04-30 15:26:01 -04:00
2018-11-06 11:44:40 -04:00
2019-02-07 22:30:25 +01:00
2018-07-27 07:15:02 -04:00
2019-01-31 15:00:56 +00:00
2018-09-13 10:36:41 -07:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-04-29 13:49:15 -04:00
2019-04-29 13:49:15 -04:00
2019-04-30 15:26:01 -04:00
2019-04-15 16:49:34 -04:00
2019-01-26 09:28:48 +08:00
2019-01-18 00:34:47 +00:00
2019-04-11 10:12:36 -04:00
2019-04-29 13:43:01 -04:00
2018-07-27 07:15:02 -04:00
2019-01-10 01:58:33 +01:00
2018-07-27 07:15:02 -04:00
2019-04-09 17:53:08 -04:00
2019-02-12 11:34:57 -05:00
2019-04-09 17:53:08 -04:00
2019-01-16 13:54:18 -05:00
2019-03-23 11:32:40 -04:00
2019-04-04 16:45:23 -04:00
2019-04-10 11:48:47 -04:00
2019-04-10 11:48:47 -04:00
2019-01-24 15:58:49 -08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-04 22:46:07 -08:00
2018-12-29 10:15:01 +01:00
2019-01-30 22:44:28 +02:00
2018-07-27 07:15:02 -04:00
2018-11-05 17:03:11 +01:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-14 12:19:28 -05:00
2018-11-04 22:46:07 -08:00
2019-01-05 16:16:37 +01:00
2019-04-09 17:53:08 -04:00
2019-04-09 17:53:08 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-02-18 10:56:55 +01:00
2019-02-03 17:34:26 -08:00
2019-02-25 10:12:29 -05:00
2018-07-24 20:46:23 +01:00
2019-01-16 16:34:56 -08:00
2019-02-10 17:17:32 -05:00
2019-04-06 12:03:21 -07:00
2018-06-25 00:08:49 -04:00
2018-06-25 00:08:49 -04:00
2018-07-27 11:52:18 -07:00
2019-01-25 12:32:37 -08:00
2019-04-29 13:51:59 -04:00
2018-12-14 16:26:13 -05:00
2018-08-31 16:00:38 +02:00
2018-12-29 10:15:01 +01:00
2018-11-06 11:44:40 -04:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-03-21 08:34:44 +02:00
2019-01-13 22:50:36 -08:00
2018-07-27 07:15:02 -04:00
2018-11-04 22:46:07 -08:00
2019-04-06 12:10:55 -07:00
2019-04-09 17:53:08 -04:00
2019-02-25 10:12:29 -05:00
2019-04-23 13:03:41 -04:00
2019-04-23 13:03:41 -04:00
2019-01-10 02:51:14 +01:00
2018-09-18 14:27:05 +09:00
2018-11-05 09:25:15 -08:00
2019-04-30 15:26:01 -04:00
2019-04-30 15:26:01 -04:00
2019-04-09 10:38:13 -04:00
2019-04-10 11:44:40 -04:00
2018-07-27 07:15:02 -04:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-11-06 11:44:40 -04:00
2018-11-04 22:46:07 -08:00
2018-08-08 13:55:27 +02:00