WinDbg有一个挺有意思的功能,叫做”Trace and Watch Data” — “wt”命令。WinDbg的help文件解释道:
The wt command runs through the whole function and then displays statistics, when you execute this command at the beginning of a function call.
也就是, 当你在debugging的时候,你step到一个function的开头(比如通过break point停在一个function开头),这时候你想获得关于这个function执行时候的详细信息,就在command窗口,
输入   wt,
或输入  wt -I 4    (-I 4的意思是只进入4层的Stack深度)
这时候debugger就会替你执行整个function到它return的地方,并提供给你这次执行的详细信息。
 
可以看到,这个function执行的详细信息被显示出来。比如function在stack的call depth,以及每个被call的function的执行的指令数目, 被执行的system call等等。这个是动态执行的trace,是根据当时的具体输入来的,所以不会cover所有code。另外,因为inline function在这里不被显示为一个function call,所以你还可以知道那些function被编译器inline了,那些没有。