summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-13bionic: Switch to jemalloc memory allocatorHEADsugisawa-mr1Danny Lin
Overall, jemalloc performs significantly better than Scudo in Bionic's real-world memory_replay traces (all times in milliseconds): +----------------+-------+----------+ | Trace | Scudo | jemalloc | +----------------+-------+----------+ | SQL | 27 | 21 | | Angry Birds 2 | 2236 | 1501 | | Camera | 4251 | 979 | | Candy Crush | 2197 | 1325 | | Gmail | 594 | 463 | | Maps | 434 | 344 | | Photos | 1330 | 477 | | PUBG | 666 | 416 | | surfaceflinger | 221 | 192 | | system_server | 1921 | 1416 | | SystemUI | 102 | 79 | | YouTube | 363 | 294 | +----------------+-------+----------+ jemalloc also tends to use slightly less memory than Scudo for most traces. These tests were conducted on desktop x86 Linux with glibc and the latest stable version of each allocator, but they should still be relevant. RSS values in KiB: +----------------+--------+----------+ | Trace | Scudo | jemalloc | +----------------+--------+----------+ | Angry Birds 2 | 793948 | 746992 | | Camera | 219372 | 251888 | | Candy Crush | 548288 | 550148 | | Gmail | 195236 | 193048 | | Maps | 159860 | 159816 | | Photos | 175436 | 171872 | | PUBG | 233752 | 223572 | | surfaceflinger | 94736 | 107068 | | system_server | 471048 | 484392 | | SystemUI | 54432 | 60740 | | YouTube | 139376 | 142252 | +----------------+--------+----------+ While not representative of real-world usage, jemalloc also performs fairly well in synthetic benchmarks (all times in nanoseconds): +-----------------+---------+----------+ | Benchmark | Scudo | jemalloc | +-----------------+---------+----------+ | alloc 8 | 87.9 | 60.1 | | alloc 16 | 87.9 | 60 | | alloc 32 | 88.6 | 60.7 | | alloc 64 | 88.6 | 59.7 | | alloc 512 | 89.2 | 60 | | alloc 1024 | 89.4 | 59.8 | | alloc 8192 | 89.8 | 65.2 | | alloc 16384 | 92.7 | 69.1 | | alloc 32768 | 97.2 | 74 | | alloc 65536 | 109 | 83.8 | | alloc 131072 | 41536 | 42720 | | alloc40x 8 | 2156 | 2556 | | alloc40x 16 | 2155 | 2244 | | alloc40x 32 | 2234 | 2312 | | alloc40x 64 | 2234 | 2289 | | alloc40x 512 | 2274 | 8171 | | alloc40x 1024 | 2397 | 2162 | | alloc40x 8192 | 3550 | 78880 | | alloc40x 16384 | 3732 | 124454 | | alloc40x 32768 | 3849 | 275460 | | alloc40x 65536 | 4987 | 727598 | | alloc40x 131072 | 2745207 | 3067980 | | alloc8192 1x | 464 | 454 | | alloc8192 2x | 510 | 488 | | alloc8192 3x | 587 | 523 | | alloc8192 4x | 665 | 557 | | alloc8192 5x | 742 | 598 | | alloc8192 6x | 818 | 633 | | alloc8192 7x | 884 | 669 | | alloc8192 8x | 960 | 699 | | alloc8192 9x | 1045 | 734 | | alloc8192 10x | 1131 | 770 | | alloc8192 11x | 1207 | 806 | | alloc8192 12x | 1282 | 841 | | alloc8192 13x | 1363 | 877 | | alloc8192 14x | 1442 | 912 | | alloc8192 15x | 1512 | 944 | | alloc8192 16x | 1587 | 978 | | alloc8192 24x | 2256 | 21195 | | alloc8192 32x | 2867 | 45446 | | alloc8192 40x | 3522 | 71618 | | alloc8192 48x | 4126 | 89740 | | alloc8192 56x | 4786 | 114990 | | alloc8192 64x | 5412 | 141082 | | alloc8192 72x | 6049 | 170742 | | alloc8192 80x | 6712 | 198480 | | alloc8192 88x | 7331 | 221557 | | alloc8192 96x | 7976 | 251462 | | alloc8192 104x | 8581 | 281626 | | alloc8192 112x | 9245 | 313164 | | alloc8192 120x | 9914 | 353147 | | alloc8192 128x | 10514 | 376625 | | alloc8192 136x | 11187 | 408194 | | alloc8192 144x | 11802 | 445694 | | alloc8192 160x | 13083 | 514547 | | alloc8192 176x | 14414 | 582501 | | alloc8192 192x | 15746 | 654346 | | alloc8192 208x | 17044 | 712620 | | alloc8192 224x | 18405 | 769963 | | alloc8192 240x | 19744 | 843969 | | alloc8192 256x | 21160 | 917803 | +-----------------+---------+----------+ Scudo performs fairly well for a hardened memory allocator, but we're optimizing for performance. Full benchmark data with graphs: https://docs.google.com/spreadsheets/d/1LG_kxaK5cI14gGtnyM-nNNmfpMdV9Vh-LtYoq7H5J4s/edit Change-Id: Ia4901eedfaa2c9779678c5b6532979de4919ee01
2022-04-04Merge a9438b7e146dc478609fd9d6e8f7d6dcb453316b on remote branchLinux Build Service Account
Change-Id: I5b1c9d38840aa282c163a78a95444144c59dee57
2022-03-23Snap for 8343869 from f3d2af29a7965555d717798faee043c536b86b2f to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I6a04b5d19eefd1210fe07399797fceb909010cb6
2022-02-27Merge 23ac20ab05ecba77fcabc7e34cfdb1b3c757417e on remote branchLinux Build Service Account
Change-Id: Ief5b7f7ec15e6cb429e2d8cbe2230419f3b0dd7a
2022-02-22Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Ia2198b401a3a907c785316e0ef4c00bf27fa59b1
2022-02-13Snap for 8179158 from 18e710a4c1d799ac2e1094cee6a65dd719a29c2b to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I1a5baf1f5162c9dca86f3c4697329dd6add60349
2022-02-12Merge s-mpr-2022-02-05-2Eric Arseneau
Change-Id: Iac9cbd1ef2fd0e8a8e0d6476ba4ca31df4588869
2022-01-30Merge d76ed561af8ea4994a559115ea0c3d506ea0df9e on remote branchsugisawaLinux Build Service Account
Change-Id: Icf3e912729e0246afcf58c12413030964f460ffe
2022-01-16Merge 41fce2048dca9ef986cd67752f7fc969ae0e98cb on remote branchLinux Build Service Account
Change-Id: I87604ce4d1e9674f0192b0954eee7f09ee5d4b97
2022-01-09Snap for 8056754 from fa7cdc4e82c9d7194265cd0d6960b41ff3f51cff to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I795f4219ec67c3087f8c2353cec9bdd926669617
2022-01-06Merge s-mpr-2022-01-05Eric Arseneau
Change-Id: I77bfcc4f111ada9c450b91ba1bfe424098b2fcb7
2021-12-23Snap for 8024443 from d18eb90ee335903d3f38061bee02a070e0edc09b to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I86ca47c95ab934a89b509ae5e1c2ee08495a5317
2021-12-20Snap for 8014993 from 77e7cca709d67b6869b108bef9127d3cf7ebc259 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Ia8a40832255e15e3cf63858335abb1974146f438
2021-12-19Merge s-mpr-2021-12-05Eric Arseneau
Change-Id: I4d15554f00e969168f90cb5fbce561d403090b57
2021-12-06Merge mpr-2021-11-05Eric Arseneau
Change-Id: Ic1776206644f4ccaea55efb729fe6e76ba4e9dbd
2021-11-19Snap for 7929330 from 1ec0946834b56d44fe69256ad6bbbe72f551b991 to sc-v2-releaseAndroid Build Coastguard Worker
Change-Id: Iea6c8d6a7d6a8a0a15ca5748b82989ad50034dd6
2021-11-17Regression test for scudo crash in resizeTaggedChunk.Evgenii Stepanov
This is a copy of the upstream scudo test for CTS: https://reviews.llvm.org/rG913d78c40c37c9c3428285d868ce454b058e40f3 Bug: 206701345 Test: CtsBionicTestCases Merged-In: I76b6b33c0665d7ad3bdd8c07d39a39d0d24d94df Change-Id: I76b6b33c0665d7ad3bdd8c07d39a39d0d24d94df (cherry picked from commit f0d7a34e257494c7a0248e399849bb714bb9fcc4)
2021-11-10Snap for 7901677 from 455d1c5f8e93165800654f403850eda8a59605ec to ↵Android Build Coastguard Worker
sc-platform-release Change-Id: Ia08da83dedf7775f77e59ec5565125dfbafaf57d
2021-11-08Merge commit '30450cb2a561e09d493231f4723b0653e9e070ac' into sc-platform-mergeYimin Li
Change-Id: I3ce093d646382484c59a5b812add8930102e8824
2021-10-08Merge cc0d75255416a13cb6bbc53beb9dd40fba634aa3 on remote branchLinux Build Service Account
Change-Id: I75b78da9bdcccf96b7357ee6006951dcacda57ae
2021-09-21Snap for 7751031 from 4e9614a919c4310ff71a04ee1da0edb7cb1c741e to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Icbdc03f76e3aafef2620036e2d6a2f14925e9049
2021-09-20Merge commit '51c3fe77e08b835cada85d5018c1d6cd60ab241e' into ↵Murtuza Raja
ks-aosp.lnx.12.0.r1-rel Change-Id: Ib9eed8793a616536d446a813118fa0d072031701
2021-09-20[automerger skipped] Merge mpr-2021-09-05 skipped: a01e270506Eric Arseneau
Change-Id: Ib5f6933fbd687fa3521590da5a405e0bc42b4b60
2021-09-16Merge mpr-2021-09-05Eric Arseneau
Change-Id: I82d656e81a678ca57a5351d886eda9fc64cf01f3
2021-08-26Snap for 7676194 from 7a24da08feedebfc4d6b2097cef945aa714d68c5 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Ic7565358b6fca0ca9fd2497cbe15695a13a43b6a
2021-08-26Merge 50ea1df5ef98170dec5ac2834b6587fae1d11e67 on remote branchLinux Build Service Account
Change-Id: Ib8d2e57184758c537de47c68b5e8233cc6a34b5b
2021-08-18Dynamic handling of memcpy based on BTI supportVinay Verma
CRs-Fixed: 3017053 Change-Id: I80cd3a88efb175ee155c534c3548e70613df5947
2021-08-14Snap for 7642774 from ba95279d3699136eccc9517011575d151940add9 to sc-v2-releaseAndroid Build Coastguard Worker
Change-Id: I5bfc56edf40d10e7a80e159c9ba3146b2be3e002
2021-08-14Snap for 7641961 from f83fcbcb01610506e51f42e8ff6463155c2ca811 to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: Ie09c761bf4d171d3c90a39a764ecd8a96c309c8c
2021-08-14Snap for 7641964 from 1f637922e6ad0e7ec723619342c715f544fcfa60 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: Ia7fd1c358b5e7a9bbc581f36403b6a81354edb53
2021-08-13[automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream ↵Xin Li
am: 1f637922e6 -s ours am: f83fcbcb01 -s ours am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344 Change-Id: Ib8a594755ef47b3fec1febac187fae670dfb613b
2021-08-13[automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream ↵Xin Li
am: 1f637922e6 -s ours am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344 Change-Id: I207ce5881b3f64fc67e08b39543b787029c3959c
2021-08-13[automerger skipped] Merge ab/7633965 am: ad19c87f80 -s oursThe Android Open Source Project
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546708 Change-Id: If48afed66b2c159c6ef27b9e0fde2715a31615b6
2021-08-13Merge stage-aosp-sc-ts-dev before making it an upstreamXin Li
Bug: 169893837 Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c Change-Id: Ib15d857903753f890e6a75f2815a441359a81fc5
2021-08-12Merge ab/7633965The Android Open Source Project
Bug: 169893837 Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c Change-Id: I4494985e98790e8934f10c8ba6f6f2207b3050ab
2021-08-09Snap for 7623707 from 5abf54a6770366807a5c54f66247c0eba3adab12 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Ic5e711bebeba51180f4bd27427bedfc652246c33
2021-08-04Merge SP1A.210803.001Scott Lobdell
Change-Id: Ib79c79d88ec6388533e450dae94239e736f40fcb
2021-08-02Snap for 7602994 from 57d945d1bb7fc8e1f60f151e7bac6fc1ed998053 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I4e238044391e3b2abd954fff579faa63de76ebd1
2021-08-02Merge 7290ff7cfa79abad5f0a3b2d77383eea2ec90077 on remote branchLinux Build Service Account
Change-Id: Ic055a046e8aaed75b4cad2c1f7d3704b63478bf9
2021-07-29Snap for 7592414 from ab5c8dbdfe310554b96e0261d148166a9726d2f9 to sc-v2-releaseAndroid Build Coastguard Worker
Change-Id: I4d75a6257aadef2bc14610be7cd50f7982393873
2021-07-28Snap for 7590665 from bb5475827153cdd2abecf4f83272ffadd1e7ed18 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I728e68afa22a407d0f3743e281f69a1ef9bf34a0
2021-07-28Revert "Adding system property tracing" am: c75fbc7b8aBowgo Tsai
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353073 Change-Id: Ie4d44a33bcad9bb9cb7284f83f423a019eaef470
2021-07-28Revert "bionic_systrace: moving global static variables" am: 2ebdb61620Bowgo Tsai
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353072 Change-Id: I64fcdf3d6ab229f38b8985042d68d04a26164f80
2021-07-27Merge SP1A.210723.002Scott Lobdell
Change-Id: I0fe27377cab01d329a1e8fbe80c2f9d8a0e35a30
2021-07-24Snap for 7579381 from c75fbc7b8a7a04feacab54cffc1c3129e0e4d769 to sc-releaseAndroid Build Coastguard Worker
Change-Id: I08e2cecb525052d31708b781c91debb234598d5b
2021-07-24Snap for 7579381 from c75fbc7b8a7a04feacab54cffc1c3129e0e4d769 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I9ee20be01d8ce5e9560651fc3dcd9ceb8bdc1fe4
2021-07-23libc: add memcpy_neon.Sungwook Jung
CRs-Fixed: 2966364 Change-Id: I3f69d2d21a2cc7840b7ad023fb95df8952274683
2021-07-23Merge SP1A.210715.002Scott Lobdell
Change-Id: I451b8f6dc6971aab0eb81b6ece795a23cf3c94b7
2021-07-22Revert "Adding system property tracing"Bowgo Tsai
Revert submission 1403568-sysprop_trace Reason for revert: makes property get/set non-reentrant Reverted Changes: I6f85f3f52:Add systrace tag for system property Id2b93acb2:Adding system property tracing Id78992d23:Add systrace tag for system property I1ba9fc7bd:Add systrace tag for system property Bug: 193050299 Test: build and boot a device Change-Id: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c (cherry picked from commit 61a5a8380d6417e9b85bb2f6a4a694ef4222031f)
2021-07-22Revert "bionic_systrace: moving global static variables"Bowgo Tsai
This reverts commit 1e1c7845aab0542306f61d8e8c880aca096ea336. Reason for revert: makes property get/set non-reentrant Bug: 193050299 Test: build and boot a device Change-Id: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89 Merged-In: If59e3dc25684a3c2b1d3ff74f995311afe6c6e89 (cherry picked from commit 3ec21f527acbaefb5f7a114125bc7a93baa780c7)