Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
《软件调试》的示例程序
关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
microbe0821
2010-05-07, 11:18 上午
CpuWhere确实是个amazing的程序,程序只支持单核,所以我把我的CPU关掉了一个核心,程序可以正常的运行;通过DbgView也看到IA32_DBGCTRL寄存器的值也设置正确了(eax = 0xc1),但是就是获取不到BTS数据,每次Fetch都是0 records.
我找了Intel手册看了一下,Setting Up the DS Area里面提到设置BTS的诸多限制,不知道是不是这些限制条件没有满足呢?
很郁闷额~~~请大家帮我分析分析,谢谢啦;
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
microbe0821
2010-05-07, 11:31 上午
Intel手册上提到的有几条限制,我还没彻底弄明白是什么含义额;
主要是以下几条:
1. DS save area and recording mechanism is not available in the SMM.
The feature is disabled on transition to the SMM mode. Similarly DS recording is disabled on the generation of a machine check exception and is cleared on processor RESET and INIT.
2.Either the system must be prevented from entering A20M mode while DS save
area is active, or bit 20 of all addresses within buffer bounds must be 0.
3.The DS save area is expected to used only on systems with an enabled APIC. The
LVT Performance Counter entry in the APCI must be initialized to use an interrupt
gate instead of the trap gate.
第2和第3条就是书中115页提到的,这些限制条件,我怎么用程序验证或满足呢?
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
格蠹老雷
2010-05-08, 10:23 上午
请问Windows系统的版本是什么?建议你用双机内核调试看一下,如果遇到困难,把困难或者失败点的信息描述的更详细一些,或者粘贴一些调试信息过来。
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
microbe0821
2010-05-08, 21:03 下午
就是没遇到问题呢,,程序能运行,好好的,,但就是fetch不到数据呃~~,谢谢Raymond的回复,我再自己调试看看,再有了问题再上来请教,谢谢~!
也顺便问下,有网友在Core Duo微架构的Intel CPU上执行成功的么?
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
microbe0821
2010-05-13, 12:05 下午
Raymond老师,我在我的机器上执行了CpuWhere程序,能正常运行,但是没有BTS数据,下面是我自己build的驱动打印的Log:
[CpuWhere_1010]
CpuWhere.SYS: entering DriverEntry
[CpuWhere_1010]
CpuWhere: IRP_MJ_CREATE
[CpuWhere_1010]
User mode buddy is active: 1
[CpuWhere_1010]
CPUWHERE_START
[CpuWhere_1010]
CPU Signature is 1067a,family 6.
[CpuWhere_1010]
g_bIsPentium4=0
[CpuWhere_1010]
DS is setup at 8266a458: base ff4fa000, index ff4fa000, max ff508a60, int ff508a6c
[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:000000c1
[CpuWhere_1010]
StartTracing exits with 0
[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:000000c1
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
Starting to read from ff4f9ff4 while index is ff4fa000
[CpuWhere_1010]
0 records read from ff4fa000 to ff4f9ff4, bReadAll=0
[CpuWhere_1010]
0 BTS records returned, bReadAll=1, index reset to ff4fa000.
[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:000000c1
[CpuWhere_1010]
CPUWHERE_STOP
[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:000000c1
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
StartTracing exits with 0
[CpuWhere_1010]
CpuWhere: IRP_MJ_CLOSE
[CpuWhere_1010]
GUI closing: 0
[CpuWhere_1010]
CpuWhere.SYS: unloading
[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
StartTracing exits with 0
[CpuWhere_1010]
CpuWhere.SYS: memory freed and unloaded
不知道是哪里不对额~~~~