Brian Gianforcaro
bbc7e8429b
LibC: Remove duplicate gs touch during gettid()/getpid() fast path
...
While profiling I noticed that gettid() was hitting gs register
twice, once for the initial fetch of s_cache_tid out of TLS for
the initialization check, and then again when we return the actual
value.
Optimize the implementation to cache the value so we avoid the
double fetch during the 99% case where it's already set. With
this change gettid() goes from being the 3rd most sampled function
in test-js, to pretty much disappearing into ~20th place.
Additionally add the same optimization to getpid().
2020-07-23 12:28:11 +02:00
..
2020-05-11 09:50:42 +02:00
2020-05-29 07:59:45 +02:00
2020-05-29 07:59:45 +02:00
2020-06-08 21:50:45 +02:00
2020-07-19 11:46:37 +02:00
2020-05-26 14:35:10 +02:00
2020-05-30 11:31:49 +02:00
2020-04-06 11:09:01 +02:00
2020-07-13 08:46:44 +02:00
2020-02-16 10:47:54 +01:00
2020-05-17 22:35:25 +02:00
2020-05-20 16:24:26 +02:00
2020-07-04 17:22:23 +02:00
2020-05-26 14:35:10 +02:00
2020-02-19 16:08:28 +01:00
2020-04-10 13:09:35 +02:00
2020-07-04 17:22:23 +02:00
2020-05-20 08:31:31 +02:00
2020-05-29 07:59:45 +02:00
2020-06-17 18:35:49 +02:00
2020-05-30 15:01:18 +02:00
2020-06-12 21:28:55 +02:00
2020-02-20 06:51:16 +01:00
2020-07-04 17:22:23 +02:00
2020-03-07 10:27:02 +01:00
2020-05-11 10:52:24 +02:00
2020-07-21 22:48:17 +02:00
2020-05-29 07:59:45 +02:00
2020-07-04 17:22:23 +02:00
2020-04-12 20:22:26 +02:00
2020-06-12 21:28:55 +02:00
2020-04-18 10:11:55 +02:00
2020-07-04 17:22:23 +02:00
2020-06-23 14:12:20 +02:00
2020-06-12 21:28:55 +02:00
2020-02-02 10:58:45 +01:00
2020-07-03 19:29:36 +02:00
2020-07-04 17:22:23 +02:00
2020-07-04 17:22:23 +02:00
2020-07-15 23:25:20 +02:00
2020-07-04 17:22:23 +02:00
2020-06-16 09:34:00 +02:00
2020-06-20 14:43:27 +02:00
2020-07-06 10:01:14 +02:00
2020-07-19 11:46:37 +02:00
2020-05-16 12:00:04 +02:00
2020-05-23 17:03:41 +02:00
2020-07-04 17:22:23 +02:00
2020-05-23 15:27:33 +02:00
2020-07-04 17:22:23 +02:00
2020-02-05 21:17:41 +01:00
2020-02-22 21:36:54 +01:00
2020-02-22 21:36:54 +01:00
2020-02-14 23:31:18 +01:00
2020-07-11 11:33:33 +02:00
2020-07-04 10:49:36 +02:00
2020-07-04 17:22:23 +02:00
2020-06-08 21:53:41 +02:00
2020-07-04 17:22:23 +02:00
2020-05-07 23:32:11 +02:00
2020-07-23 12:28:11 +02:00
2020-07-15 00:07:20 +02:00
2020-07-04 17:22:23 +02:00
2020-05-11 09:50:42 +02:00
2020-07-04 17:22:23 +02:00