![embedded從入門(mén)到精通系列課程4windows ce5.0mobile調(diào)試與性能優(yōu)化_第1頁(yè)](http://file4.renrendoc.com/view/dcfb768ec65f8520a398c7f78339329c/dcfb768ec65f8520a398c7f78339329c1.gif)
![embedded從入門(mén)到精通系列課程4windows ce5.0mobile調(diào)試與性能優(yōu)化_第2頁(yè)](http://file4.renrendoc.com/view/dcfb768ec65f8520a398c7f78339329c/dcfb768ec65f8520a398c7f78339329c2.gif)
![embedded從入門(mén)到精通系列課程4windows ce5.0mobile調(diào)試與性能優(yōu)化_第3頁(yè)](http://file4.renrendoc.com/view/dcfb768ec65f8520a398c7f78339329c/dcfb768ec65f8520a398c7f78339329c3.gif)
![embedded從入門(mén)到精通系列課程4windows ce5.0mobile調(diào)試與性能優(yōu)化_第4頁(yè)](http://file4.renrendoc.com/view/dcfb768ec65f8520a398c7f78339329c/dcfb768ec65f8520a398c7f78339329c4.gif)
![embedded從入門(mén)到精通系列課程4windows ce5.0mobile調(diào)試與性能優(yōu)化_第5頁(yè)](http://file4.renrendoc.com/view/dcfb768ec65f8520a398c7f78339329c/dcfb768ec65f8520a398c7f78339329c5.gif)
下載本文檔
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
WindowsEmbedded從 到精通系列課程
WindowsEmbeddedCE
Windows
調(diào)試與性能優(yōu)化
JianchaoTengConsultant
ConsultingServices
微軟中文技術(shù)
——
生活每一天
本周活動(dòng)更新:
Top10
暢談我的2007
!
/
與眾不同:
版主:50+微軟最有價(jià)值專(zhuān)家(MVP)
涵蓋微軟幾乎所有產(chǎn)品線和知識(shí)庫(kù)
30+適合開(kāi)發(fā)人員和IT專(zhuān)業(yè)人員技術(shù)板塊
本次課程內(nèi)容包括
CEand
ArchitectureOverview
DebuggingTips
Performance&Profiler
CEand Overview
MemoryLayout
Hint:RegisterWindow
WindowsCEVirtualMemoryReview
32-bitOS–
possible
TophalfusedbyKernel
BottomhalfusedbyUser
WindowsCEVirtualMemoryReview
Abovetheprocessslotsisasharedareaforlarge
VirtualAllocsandmemorymappedfiles
WindowsCEVirtualMemoryReview
32MBProcessslotstake
thelowestaddresses
Slot32
KernelSpae
Slot2
Slot1
UserProcessSpace
Slot0
ProcessSlot
0x01FFFFFF
DLLVirtualMemoryAllocations
RAMDLL+OverflowROMDLL:Code+Data
GeneralVirtualMemoryAllocations
ThreadStack
ThreadStack
0x00010000
GuardSection(64k)+UserKInfo
0x00000000
ProcessCode+Data
ProcessHeap
ProcessVirtualAlloc()calls
ROMDLLs:R/WData
32MBProcessslotissharedbyDLL,process,andallofitsvirtualallocations
Allvirtualallocationsare
64kB-aligned
Pagesmaybecommittedwithinavirtualallocationonapagegranularity(4kB)
DLLallocationsinaslotstartathighaddressesandgrowdown
Processandgeneralallocationsstartatlowaddressesandgrowup
9
Debuggingtips
Whatdowelearnfromthememorylayout?
HexAddressAnatomy
64KBalignment.
(VirtualAllocs,DLLalignment
andStackslot)
Hexaddresseshaveidentifiablepositions:
High/Low2GBUser“l(fā)essthan”8Kernel“greaterthan”8
MegabyteAlignment
PageAlign
Slotalignment
HexAddressAnatomy
Position1(inyellow) lsyouifitskernel
spaceoruserspace8andaboveiskernelBelow8isUserspace
HexAddressAnatomy
Position2(inred)isprocessslotpositionIfslotnumberisodd,address
islikelyaDLL
Ifslotnumberiseven,
addressislikelyanapp
Slot32
Slot2
Slot1
Slot0
HexAddressAnatomy
32MBinhexis:0x02000000
16MBUpper
32MBslot
MegabyteAlignment 16MBLower
HexAddressAnatomy
Position4(incyan)is64kbalignment
DLLalignment
Stackalignment
64KBalignment.(VirtualAllocs,DLLalignment
andStackslot)
HexAddressAnatomy
Position5(ingray)ispage(4kb)alignment
16pages==64kb
PageAlign
HexAddressAnatomy
64KBalignment.
(VirtualAllocs,DLLalignment
andStackslot)
Letstakeanotherlook
High/Low2GBUser“l(fā)essthan”8Kernel“greaterthan”8
MegabyteAlignment
PageAlign
Slotalignment
ThinkinginHexQuiz1
Whatisthedifferencebetween:
0x
and
0x0A119235??
Extracredit:Whatdoyouthinkitpointsto?
ThinkinginHex(Answer1)
Sameaddress!
Seconditisbeingviewedoutsidetsprocessslot.
0x
0x0A119235
1MB ppe
32MBslot
High/Low2GBUser“l(fā)essthan”8Kernel“greaterthan”8
0x
MegabyteAlignment
PageAlign
1 BLower
64KBalignment.(VirtualAllocs,DLLalignment
Slotalignment andStackslot)
“MostLikely”codeorglobal
ThinkinginHex(Quiz2)
?
Whatis:
0x019ABCDE
ThinkinginHex(Answer2)
0x019ABCDEis“mostlikely”
CODEfromaDLL.
16MBUppe
0x019ABCDE
6MBLowr
32MBslot
VisuallyDebuggingCallStacks
Stacksgrowfromhighertoloweraddresses
DefaultsizeofARMstackis64KBandtheyarealways
64KBaligned.Thismeansthatthe“topfunctions”of
astackwillbelocatedver closetoa64KBboundar.
WindowsCEalsoemlosthenotionoftwosearate
4KBguardpagesthatthrowexceptionsifentered
VisualStackInspection#1
StackPointer“dipped”intofirstguardpage
Stackoverflow
UnderstandingException
AKY"AccessKey“
PC
"ProgramCounter”
ESP/SP“StackPointer”
ESP-EA-RA-FSRareCPUspecifiedregisterorMMUregister
Backtoaddresstopic:0x f
Dataorcodefailed!
Usings
.exetocollect
runtimeInformation
gicommand
gi["proc","thrd","mod","all"]*["<pattern>"]:GetInformation
proc ->Listsallprocessesinthesystem
thrd ->Listsallprocesseswiththeirthreads
delta->ListsonlythreadsthathavechangesinCPUtimes
DEMO
TargetControlDebugging
ProfilerandOptimization
Optimizewhat?
Howcouldwecollectthe
runtimeinformation?
PerformanceOptimization
Whatisbottle-neckofthesystem?
WhichmodulecostmostCPUtime?
Beforeoptimizethesystem,Weneedtoknowhowdoesthesystemrunning
Whicheventcausesystemblocking?
KernelProfiler
Whatistheprofilermean?
DataCollection
TimeBased
– MonteCarlo(time-basedsampling)CallBased
SystemCalls(call-based)
MonteCarlo
Highresolutiontimerasthe“Hit”
InterruptstheOSperiodicallyandsamplesthePC
voidProfilerHit(DWORDra);
SystemCalls
hitsintheObjectCallfunctioninthekernel
SystemcallprofilingmonitorsthisObjectCallfunction
RemoteKerneltracker
CaptureOSeventsastheyhappen
Threadandprocesscreation/execution/PRIO
Synchronizationobjects
Interrupts
Memory,paging,TLBmisses
Loaderevents
Bootevents
ExaminingThreadBehavior
RemoteKerneltracker
DEMO
UsingRemoteKernelTracker
Profilingfunctioncall
PSLhappensonlyinAPIcall
Normallyfunctioncallwon’tcausePSL
Complieraddedfunctionbelowtotrackingfunctioncall
void stdcall_CAP_Enter_Function(void
*pfn);
void stdcall_CAP_Exit_Function(void*pfn);
ProfilingCode
RemoteCallProfiler
DEMO
UsingRemoteCallProfiler
Summary
Makeyourdevicebetter!
嵌入式開(kāi)發(fā)資源
WindowsEmbedded中文
http:/ / /windows/embedded
.NETMicroFramework
http://m
/embedded/bb267253.aspx
RoboticsStudio
http://m
/robotics/default.aspx
微軟嵌入式開(kāi)發(fā)者
/ /default.aspx?ForumGroupID=493&
SiteID=15
微軟中國(guó)嵌入式開(kāi)發(fā)者博客
htt /yunxu/
MikeHall的博客
http://m /embedded/
Aa731228.aspx
微軟啟動(dòng)新一輪“免費(fèi)重
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年其他計(jì)算機(jī)信息服務(wù)項(xiàng)目申請(qǐng)報(bào)告模稿
- 2025年多孔微孔陶瓷材料項(xiàng)目規(guī)劃申請(qǐng)報(bào)告模板
- 2025年企業(yè)高校實(shí)習(xí)生三方協(xié)議
- 2025年人才共享協(xié)議標(biāo)準(zhǔn)化文本
- 2025年合作共管協(xié)議示范文本
- 2025年借款合同范本速覽
- 2025年個(gè)人公積金貸款合同調(diào)整全覽
- 2025年專(zhuān)利權(quán)使用和解協(xié)議指南
- 2025年養(yǎng)老院入住協(xié)議標(biāo)準(zhǔn)
- 2025年供電設(shè)施更新改造協(xié)議
- 學(xué)校保潔服務(wù)投標(biāo)方案(技術(shù)標(biāo))
- 青島中國(guó)(山東)自由貿(mào)易試驗(yàn)區(qū)青島片區(qū)(青島前灣綜合保稅區(qū))管理委員會(huì)選聘35人筆試歷年參考題庫(kù)附帶答案詳解
- 《社區(qū)工作者培訓(xùn)課件 新浪版》
- 教育信息化背景下的學(xué)術(shù)研究趨勢(shì)
- 人教版小學(xué)數(shù)學(xué)(2024)一年級(jí)下冊(cè)第五單元100以內(nèi)的筆算加、減法綜合素養(yǎng)測(cè)評(píng) B卷(含答案)
- 電子課件-《飯店服務(wù)心理(第四版)》-A11-2549
- 糖基轉(zhuǎn)移酶和糖苷酶課件(PPT 111頁(yè))
- 部編版五年級(jí)語(yǔ)文下冊(cè)全冊(cè)教材分析
- 自來(lái)水業(yè)務(wù)辦理授權(quán)委托書(shū)
- 電子商務(wù)客戶服務(wù)ppt課件匯總(完整版)
- 2022危險(xiǎn)化學(xué)品及石化化工項(xiàng)目必須進(jìn)園區(qū)的規(guī)定文件匯總
評(píng)論
0/150
提交評(píng)論