1. 生成Symbol文件, VC下面PDB文件, 编译生成PDB
2. gflags /i 程序名 +ust
或者 gflags 打开图形界面 Image File 输入进程名 按Tag 选上 Create user mode stack trace database
3. 启动应用程序
在_ NT_SYMBOL_PATH 起作用的环境下面 启动应用程序
start /d "E:\Program Files\数字监控系统\ MTS_300BASE\" MTS_Server.exe
start /d "F:\ NetSDK_BIN\3.35.0\DLL\" 实时监视、云台控制.exe
4. 设置symbol文件的环境变量
set _ NT_SYMBOL_PATH=Path
set _ NT_SYMBOL_PATH=d:\windows\symbols\xpsp2\dll;l:\dss\svn\dev\coreFunLayer\bin\mts
set _ NT_SYMBOL_PATH=F:\ NetSDK_BIN\3.35.0\DLL
5. 抓取程序的heap信息进行对比
一般抓取内存上涨前后的heap dump进行对比
umdh -p:PID -f:存储文件
umdh -p:2492 -f:n:\1.txt
umdh -p:2492 -f:n:\2.txt
umdh -v n:\1.txt n:\2.txt > n:\a.txt
gflags /i DhParserMemTest.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\ DhParserMemTest\Debug
start /d "D:\work\tools\ DhParserMemTest\Debug" DhParserMemTest.exe
umdh -p:3884 -f:f:\memoryinfo\1.txt
umdh -v f:\memoryinfo\1.txt f:\memoryinfo\2.txt > f:\memoryinfo\a.txt
gflags /i memorytest.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\ PlaySDKTestTools\memorytest\Bin
start /d "D:\work\tools\ PlaySDKTestTools\memorytest\Bin" memorytest.exe
umdh -p:3548 -f:f:\fsdfsdfsdfsd.txt
umdh -v f:\fsdfsdfsdfsd.txt f:\fsdfsdfsdfsd1.txt > f:\a.txt
gflags /i testDPPP.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\testDPPP\Debug;C:\WINDOWS\Symbols
start /d "D:\work\tools\testDPPP\Debug" testDPPP.exe
umdh -p:192 -f:f:\memoryinfo\dpp1.txt
umdh -v f:\memoryinfo\dpp1.txt f:\memoryinfo\dpp2.txt > f:\memoryinfo\dppa.txt
2. gflags /i 程序名 +ust
或者 gflags 打开图形界面 Image File 输入进程名 按Tag 选上 Create user mode stack trace database
3. 启动应用程序
在_ NT_SYMBOL_PATH 起作用的环境下面 启动应用程序
start /d "E:\Program Files\数字监控系统\ MTS_300BASE\" MTS_Server.exe
start /d "F:\ NetSDK_BIN\3.35.0\DLL\" 实时监视、云台控制.exe
4. 设置symbol文件的环境变量
set _ NT_SYMBOL_PATH=Path
set _ NT_SYMBOL_PATH=d:\windows\symbols\xpsp2\dll;l:\dss\svn\dev\coreFunLayer\bin\mts
set _ NT_SYMBOL_PATH=F:\ NetSDK_BIN\3.35.0\DLL
5. 抓取程序的heap信息进行对比
一般抓取内存上涨前后的heap dump进行对比
umdh -p:PID -f:存储文件
umdh -p:2492 -f:n:\1.txt
umdh -p:2492 -f:n:\2.txt
umdh -v n:\1.txt n:\2.txt > n:\a.txt
gflags /i DhParserMemTest.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\ DhParserMemTest\Debug
start /d "D:\work\tools\ DhParserMemTest\Debug" DhParserMemTest.exe
umdh -p:3884 -f:f:\memoryinfo\1.txt
umdh -v f:\memoryinfo\1.txt f:\memoryinfo\2.txt > f:\memoryinfo\a.txt
gflags /i memorytest.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\ PlaySDKTestTools\memorytest\Bin
start /d "D:\work\tools\ PlaySDKTestTools\memorytest\Bin" memorytest.exe
umdh -p:3548 -f:f:\fsdfsdfsdfsd.txt
umdh -v f:\fsdfsdfsdfsd.txt f:\fsdfsdfsdfsd1.txt > f:\a.txt
gflags /i testDPPP.exe +ust
set _ NT_SYMBOL_PATH=D:\work\tools\testDPPP\Debug;C:\WINDOWS\Symbols
start /d "D:\work\tools\testDPPP\Debug" testDPPP.exe
umdh -p:192 -f:f:\memoryinfo\dpp1.txt
umdh -v f:\memoryinfo\dpp1.txt f:\memoryinfo\dpp2.txt > f:\memoryinfo\dppa.txt