问题描述
除了Visual Studio中的工具外,您还知道哪些工具可以分析Windows CE/Mobile应用程序中的性能瓶颈?我正在寻找诸如CE/Mobile的AQTime之类的东西,以分析编译为本机代码的C/C ++应用程序.
What tools do you know, other than those in Visual Studio, to analyze performance bottlenecks in a Windows CE/Mobile application? I'm looking for something like AQTime for CE/Mobile, to profile C/C++ applications compiled to native code.
推荐答案
我没有找到用于WindowsMobile进行本机开发的任何此类工具.
I haven't found any such tools for WindowsMobile for native development.
我找到的最接近的是EnTrek工具集(CodeSnitch/ProcMan),但它们并不是真正的性能分析工具. http://www.entrek.com/products.htm
The closest I've found is the EnTrek toolset (CodeSnitch / ProcMan), but they aren't really profiling tools.http://www.entrek.com/products.htm
我们所做的是使用VC ++的Vistual Studio"/callcap"开关在我们自己的产品中构建了自己的配置支持.使用该开关,您可以构建一个性能分析库,该库可以根据需要随意转储计时和计数.多数情况下,对我们来说效果很好,但有时这些钩子函数的开销可能会过多,并且可能会将计时结果偏向大量函数调用的区域.
What we did do is build own own profiling support into our own products using the Vistual Studio "/callcap" switch for VC++. Using that switch you can build a profiling library that dumps out timings and counts, whatever you like. It mostly works out well for us, but sometimes the overhead of these hook functions can be too much and it can skew the timing results to areas of massive number of function calls.
从MSDN文档中:
您必须编译性能分析挂钩 没有呼叫帽开关.如果你 编译性能分析钩子函数 使用callcap开关,功能 将执行无限递归调用 自己.
You must compile profiling hooks without the callcap switch. If you compile the profiling hook functions with the callcap switch, the functions will perform infinite recursive calls to themselves.
以下代码示例, Callcaphooks.c,显示一个分析钩子 函数_CAP_Enter_Function,用于 无需callcap即可编译.
The following code example, Callcaphooks.c, shows a profiling hook function, _CAP_Enter_Function, for compilation without callcap.
// File: callcaphooks.c
#include <stdio.h>
int main();
void _CAP_Enter_Function(void *p)
{
if (p != main)
printf("Enter function (at address %p) at %d\n",
p, GetTickCount());
return;
}
void _CAP_Exit_Function(void *p)
{
if (p != main)
printf("Leaving function (at address %p) at %d\n",
p, GetTickCount());
return;
}
这篇关于Windows CE/Mobile的代码分析/性能分析工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!