在图钉工具中获取物理地址 [英] Getting physical address in pin tool

查看:83
本文介绍了在图钉工具中获取物理地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用引脚检测工具来获取内存跟踪. 根据我的实施结果,我发现这些跟踪指示虚拟地址,而不是物理地址. 有什么方法可以在Pin工具中获取物理地址跟踪? 救命!

I'm using pin instrumentation tool to get memory traces. By my implementation result, I've found the traces indicate virtual address, not physical address. Is there any way to get physical address trace in Pin tool? Help!

推荐答案

pin工具在用户空间中运行,因此仅适用于虚拟地址.无法直接从销钉工具的API获取物理地址.

The pin tool runs in user space and therefore it works with virtual addresses only. There is no way to get the physical addresses directly from the pin tool's API.

将虚拟地址转换为物理地址的另一种方法是在pin工具中使用操作系统的页面映射API.在Linux中,可以通过使用/proc/<pid>/pagemap来实现.互联网上有很多示例,它们演示了如何将虚拟地址转换为物理地址,您可以通过在Google中搜索"Linux虚拟到物理内存映射"来找到一些示例.

An alternative approach to translate the virtual addresses to physical addresses would be to use the OS's page mapping API inside your pin tool. In Linux this might be possible by using /proc/<pid>/pagemap. There are many examples on internet that demonstrate how to translate virtual addresses to physical addresses and you can find some by searching in google for "linux virtual to physical memory map".

这篇关于在图钉工具中获取物理地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆