aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-03Fix miscalculating large memory allocations.android-10.0.0_r29android-10.0.0_r28android-10.0.0_r27android-10.0.0_r26android-10.0.0_r25android-10.0.0_r24android-10.0.0_r23android-10.0.0_r22android-10.0.0_r21android-10.0.0_r20android-10.0.0_r19android-10.0.0_r18android-10.0.0_r16android-10.0.0_r15android10-qpr1-releaseandroid10-qpr1-d-releaseandroid10-qpr1-c-s1-releaseandroid10-qpr1-c-releaseandroid10-qpr1-b-s1-releaseandroid10-qpr1-b-releaseChristopher Ferris
am: 158f084de4 Change-Id: Iceba2489e1d528b98713bb3551ddf037303f0a7d
2019-05-02Fix miscalculating large memory allocations.android-mainline-10.0.0_r9android-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android-mainline-10.0.0_r10android-10.0.0_r9android-10.0.0_r8android-10.0.0_r7android-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android-10.0.0_r33android-10.0.0_r32android-10.0.0_r31android-10.0.0_r30android-10.0.0_r14android-10.0.0_r13android-10.0.0_r12android10-qpr3-s1-releaseandroid10-qpr3-releaseandroid10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-releaseandroid10-qpr2-s1-releaseandroid10-qpr2-releaseandroid10-qpr1-mainline-releaseandroid10-mainline-media-releaseandroid10-devandroid10-d4-s1-releaseandroid10-d4-releaseandroid10-c2f2-s2-releaseandroid10-c2f2-s1-releaseandroid10-c2f2-releaseChristopher Ferris
Bug: 131864803 Test: New bionic unit test to make sure that mallinfo and malloc_info match. Change-Id: Id2fd0c38106fa0150ff6baae538ecaea356296ec
2019-05-01Remove unused stats from cache structure.Christopher Ferris
am: 801fe3af80 Change-Id: I883791d5235bae93594310a5aaef58fc9e14d877
2019-05-01Remove unused stats from cache structure.Christopher Ferris
Removing the stats make the whole cache structure fit in a single page. Bug: 131362671 Test: Verified that all bionic malloc benchmarks are still the same. Test: It turns out that the malloc_sql benchmarks seem to get faster. Test: Verified that after this change, it saves about 2K PSS per thread. Change-Id: I4dcd633543f05f1a9d47db175f9977ddb42188a9 (cherry picked from commit a8b52518654725e64def5ebbd0ed472100e5a522)
2019-04-09Fix performance of multiple same size allocations.Christopher Ferris
It was found that keeping just a few allocations of the same size around (even up to only 3) increases the allocation time significantly. This appears to be because I set the minimum tcache entries to 1. Removing this and the performance comes mostly all of the way back. There is still some loss, but probably just due to a different bin layout than jemalloc 4.x. This does increase the PSS slightly for many processes. About 1MB in my trace runs. However, it increases the performance of most multiple allocations by a factor of three. Bug: 129743239 Test: Ran memory_replay on all traces. Test: Ran new bionic benchmarks to verify things get better. Change-Id: Iff41d5b5002919c4df03fcb7d742e501f9e38b8e Merged-In: Iff41d5b5002919c4df03fcb7d742e501f9e38b8e (cherry picked from commit 0af4ee86dfa643feb786d659dbb219133c776a34)
2019-04-03Merge master@5406228 into git_qt-dev-plus-aosp.Bill Rassieur
am: 69a24699a4 Change-Id: Iefbbbefa572a090befc750ccea46ee8cbdc3c086
2019-03-29Merge master@5406228 into git_qt-dev-plus-aosp.Bill Rassieur
Change-Id: I31e10da5bb3c0ee66b71a2f69c010acfaeeef6db BUG: 129345239
2019-03-22Fix bug trying to examine unused extents. am: 46971b81ee am: 08d6c0f845Christopher Ferris
am: 766934fd92 Change-Id: Ic95f585264bf0b8ab7f75b8a04c04bc5ca779e17
2019-03-22Fix bug trying to examine unused extents. am: 46971b81eeChristopher Ferris
am: 08d6c0f845 Change-Id: I25764bf0f640d5cd24331b2dba9715860fdf4faf
2019-03-22Fix bug trying to examine unused extents.Christopher Ferris
am: 46971b81ee Change-Id: I2c52b0d542aa1c273857486d312675f63625a6dc
2019-03-22Fix bug trying to examine unused extents.Christopher Ferris
Bug: 124264835 Test: Ran bionic unit tests. Test: Ran dumpsys -t 6000 meminfo --unreachable of chrome process without Test: crashing. Change-Id: I2cc66e443fa278621b9878a888c74f38efcb79eb
2019-03-18Remove best fit for extent selection. am: cc374363ec am: b4e426ffebChristopher Ferris
am: 27c2c8bead Change-Id: I421cf23cfc8d2bb0280546c2217861ecc6d93f14
2019-03-18Remove best fit for extent selection. am: cc374363ecChristopher Ferris
am: b4e426ffeb Change-Id: I7cf232a3f365c7563ee96b415f898a1d6842254e
2019-03-18Remove best fit for extent selection.Christopher Ferris
am: cc374363ec Change-Id: Ia44573af27aa921a31bd2e798066b43dc1d72d10
2019-03-18Remove best fit for extent selection.Christopher Ferris
A jemalloc user reported that the best fit selection is causing them a memory leak. This code has been completely removed from the next release of jemalloc (5.2.0), so remove it since it doesn't have any real benefit. See https://github.com/jemalloc/jemalloc/issues/1454 Running the memory dumps, removing best fit appears to be a win: it is slightly faster and has the same PSS/VA. Bug: 128697497 Test: Ran jemalloc unit tests. Test: Ran memory dumps in 32 bit and 64 bit and observed that the PSS Test: and VA stayed the same, while run time improved slightly. Change-Id: I98a8ddf2cea837c8ade1afd4a998960c253d3932
2019-02-25Merge stage-aosp-master into pi-dev-plus-aospXin Li
am: 0b13d0583d Change-Id: I5257268590878a34464f9028bc9b4b667828e953
2019-02-25Merge stage-aosp-master into pi-dev-plus-aospXin Li
Bug: 126125118 Change-Id: I0485d2754a7a36d6b228f2926d2fc06e96a08c11
2019-02-20DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-masterXin Li
Bug: 120848293 Change-Id: I38bf95211e9e25ff919ac7260cc7822bdaee7948
2019-02-15Don't compile background thread support. am: 347192e6aa am: 4135abe739Dan Albert
am: 1078c77e37 Change-Id: I1b4d6abc8d7f3d2d2f1779edf66717f17cac4bd8
2019-02-15Don't compile background thread support. am: 347192e6aaDan Albert
am: 4135abe739 Change-Id: I9287434a0071573eb6766c5dcfb4c8f0af7a5627
2019-02-15Don't compile background thread support.Dan Albert
am: 347192e6aa Change-Id: I69b6d3f3e0b0cc84a0cffc3945c2e61e667a97b4
2019-02-14Don't compile background thread support.android-q-preview-1Dan Albert
We don't currently use this and it causes libc.a to have a dependency on libdl because it interposes pthread_create with dlsym. Test: treehugger Bug: None Change-Id: I259ed5eb8e72045430aee90df1124c1906512fcd
2019-01-08Add default code reviewers into OWNERS am: ab33b153b4 am: 7a1cc0cb97Chih-Hung Hsieh
am: bb955dfb55 Change-Id: I4207473a67504d09dfac4cc7ac27579ddb7ab537
2019-01-08Add default code reviewers into OWNERS am: ab33b153b4Chih-Hung Hsieh
am: 7a1cc0cb97 Change-Id: Id7543021974d21db04664495528b0284538b8f60
2019-01-08Add default code reviewers into OWNERSChih-Hung Hsieh
am: ab33b153b4 Change-Id: I777085a822a84cdd4c94df0ffa0d2de058ab0176
2019-01-08Add default code reviewers into OWNERSChih-Hung Hsieh
Bug: 33166666 Test: gerrit uploader Change-Id: I6c36b8e1c927160b7770f65c0fc1b10517a314aa
2018-12-04Prevent dependency cycle on linux_bionic due to system_shared_libs ↵Roland Levillain
expansion. am: 759026fed9 am: bf51fc27ed am: b96806f4a5 Change-Id: I30a0794c0230cb5ae0d633166e1eb13695b59d90
2018-12-04Prevent dependency cycle on linux_bionic due to system_shared_libs ↵Roland Levillain
expansion. am: 759026fed9 am: bf51fc27ed Change-Id: I37f7b06ffc8cf5d31a84b6d9eb04cd862c98c548
2018-12-04Prevent dependency cycle on linux_bionic due to system_shared_libs expansion.Roland Levillain
am: 759026fed9 Change-Id: I181a8edb6255056e318a5c1ccedee35dc24b329b
2018-12-04Prevent dependency cycle on linux_bionic due to system_shared_libs expansion.android-wear-8.0.0_r2Roland Levillain
Test: Rely on ART (linux-bionic build target) postsubmit testing. Bug: 31559095 Change-Id: Ie911abd8ca173b231c03730c326de7777b97452c
2018-12-03 Prevent dependency cycle due to system_shared_libs expansion am: 1f8849fffd ↵Dan Willemsen
am: 2f36dd205c am: 6a39aeaf1f Change-Id: I5c3578922de01ff383aa618d194a26215fb179f1
2018-12-03 Prevent dependency cycle due to system_shared_libs expansion am: 1f8849fffdDan Willemsen
am: 2f36dd205c Change-Id: I07e5326733d920af74d4b2496b491b4628de4828
2018-12-03 Prevent dependency cycle due to system_shared_libs expansionDan Willemsen
am: 1f8849fffd Change-Id: I398a8be3f958cccb903379aa9871979dda8424b4
2018-12-03 Prevent dependency cycle due to system_shared_libs expansionDan Willemsen
It was discovered that we were building some objects inconsistently due to an optimization in cc_library to only build objects once and use them for both the static and shared libraries. But static libraries didn't get system_shared_libs set automatically, and we didn't notice that we would have built the objects differently. So static libraries now get the default system_shared_libs, we allow adjusting that for static vs shared in a cc_library, and we disable the optimization if the linked libraries are configured differently between static and shared in a single cc_library. This triggers dependency cycles for static libraries that libc/libdl use, so fix those cycles here. Test: treehugger Change-Id: I75cd76db2366179c7e38578210db728e6181442c
2018-11-29Ignore extents that are not associated with a size. am: 13715ae41a am: ↵Christopher Ferris
cd4da0a323 am: bbdecd75a8 Change-Id: I9f6cb4246e3acd1bf581df3904614ba79f374061
2018-11-29Ignore extents that are not associated with a size. am: 13715ae41aChristopher Ferris
am: cd4da0a323 Change-Id: I7038703ccfbea3b01f82f9d6edd69ea59496073d
2018-11-29Ignore extents that are not associated with a size.Christopher Ferris
am: 13715ae41a Change-Id: Ic5a384917f9ffa5ff72f3b243aa64bdb01f34283
2018-11-28Ignore extents that are not associated with a size.Christopher Ferris
Bug: 120032857 Test: Passes unit tests. Test: Ran dumpsys -t 300 meminfo --unreachable -a without crashes. Change-Id: I3d784ed2b449970966403bed7d701e2ff7434fba
2018-11-26Fix mallinfo counting for large allocations. am: 08ccc19933 am: 7693773220Christopher Ferris
am: a2b4c8c34a Change-Id: I133d7fd3a2efd48137c52482b13418c10473c318
2018-11-26Fix mallinfo counting for large allocations. am: 08ccc19933Christopher Ferris
am: 7693773220 Change-Id: Ia1f9ba21ab7a255f2e6013c8ea7d611d9afb7dd1
2018-11-26Fix mallinfo counting for large allocations.Christopher Ferris
am: 08ccc19933 Change-Id: Idd0442c57e11d5f7497c8d87f2d80f560a3fdbd4
2018-11-26Fix mallinfo counting for large allocations.Christopher Ferris
The lstats part of the arena structure was not being countered at all, so added that counting for mallinfo. Bug: 119580449 Test: New unit tests pass, without changes, the test fails. Change-Id: I97b231f9189a79f0ce0f55fe6c4cc00266ca75ac
2018-11-13Change the minimum map size. am: 75569e30c5 am: a1f7a3baccChristopher Ferris
am: a2f0181050 Change-Id: I4cad40f6f2347b5e831d6d0ddd3bc4203cd90aa7
2018-11-13Change the minimum map size. am: 75569e30c5Christopher Ferris
am: a1f7a3bacc Change-Id: I8082c1358c87a0092ed6e4c30739104a4c47676a
2018-11-13Change the minimum map size.Christopher Ferris
am: 75569e30c5 Change-Id: Ia8eb69bbc660bfe8e5e55a7b1abb0803fa850bec
2018-11-13Change the minimum map size.Christopher Ferris
Change the minimum size of a map to make sure that the entropy of allocations is no worse than jemalloc4. At a future point, we should see how increasing entropy affects performance. Test: All unit tests pass. Change-Id: I644f4fc84fa4ad80ce37fecbe48accbd6cb1034e
2018-11-02Further updates to jemalloc code. am: c6954b2064 am: e1ad3f0e8bChristopher Ferris
am: 3bff253f72 Change-Id: I46c6e93a753024d4b9f31df3c4220d0fd5be21b1
2018-11-02Further updates to jemalloc code. am: c6954b2064Christopher Ferris
am: e1ad3f0e8b Change-Id: I00da735a1c6105f4a0320c779c844dc39c41d4e0
2018-11-02Further updates to jemalloc code.Christopher Ferris
am: c6954b2064 Change-Id: I014598f8c8bd19958546dc7ea7dc9e114faabe6c
2018-11-01Further updates to jemalloc code.Christopher Ferris
Add support for svelte. Add je_iterate support. Update some of the internals so that bad pointers in je_iterate do not crash. Test: Ran new bionic unit tests, ran libmemunreachable tests, booted system. Change-Id: I04171cf88df16d8dc2c2ebb60327e58b915b9d83