复杂项目中的高性能灵活内存分配器

I. Trub
{"title":"复杂项目中的高性能灵活内存分配器","authors":"I. Trub","doi":"10.1109/ISPRAS47671.2019.00010","DOIUrl":null,"url":null,"abstract":"The article proposes the methodology of data analysis and code design solutions to improve the flexibility of custom allocator assignment for simple data types and instances of data type classes. The methodology is based on special wrappers of memory functions, collecting data by the execution of source code, and analysing allocation/release traces with subsequent patterns extraction. Then the corresponding custom allocator is chosen for each pattern found and implemented in some module of source code as a container for user data, thus replacing malloc/free. The article describes the usage of the proposed approach for LLVM (Low Level Virtual Machine), which is a well-known tool for building compilers. It is shown that the choice of appropriate allocator provides the improvement of LLVM-based compiler's performance. An appropriate custom allocator is more effective than malloc, in particular, linear allocator is the best for StringMap and DomTreeNodeBase, stack allocator - for BitVector and linked list allocator - for Buckets. Aggregate performance improvement reaches around 10%. The methodology is implemented in shaders' compiler, but can be used in any project that uses LLVM or generally performs memory requests more or less intensively.","PeriodicalId":154688,"journal":{"name":"2019 Ivannikov Ispras Open Conference (ISPRAS)","volume":"117 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"High-Performance Flexible Memory Allocators in Complex Projects\",\"authors\":\"I. Trub\",\"doi\":\"10.1109/ISPRAS47671.2019.00010\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The article proposes the methodology of data analysis and code design solutions to improve the flexibility of custom allocator assignment for simple data types and instances of data type classes. The methodology is based on special wrappers of memory functions, collecting data by the execution of source code, and analysing allocation/release traces with subsequent patterns extraction. Then the corresponding custom allocator is chosen for each pattern found and implemented in some module of source code as a container for user data, thus replacing malloc/free. The article describes the usage of the proposed approach for LLVM (Low Level Virtual Machine), which is a well-known tool for building compilers. It is shown that the choice of appropriate allocator provides the improvement of LLVM-based compiler's performance. An appropriate custom allocator is more effective than malloc, in particular, linear allocator is the best for StringMap and DomTreeNodeBase, stack allocator - for BitVector and linked list allocator - for Buckets. Aggregate performance improvement reaches around 10%. The methodology is implemented in shaders' compiler, but can be used in any project that uses LLVM or generally performs memory requests more or less intensively.\",\"PeriodicalId\":154688,\"journal\":{\"name\":\"2019 Ivannikov Ispras Open Conference (ISPRAS)\",\"volume\":\"117 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2019 Ivannikov Ispras Open Conference (ISPRAS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ISPRAS47671.2019.00010\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 Ivannikov Ispras Open Conference (ISPRAS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISPRAS47671.2019.00010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

本文提出了数据分析方法和代码设计解决方案,以提高简单数据类型和数据类型类实例的自定义分配器分配的灵活性。该方法基于内存函数的特殊包装,通过执行源代码收集数据,并通过随后的模式提取分析分配/释放跟踪。然后为在源代码的某些模块中找到并实现的每个模式选择相应的自定义分配器作为用户数据的容器,从而取代malloc/free。本文描述了该方法在LLVM (Low Level Virtual Machine)中的用法,LLVM是一种构建编译器的知名工具。结果表明,选择合适的分配器可以提高基于llvm的编译器的性能。一个合适的自定义分配器比malloc更有效,特别是线性分配器对于StringMap和DomTreeNodeBase是最好的,堆栈分配器—对于BitVector和链表分配器—对于bucket。总性能提升达到10%左右。该方法在shaders的编译器中实现,但可以用于任何使用LLVM或通常或多或少密集执行内存请求的项目。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
High-Performance Flexible Memory Allocators in Complex Projects
The article proposes the methodology of data analysis and code design solutions to improve the flexibility of custom allocator assignment for simple data types and instances of data type classes. The methodology is based on special wrappers of memory functions, collecting data by the execution of source code, and analysing allocation/release traces with subsequent patterns extraction. Then the corresponding custom allocator is chosen for each pattern found and implemented in some module of source code as a container for user data, thus replacing malloc/free. The article describes the usage of the proposed approach for LLVM (Low Level Virtual Machine), which is a well-known tool for building compilers. It is shown that the choice of appropriate allocator provides the improvement of LLVM-based compiler's performance. An appropriate custom allocator is more effective than malloc, in particular, linear allocator is the best for StringMap and DomTreeNodeBase, stack allocator - for BitVector and linked list allocator - for Buckets. Aggregate performance improvement reaches around 10%. The methodology is implemented in shaders' compiler, but can be used in any project that uses LLVM or generally performs memory requests more or less intensively.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信