使用PIN INTEL在64位系统配置的32位应用程序 [英] Profile 32-bit app on 64-bit system using INTEL PIN
问题描述
我编译使用C程序 - M32的gcc 的选项。我想配置文件使用PIN工具,这一计划。我的内核是64位。
I compiled a C program using -m32 gcc option . I want to profile this program using a Pin tool . My kernel is 64 bit.
我曾尝试: -
1)针-t64< 64位工具名> -t< 32位工具名> - <应用>
2)针-t< 32位工具名> - <应用>
3)针-t< 64位工具名> - <应用>
我有两个不同的32位和64位架构的编译工具相同的.cpp文件的工具。
I have the same .cpp tool file for both the tools compiled differently for 32 bit and 64 bit architectures.
案例3调用的错误无法加载。检查体系结构类型。
案例1和2,该命令是成功的,但产生了一些意想不到的输出,写入到一个文件中的图像前的名字是在这种情况下空的,但是当与64位应用程序执行包含正确的结果。这是建立对于这种情况下,销工具的正确方法是什么?
Case 3 invoked an error 'unable to load .. Check the architecture type' . Cases 1 and 2 , the command was successful but produced some unexpected output , for ex names of images written into a file is empty in this case but contains proper results when executed with a 64-bit application . Which is the correct way to set up the pin tool for this case?
推荐答案
有几个注意事项引脚控制下启动一个程序时,需要了解:
There are a few caveats to know when starting a program under pin control:
1)pintool 必须在相同的架构被编译比检测的程序(所以,如果你的程序是32位的,你的脚工具必须是32位)。
1) The pintool must be compiled in the same architecture than the instrumented program (so, if your program is 32-bit, your pin tool must be 32-bit).
2)确保您的系统安装程序在64位操作系统上运行32位程序(在某些Linux系统仍然需要 IA32-库
和/或需prepared执行32位程序(如 sudo的dpkg的--add-i386硬件架构
)
2) Ensure your system is setup to execute 32-bit programs on a 64-bit OS (some linux systems still need ia32-libs
and / or need to be prepared for executing 32-bit programs (e.g. sudo dpkg --add-architecture i386
)
3)确保您有所有为PIN 所需的库
3) Ensure you have all required libraries for PIN
4)使用<一个href=\"https://software.intel.com/sites/landingpage/pintool/docs/71313/Pin/html/index.html#PIN_LAUNCHER\"相对=nofollow> pin.sh
您的命令应该是:
-
针-t pintool.so - &lt;程序&GT; &lt;程序 - 选项&gt;
pin -t pintool.so -- <program> <program-options>
如果您仍然有问题,它可能是与你的pintool code的一个问题,而不是针本身。
If you still have problems it is probably a problem with your pintool code rather than pin itself.
你有没有在你的程序尝试简单的例子(如 inscount
)?
Did you tried one of the simple example (like inscount
) on your program ?
这篇关于使用PIN INTEL在64位系统配置的32位应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!