A cross-architectural interface for code cache manipulation

K. Hazelwood, R. Cohn
{"title":"A cross-architectural interface for code cache manipulation","authors":"K. Hazelwood, R. Cohn","doi":"10.1109/CGO.2006.3","DOIUrl":null,"url":null,"abstract":"Software code caches help amortize the overhead of dynamic binary transformation by enabling reuse of transformed code. Since code caches contain a potentially-altered copy of every instruction that executes, run-time access to a code cache can be a very powerful opportunity. Unfortunately, current research infrastructures lack the ability to model and direct code caching, and as a result, past code cache investigations have required access to the source code of the binary transformation system. This paper presents a code cache-aware interface to the pin dynamic instrumentation system. While a program executes, our interface allows a user to inspect the code cache, receive callbacks when key events occur, and manipulate the code cache contents at will. We demonstrate the utility of this interface on four architectures (IA32, EM64T, IPF, XScale) and present several tools written using our API. These tools include a self-modifying code handler, a two-phase instrumentation analyzer, a code cache visualizer, and custom code cache replacement policies. We also show that tools written using our interface have comparable performance to direct, source-level implementations. Both our interface and sample open-source tools that utilize the interface have been incorporated into the standard distribution of the pin dynamic instrumentation engine, which has been downloaded over 5,000 times in 18 months.","PeriodicalId":196640,"journal":{"name":"International Symposium on Code Generation and Optimization (CGO'06)","volume":"43 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2006-03-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Symposium on Code Generation and Optimization (CGO'06)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CGO.2006.3","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

Abstract

Software code caches help amortize the overhead of dynamic binary transformation by enabling reuse of transformed code. Since code caches contain a potentially-altered copy of every instruction that executes, run-time access to a code cache can be a very powerful opportunity. Unfortunately, current research infrastructures lack the ability to model and direct code caching, and as a result, past code cache investigations have required access to the source code of the binary transformation system. This paper presents a code cache-aware interface to the pin dynamic instrumentation system. While a program executes, our interface allows a user to inspect the code cache, receive callbacks when key events occur, and manipulate the code cache contents at will. We demonstrate the utility of this interface on four architectures (IA32, EM64T, IPF, XScale) and present several tools written using our API. These tools include a self-modifying code handler, a two-phase instrumentation analyzer, a code cache visualizer, and custom code cache replacement policies. We also show that tools written using our interface have comparable performance to direct, source-level implementations. Both our interface and sample open-source tools that utilize the interface have been incorporated into the standard distribution of the pin dynamic instrumentation engine, which has been downloaded over 5,000 times in 18 months.
用于代码缓存操作的跨架构接口
软件代码缓存通过支持转换后的代码的重用来帮助分摊动态二进制转换的开销。由于代码缓存包含执行的每个指令的可能被更改的副本,因此运行时访问代码缓存可能是一个非常强大的机会。不幸的是,目前的研究基础设施缺乏对代码缓存进行建模和指导的能力,因此,过去的代码缓存研究需要访问二进制转换系统的源代码。提出了一种用于引脚动态测量系统的代码缓存感知接口。当程序执行时,我们的接口允许用户检查代码缓存,在关键事件发生时接收回调,并随意操作代码缓存内容。我们演示了该接口在四种架构(IA32, EM64T, IPF, XScale)上的效用,并展示了使用我们的API编写的几个工具。这些工具包括自修改代码处理程序、两阶段检测分析器、代码缓存可视化工具和自定义代码缓存替换策略。我们还展示了使用我们的接口编写的工具与直接的源代码级实现具有相当的性能。我们的接口和使用该接口的示例开源工具都已被纳入pin动态仪器引擎的标准发行版,该引擎在18个月内已被下载超过5,000次。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术文献互助群
群 号:604180095
Book学术官方微信
小红书