summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [SectionMemoryManager] Don't just drop the RO free listKeno Fischer2016-01-101-3/+0
| | | | | | | | | | | | | In r255760, I optimized the SectionMemoryManager to make better use of virtual memory on platforms where the allocation granularity was bigger than the protection granularity. As part of this, fixing up the free list became more complicated and was moved into `applyMemoryGroupPermissions`. Unfortunately, I forgot to actually remove the call that drops the free list for RO memory (I did remove the corresponding one for RX memory), defeating the whole optimization. llvm-svn: 257293
* [SectionMemoryManager] Make better use of virtual memoryKeno Fischer2015-12-161-23/+66
| | | | | | | | | | | | | | | | | Summary: On Windows, the allocation granularity can be significantly larger than a page (64K), so with many small objects, just clearing the FreeMem list rapidly leaks quite a bit of virtual memory space (if not rss). Fix that by only removing those parts of the FreeMem blocks that overlap pages for which we are applying memory permissions, rather than dropping the FreeMem blocks entirely. Reviewers: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15202 llvm-svn: 255760
* Fix performance problem in long-running SectionMemoryManagersKeno Fischer2015-10-011-4/+15
| | | | | | | | | | | | | | | | | | | | | Summary: Without this patch, the memory manager would call `mprotect` on every memory region it ever allocated whenever it wanted to finalize memory (i.e. not just the ones it just allocated). This caused terrible performance problems for long running memory managers. In one particular compile heavy julia benchmark, we were spending 50% of time in `mprotect` if running under MCJIT. Fix this by splitting allocated memory blocks into those on which memory permissions have been set and those on which they haven't and only running `mprotect` on the latter. Reviewers: lhames Subscribers: reames, llvm-commits Differential Revision: http://reviews.llvm.org/D13156 llvm-svn: 248981
* [SectionMemoryManager] Use range-based for loops. No functional change intended.Benjamin Kramer2015-08-311-21/+10
| | | | llvm-svn: 246440
* [Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine.Lang Hames2015-02-061-0/+178
This is a more sensible home for SectionMemoryManager, and allows the implementation to be shared between Orc and MCJIT. llvm-svn: 228427
OpenPOWER on IntegriCloud