summaryrefslogtreecommitdiff
path: root/absl/time/duration.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-09-08 05:55:49 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-09-08 05:56:44 -0700
commit1cf6469b372a0ab2787ad95f1ebb611c81b968b3 (patch)
tree532947bb3c26e99758d91bad9e3e2787fb749f6a /absl/time/duration.cc
parentb9980dd454cf1849721d81b201173f9ced53f6bc (diff)
absl: inline and de-dup Mutex::Await/LockWhen/CondVar::Wait
Mutex::Await/LockWhen/CondVar::Wait duplicate code, and cause additional calls at runtime and code bloat. Inline thin wrappers that just convert argument types and add a single de-duped implementation for these methods. This reduces code size, shaves off 55K from the mutex_test in release build, and should make things marginally faster. $ nm -nS mutex_test | egrep "(_ZN4absl5Mutex.*(Await|LockWhen))|(_ZN4absl7CondVar.*Wait)" before: 00000000000912c0 00000000000001a8 T _ZN4absl7CondVar4WaitEPNS_5MutexE 00000000000988c0 0000000000000c36 T _ZN4absl7CondVar16WaitWithDeadlineEPNS_5MutexENS_4TimeE 000000000009a6e0 0000000000000041 T _ZN4absl5Mutex19LockWhenWithTimeoutERKNS_9ConditionENS_8DurationE 00000000000a28c0 0000000000000779 T _ZN4absl5Mutex17AwaitWithDeadlineERKNS_9ConditionENS_4TimeE 00000000000cf4e0 0000000000000011 T _ZN4absl5Mutex8LockWhenERKNS_9ConditionE 00000000000cf500 0000000000000041 T _ZN4absl5Mutex20LockWhenWithDeadlineERKNS_9ConditionENS_4TimeE 00000000000cf560 0000000000000011 T _ZN4absl5Mutex14ReaderLockWhenERKNS_9ConditionE 00000000000cf580 0000000000000041 T _ZN4absl5Mutex26ReaderLockWhenWithDeadlineERKNS_9ConditionENS_4TimeE 00000000000cf5e0 0000000000000766 T _ZN4absl5Mutex5AwaitERKNS_9ConditionE 00000000000cfd60 00000000000007b5 T _ZN4absl5Mutex16AwaitWithTimeoutERKNS_9ConditionENS_8DurationE 00000000000d0700 00000000000003cf T _ZN4absl7CondVar15WaitWithTimeoutEPNS_5MutexENS_8DurationE 000000000011c280 0000000000000041 T _ZN4absl5Mutex25ReaderLockWhenWithTimeoutERKNS_9ConditionENS_8DurationE after: 000000000009c300 00000000000007ed T _ZN4absl7CondVar10WaitCommonEPNS_5MutexENS_24synchronization_internal13KernelTimeoutE 00000000000a03c0 00000000000006fe T _ZN4absl5Mutex11AwaitCommonERKNS_9ConditionENS_24synchronization_internal13KernelTimeoutE 000000000011ae00 0000000000000025 T _ZN4absl5Mutex14LockWhenCommonERKNS_9ConditionENS_24synchronization_internal13KernelTimeoutEb PiperOrigin-RevId: 563729364 Change-Id: Ic6b43761f76719c01e03d43cc0e0c419e41a85c1
Diffstat (limited to 'absl/time/duration.cc')
0 files changed, 0 insertions, 0 deletions