PEBIL (pebil) - README
2.2 Binary Instrumentation Packages for Gathering Computational Trace
The PMaC Prediction Framework relies on binary instrumentation to gather information about the computational work done during an application run. The information in a computational trace is the floating point operation count, memory operation count, and simulated cache hit rates (stored per basic block for each level of the caches in the memory hierarchy) of the target machine(s). Each basic block in an application is given a unique ID that is assigned to it in a consistent manner during each instrumentation pass. The unique ID for every basic block in the application is consistent as long as the executable is kept the same . The simulated cache hit rates are computed on-the-fly during the trace by inputing the address stream of the instrumented running application into a cache simulator. The specifications for the cache or caches to be simulated are specified in the CacheStructures.h and describe in more detail in section 2.2.1.3.
To gather computation traces, PMaC provides two instrumentation tools. PEBIL is a binary editing tool for X86/Linux systems (described in this document) and PMaCInstrumentor is a binary editing tool for IBM Power/AIX systems.
2.2.1 PEBIL
PEBIL is a binary instrumentation toolkit that operates on ELF binaries on Linux for x86/x86_64 processors. PEBIL has a C++ API that provides the means to inject code and data into a binary file. It also provides several pre-implemented tools for basic block counting and cache simulation for a set of memory hierarchies.
2.2.1.1 Installation for Application Tracing
Host Systems: Any X86/Linux
The source code for the PEBIL library and instrumentation tools is available at through PMaC Laboratories by e-mailing help@pmaclabs.com.
The directory structure of distribution is as follows:
$ cd /home/userid/tools/PEBIL
$ ls
bin/ include/ instcode/ Makefile scripts/ testapps/ tools/ docs/ etc/ lib/ src/
The include, src, tools, and instcode directories contain the source code for instrumentation related libraries and instrumentation tools. The bin and lib directories contain the executables and shared libraries after building the distribution. The scripts directory contains additional PERL scripts to assist application tracing for high level instrumentation activities.
After retrieving the source, users can change to the top directory of the distribution and follow the instructions in the INSTALL to build the distribution. After building the executables and shared libraries, it is also advised to link or copy the scripts in the scripts directory to the bin directory of the distribution so that the scripts will be found in user's path as well. The following is an example of this procedure:
$ cd /home/userid/tools/PEBIL
$ gmake clean
$ gmake
$ cd bin
$ ln -s ../scripts/selectSimBlocks.pl selectSimBlocks.pl
$ ln -s ../scripts/traceHelper.pl traceHelper.pl
The Makefile at the top directory /home/userid/tools/PEBIL iterate over sub directories and run the appropriate make commands. Alternatively, users can follow the same steps manually. Instead of gmake at the top directory, the users can run the following. Note that the order of making src should come before the order of making tools directory. For an installed distribution to work, minimal set of steps is to make src, tools and instcode directories.
$ cd /home/userid/tools/PEBIL
$ cd ./src
$ gmake
$ cd ../tools
$ gmake
$ cd ../instcode
$ gmake
Manually following the make steps is particularly useful when the default configuration (configuration that comes with the source code) is not used for building the instcode directory. There are various ways of building the code under this directory and the available compilation macros are described in details in Section 2.2.1.2.
To use PEBIL, users need to include the bin directory of distribution to their path. Thus, if a particular distribution needs to be used, the user needs to set the path variables accordingly before using that distribution as the name of the executable and additional PERL scripts would be the same. When installed properly, the PEBIL executable, pebil, should be in user's path. It can be checked using the which command of Unix from a different directory (you may need to source .cshrc/.tcshrc or .profile/.bashrc files for paths to be adjusted). The --help option will print a brief usage information.
$ source ~/.cshrc
$ which pebil
/home/userid/tools/PEBIL/bin/pebil
$ pebil --help
usage : pebil
--typ (ide|dat|bbt|cnt|jbb|sim|csc)
--app <executable_path>
--inp <block_unique_ids> <-- valid for sim/csc
[--lib <shared_lib_topdir>]
[--ext <output_suffix>]
[--dtl]
[--lpi] <-- valid for sim/csc
[--phs <phase_no>] <-- valid for sim/csc
[--dfp <pattern_file>] <-- valid for sim/csc
[--help]
Brief Descriptions for Options:
===============================
--typ : required for all. Instrumentation type.
--app : required for all. Executable path.
--lib : optional for all. Instrumentation shared library top
directory. default is $PEBIL_LIB
--ext : optional for all. File extension for output files.
default is (typ)inst, such as jbbinst for type jbb.
--dtl : optional for all. Enable detailed .static file with line numbers
and filenames. default is no details.
--inp : required for sim/csc. File including list of block ids to instrument
--lpi : optional for sim/csc. Loop level block inclusion for
cache simulation. default is no.
--phs : optional for sim/csc. Phase number. defaults to no phase,
otherwise, .phase.N. is included in output file names
--dfp : optional for sim/csc. dfpattern file. defaults to no dfpattern file,
2.2.1.2 Installation for MultiMAPS Tracing
Host Systems: Any X86/Linux
In the framework, the MultiMAPS data for a target system needs to be augmented with the cooresponding hit rates. To accomplish this, MultiMAPS needs to be traced with the target systems cache structure. The default PEBIL installation, which comes configured for application tracing, uses address stream sampling for cache simulation. Rather than using every address in the address stream of an application run, it uses only a subset of addresses in the address stream and simulates them for the target memory subsystems. This method of sampling the address stream has been used to reduce the overhead of instrumentation. For MultiMAPS tracing, however, the entire address stream needs to be consumed for cache simulations, therefore sampling should not be used. Hence, separate installations of PEBIL are needed for tracing MultiMAPS for cache hit rates.
To install PEBIL for MultiMAPS tracing, you need to edit the instcode/Makefile file under the PEBIL installation directory (a different directory than the one installed for application tracing) and repeat the installation process described in Section 2.2.1.1 for this new directory. To install pebil for MultiMAPS tracing, user needs to replace the EXTENDED_SAMPLING compilation macro in instcode/Makefile with the NO_SAMPLING_MODE compilation macro. Assuming the source code for PEBIL for MultiMAPS tracing is under /home/userid/mmaps user needs to;
$ cd /home/userid/mmaps/PEBIL
$ vi instcode/Makefile
### change extended sampling mode to no sampling mode
#EXTRA_CFLGS = -DEXTENDED_SAMPLING -DPER_SET_RECENT -DVICTIM_CACHE
EXTRA_CFLGS = -DNO_SAMPLING_MODE -DPER_SET_RECENT -DVICTIM_CACHE
$ gmake
2.2.1.3 Using a Different Set of Memory Hierarchies (Caches)
The PEBIL source is distributed with a set of memory hierarchies to be used in cache simulation runs. However, it also is flexible enough to easily allow a different set of memory hierarchies with the installation. PEB
没有合适的资源?快使用搜索试试~ 我知道了~
PEBIL静态插桩工具
共491个文件
html:98个
c:71个
h:68个
需积分: 9 7 下载量 201 浏览量
2018-10-24
22:22:00
上传
评论 1
收藏 15.24MB ZIP 举报
温馨提示
PEBIL,一款静态插桩工具,工具实现了三个基本功能,具体情况可以在网上找到相关论文,可以在github上找到,不能上github的可以下载这个!
资源推荐
资源详情
资源评论
收起资源包目录
PEBIL静态插桩工具 (491个子文件)
rules. 216B
ReuseDistance.3 10KB
SpatialLocality.3 5KB
ReuseStats.3 4KB
tree234.c.3 3KB
ReuseDistance.hpp.3 3KB
tree234.h.3 2KB
ReuseDistance.cpp.3 1KB
node234_Tag.3 937B
ReuseEntry.3 923B
foo.cpp.3 561B
tree234_Tag.3 518B
rules.32 203B
rules.64 205B
configure.ac 4KB
configure.ac 1KB
configure.ac 858B
Makefile.am 2KB
Makefile.am 602B
Makefile.am 269B
Makefile.am 146B
Makefile.am 96B
test32.asm 4KB
test64.asm 2KB
testobscure.asm 261B
testjmp.asm 189B
test16.asm 32B
class_reuse_distance.aux 7KB
tree234_8c.aux 4KB
class_reuse_stats.aux 4KB
refman.aux 4KB
class_spatial_locality.aux 3KB
_reuse_distance_8hpp.aux 3KB
tree234_8h.aux 3KB
_reuse_distance_8cpp.aux 2KB
struct_reuse_entry.aux 1KB
structtree234___tag.aux 1KB
itab.c 715KB
X86Instruction.C 159KB
ElfFileInst.C 94KB
ElfFile.C 74KB
X86InstructionFactory.C 69KB
InstrumentationTool.C 53KB
decode.c 51KB
Instrumentation.C 47KB
FlowGraph.C 37KB
Simulation.c 37KB
BasicBlock.C 34KB
Function.C 32KB
CacheSimulation.C 32KB
LineInformation.C 27KB
DynamicTable.C 26KB
tree234.c 25KB
pebil.C 24KB
TauFunctionTrace.C 24KB
HashTable.C 23KB
TextSection.C 22KB
MemTrack.C 22KB
LoopIntercept.C 19KB
SymbolTable.C 19KB
BasicBlockCounter.C 17KB
Base.C 16KB
CounterFunctions.c 15KB
FunctionTimer.C 12KB
RelocationTable.C 12KB
SectionHeader.C 12KB
Frequency.c 11KB
Classification.C 10KB
FileHeader.C 9KB
AddressAnchor.C 9KB
LengauerTarjan.C 9KB
RawSection.C 8KB
ContextTimers.c 7KB
sgTest.c 7KB
FunctionCounter.C 7KB
InstrumentationCommon.c 7KB
NoteSection.C 7KB
CallReplace.C 7KB
GnuVersion.C 7KB
udcli.c 6KB
input.c 6KB
TimerFunctions.c 6KB
DeadRegisterSquasher.C 5KB
syn-intel.c 5KB
ProgramHeader.C 5KB
BinaryFile.C 5KB
syn-att.c 5KB
GlobalOffsetTable.C 5KB
Loop.C 4KB
udis86.c 4KB
LoopTimer.c 4KB
tautrace.c 4KB
FlatTimers.c 3KB
DwarfSection.C 3KB
ClassifierFunctions.c 3KB
StringTable.C 2KB
classes.C 2KB
main.c 2KB
syn.c 2KB
dum.c 1KB
共 491 条
- 1
- 2
- 3
- 4
- 5
资源评论
Hannah_Xu333
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功