如何衡量应用程序级基准的 Windows API 代码覆盖率
我的工作涉及使用我没有来源的第三方工具进行系统级性能测试。我也在测试 Windows,并且可以使用调试符号,但不能使用 Windows 源代码。我想要一种定量的方式来描述我的测试涵盖的主机操作系统的领域。为此,有两个重要步骤:确定我想要查看哪些 DLL 和函数,然后确定如何分析对它们的调用。
覆盖范围的想法:
- 来自 kernel.dll、ntdll.dll、user.dll 等的所有函数...主要内置模块。这可能是一个巨大的杀伤力,并且可能会发现许多仅与已弃用的功能有关的差距。
- 只是目标应用程序使用的任何 DLL 的模块名称。没有那么详细,但也不太可能错过目标应用程序中的关键功能。
- 应用程序特定模块,例如用于 DirectX 10 应用程序的 d3d10.dll。
- 基本块。我猜这将是一篇博士论文的工作量。
分析思路:
- 对我的所有测试运行 VTune 调用图分析。这种方法可行,但似乎提供了实际调用哪些内置函数的有限视图。
- 使用 Pin 或 DynamoRIO 等动态检测应用程序。可能的缺点:慢。
- 使用 WinDbg 接听电话。不确定这是否比 Pin 更容易或更快。
- 使用 IDA Pro 等反汇编工具进行静态分析。
Windows 上有类似的已发表的作品吗?您是否曾经使用过这些工具之一进行挂钩或日志记录,足以推荐它?
My job involves system-level performance testing with third party tools that I do not have sources for. I'm also testing Windows, and can use debugging symbols but not Windows source code. I'd like a quantitative way to describe the areas of the host OS my tests cover. There are two big steps to this: identifying what DLLs and functions I want to look at, and then determining how to profile calls to those.
Ideas for coverage:
- All functions from kernel.dll, ntdll.dll, user.dll, etc... The main built in modules. This might be a huge amount of overkill and will probably identify lots of gaps that only have to do with deprecated functionality.
- Just the module names for any DLLs used by the target application. Not as detailed, but also less likely to miss key functionality in the target app.
- App specific modules like d3d10.dll for DirectX 10 apps.
- Basic blocks. I'm guessing this would be a PhD thesis amount of work.
Profiling ideas:
- Run VTune call graph analysis on all of my tests. This sort of works, but seems to provide a limited view of which builtin functions actually get called.
- Dynamically instrument the app with something like Pin or DynamoRIO. Possible con: slow.
- Catch calls with WinDbg. Not sure if this would be easier or quicker than Pin.
- Static analysis using a disassembly tool like IDA Pro.
Is there any published work along these lines on Windows? Have you ever used one of these tools for hooking or logging enough that you could recommend it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试
You could try: