Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Why Programs Fail - Observing Facts
Search
Jimmy Moon
July 03, 2007
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Why Programs Fail - Observing Facts
Jimmy Moon
July 03, 2007
More Decks by Jimmy Moon
See All by Jimmy Moon
Operating an AI Infrastructure Through MCP Apps on Agents
ragingwind
0
53
Coding as Prompting Since 2025
ragingwind
0
950
Edge Computing for WebApp
ragingwind
0
160
Micro-Saas for developer who want a new
ragingwind
0
130
How to use The Fourth Language
ragingwind
0
250
Please Use The Fourth Language - WebAssembly
ragingwind
0
280
Head topics in Javascript, 2020
ragingwind
1
750
Recap Modern WebAssembly in CDS 2019
ragingwind
0
370
Today headlines in Javascript, 2019
ragingwind
0
580
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Designing for Performance
lara
612
70k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
820
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Transcript
Why Programs Fail - Observing Facts ߊ : ޙഅ҃ (
[email protected]
)
ߊੌ : 2007֙ 4ਘ 16ੌ
Table of contents Observing Facts Log Interactive Debugging Post-mortem Debugging
Query Event Visualization
Observing Facts ҳੋ प೯ীࢲ ੌযաח ࢎपٜ(Facts)ܳ ҙ (Observing) оࢸҗ োਸ
ా೧ࢲ ٘ߧਤ Ѿҗܳ ҙ ҙ ਗ рࢼೞ ݈ইঠ ೠ. ޖਸ ઁ ҙೡ Ѫੋ ঌইঠ ೠ ҅ਵ۽ ೯ೞۄ ҙ ߑߨ Log Interactive Debugging Post-mortem Debugging
Log ۽Ӓ۔ ࢎपਸ ۱ೞח ߑߨ ٣ߡӒ ۽Ӓ, printf٣ߡӦ ױ ࠙ೠ
٘ ࠙ೠ ۱ ࣘب ೞ ܐ ࣚप
Log (Con’t) ਊ ۽Ӓ ӝߨ ળ ഋधਸ ࢎਊ ݫఋؘఠ ਊ
࠭য ࢎਊ ٘ਤ (ੌݺ, ٘ۄੋ), ݽٕݺ, दр ߮ (WARNING, DEBUG, TRACE, FATAL) ઁ “2007-04-02 20:24:13,509 [main] DEBUG TestLogging – Start of main()” 2007-04-02|02:24:13|509|main|DEBUG|TestLogging – Start of main() ۽Ӧਸ ࢶఖ оמೞѱ ݅ٚ C/CPP ۽Ӧ ݒ۽ Aspect о߸ੋ ࣁب ೲਊ ޙઁ ࢿѺਸ ҳ࠙ ੌҙࢿ ࢎਊೡ ࣻ ח ۽Ӧਸ ࢤࢿ
C/CPP Macro Log int _tmain(int argc, _TCHAR* argv[]) { logFunc
= (LOG_OUTPUT_FUNC) printf; int size = 10; SetPrintableModule(LOG_MODULE_UI, 1); LOG_DEBUG(LOG_MODULE_UI, ("size = %d", size)); return 1; }
Log Library ۽Ӧ ױਸ ӓࠂ ળ ഋधࢎਊ ਊ ࠭য ਗ
۽Ӓ য়ߡ٘ ࠺زӝ ۽Ӓ Windows Service, remote socket ۽Ӓ ۨ߰ ۽Ӓ ২࣌ ਗ ੌҙػ ੋఠಕझ ઙܨ Log4XXX NT Event Log DarkLog
Log4XXX Apache Logging Service নೠ য, ജ҃ ਗ CPP, JAVA,
.NET, Peal, PHP, PLSQL, JDK 1.4’s util.logging.framwork ౠ Logger hierarchy com.fooܳ ࢚ࣘ߉ com.foo.Bar log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("com.foo")); log4cxx::LoggerPtr barlogger(Logger::getLogger(("com.foo.Bar")); Log Level Appender console, file, gui component, remote socket, NT event log, syslog Asynchronous log Layout Environment File INI, XML ਊ࠭য ChainSaw TraceTool 8
Log4XXX (Con’t)
NT Event Log
DarkView Concept Server Server Server Server Server log aggregater (windows
service) darkview log data remote socket i/o query
DarkView (Con’t)
Aspect पઁ٘(ز)ܳ ࢸݺ(aspect)ೞח ۽Ӧ (advice)ܳ पઁ ٘৬ ܻ࠙ೞৈ ࢿೞৈ ߹ب
ஹੌ۞(ajc)۽ ֍য (weaving). ۽Ӓо प೯ؼ ࣗ, ਤ(point cut)ܳ ݺद ೡ ࣻ . पઁ ٘ী ೱਸ ঋਵݴ, ࢶఖਵ۽ ࢎਊоמೞ Ҋ ࢎਊ ए ࣛܖ࣌
Aspect (Con’t) // Shop.java class Article { public void Buy()
{// code} } // LogBuy.aj public aspect LogBuy { pointcut buyMethod() : call(public void Article.buy()); before() : buyMethod() { System.out.println(“Entering Article.buy()”);} after() : buyMethod() { System.out.println(“Leaving Article.buy()”);} } // compile $ajc LogBuy.aj Shop.java // Pseudocode class Article { public void Buy() { System.out.println((“Entering Article.buy()”); // Code(); System.out.println((“Leaving Article.buy()”); } }
Interactive Debugging Debuggerܳ ࢎਊೞৈ पदрਵ۽ ҙ औѱ द ೡ
ࣻ . ࣗझ ࣻ, ஹੌ ਃহ ߄۽ ҙ оמ ਬোೠ ҙ ࣻ೯ ࣻ, ؘఠ ҙ оמ пੋ ࣁ࣌ द ۽Ӓ۔ ࢚కܳ द೧ ࠁҊ ࡅܰѱ Ѿҗܳ חؘ (gdb command) Debugger ઑѤ ۽Ӓ۔ਸ प೯ೞҊ ౠ ઑѤೞী ݥ୶ѱ ೧ঠ ೠ. ػ ۽Ӓ۔ ࢚కܳ ҙ оמ೧ঠ ೠ. ػ ۽Ӓ۔ ࢚కܳ ߸҃ ೡ ࣻ যঠ ೠ.
Debugger IDE ӝ߈ Debugger Visual Studio, Eclipse, Ӓ৻ ࣻ ޙ
Debugger WinDBG, gdb, Ӓ৻ ࣻ Deugger ӝמ break(breakpoint) and run, watch (watch point), modify variable value, calltrace enc (edit and continue)
Visual Studio Debugger Visualization
DEMO DDD Visualization
Post-mortem Debugging Crashٸ ۽Ӓ۔ ࢚కܳ ੌ۽ ؒܳ Debuggerо द ੍য
Crash࢚కੌ ٸ ۽Ӓ۔ ࢚కܳ ઑࢎ Dumper WinDBG UserDump Dr. Watson Error Reporting Windows Dump API Windows Visual Studio .NET Dump Debugger WinDBG Windows Visual Studio gdb
WinDBG
Dr. Watson
DEMO User Dump
Windows Error Reporting
Windows Debug Tool ౠ ࢚ടীࢲ ਬਊೞѱ ࢎਊೞח ٣ߡӦ ో GFlag
Heap curruption Performance Monitoring hang(dead lock, cpu 100%)
DEMO GFlag
Performance Monitor
FIN