mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-15 21:27:18 +03:00
Optimize away the tsd_fast() check on fastpath.
Fold the tsd_state check onto the event threshold check. The fast threshold is set to 0 when tsd switch to non-nominal. The fast_threshold can be reset by remote threads, to refect the non nominal tsd state change.
This commit is contained in:
parent
1decf958d1
commit
dd649c9485
6 changed files with 144 additions and 21 deletions
|
|
@ -7,8 +7,6 @@ TEST_BEGIN(test_next_event_fast_roll_back) {
|
|||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX - 8U);
|
||||
thread_allocated_next_event_set(tsd,
|
||||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX);
|
||||
thread_allocated_next_event_fast_set(tsd,
|
||||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX);
|
||||
#define E(event, condition) \
|
||||
event##_event_wait_set(tsd, \
|
||||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX);
|
||||
|
|
@ -27,7 +25,6 @@ TEST_BEGIN(test_next_event_fast_resume) {
|
|||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX + 8U);
|
||||
thread_allocated_next_event_set(tsd,
|
||||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX + 16U);
|
||||
thread_allocated_next_event_fast_set(tsd, 0);
|
||||
#define E(event, condition) \
|
||||
event##_event_wait_set(tsd, \
|
||||
THREAD_ALLOCATED_NEXT_EVENT_FAST_MAX + 16U);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue