diff options
| author | 2020-09-11 12:07:10 -0600 | |
|---|---|---|
| committer | 2020-10-29 20:00:09 +0000 | |
| commit | 8994c180f34edd4133f0ca10170b03fadd081017 (patch) | |
| tree | 334ed5293a6489cd88baf30ba564007f633fe655 /libs/gui/QueueBufferInputOutput.cpp | |
| parent | 3d67213a5af32a14398d943a8a6fae11c9a5dfd5 (diff) | |
Collect Parcel statistics using std::atomics.
Instead of using a heavy pthread_mutex_t for updating size and count
statistics, this change shifts to using faster std::atomic values,
an approach that was already pioneered over in hardware::Parcel.
The Parcel benchmarks referenced below are showing a ~10% perf
improvement for contended cases. Note that this is in addition to
the improvements recently made with the shift to a linked-list
pooling design, and removal of advisory native allocation updates.
Here's the combined improvements of all three changes together;
~2x throughput for the 1-thread case, and ~9x throughput for the
16-thread case.
1 thread 4 threads 16 threads
Combined 50.48% 15.58% 11.41%
Bug: 165032569
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:android.os.ParcelObtainPerfTest
Change-Id: I436e70cdfd06e747d5c8fcc0ddd6ecf92737cf9c
Merged-In: I436e70cdfd06e747d5c8fcc0ddd6ecf92737cf9c
Diffstat (limited to 'libs/gui/QueueBufferInputOutput.cpp')
0 files changed, 0 insertions, 0 deletions