如何知道哪个进程在Windows中设置了高计时器分辨率 [英] How to tell which process set the high timer resolution in Windows

查看:147
本文介绍了如何知道哪个进程在Windows中设置了高计时器分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统定时器分辨率高(NtQueryTimerResolution返回0.5ms).

My system is suffering from a high timer resolution (NtQueryTimerResolution returns 0.5ms).

Maximum timer interval: 15.600 ms
Minimum timer interval: 0.500 ms
Current timer interval: 0.500 ms

某些进程必须以5000(0.5ms)的值调用NtSetTimerResolution,但是如何确定哪个?我看到英特尔有一个名为 电池寿命分析器的工具. 显示每个进程的当前计时器分辨率,但是该工具仅对英特尔合作伙伴可用.是否有其他工具或方法可以通过WinDbg进行查看?注意:这似乎是在启动时发生的,因为设置断点不起作用(调试器启动时分辨率已经很高).

Some process must be calling NtSetTimerResolution with a value of 5000 (0.5ms), but how can I determine which one? I saw Intel has a tool called Battery Life Analyzer that shows the current timer resolution per process, but that tool is only available to Intel partners. Is there another tool or a way to see it via WinDbg? Note: It seems to happen at boot time as setting a breakpoint isn't working (the resolution is already high when the debugger starts).

推荐答案

我发现Windows 7在_EPROCESS内核结构中跟踪每个进程的计时器分辨率.

I found that Windows 7 keeps track of timer resolution per process in the _EPROCESS kernel structure.

启用调试(使用/debug引导)后,可以使用windbg浏览运行ExpTimerResolutionListHead列表(运行windbg -kl)并提取如下计时器信息:

With debugging enabled (boot with /debug) it is possible to browse the ExpTimerResolutionListHead list with windbg (run windbg -kl) and extract timer information like this:

lkd> !list "-e -x \"dt nt!_EPROCESS @$extret-@@(#FIELD_OFFSET(nt!_EPROCESS,TimerResolutionLink)) ImageFileName UniqueProcessId SmallestTimerResolution RequestedTimerResolution\" nt!ExpTimerResolutionListHead"

但是,在我的情况下,进程ID为NULL(可能是因为驱动程序发出了请求),而我仍然无法弄清它是哪个驱动程序.

In my case however the process ID was NULL (probably because a driver made the request), and I still couldn't figure out which driver it was.

这篇关于如何知道哪个进程在Windows中设置了高计时器分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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