Mobile Software Diagnostics
-
Upload
dmitry-vostokov -
Category
Documents
-
view
147 -
download
0
Transcript of Mobile Software Diagnostics
Mobile Software
Diagnostics
Dmitry Vostokov Software Diagnostics Services
Version 1.0
Facebook LinkedIn Twitter
Prerequisites Interest in software diagnostics, troubleshooting and debugging
© 2013 Software Diagnostics Services
Audience Desktop/server development and
support
Mobile development and support
© 2013 Software Diagnostics Services
The Current State Diagnostics 20 years ago
© 2013 Software Diagnostics Services
The Trend (Hardware)
© 2013 Software Diagnostics Services
Power
Time
Desktop
Mobile
The Trend (Software)
© 2013 Software Diagnostics Services
Memory
Diagnostics Tools
Trace and Log Analysis Memory Dump Analysis
Trace and Log Analysis Memory Dump Analysis
MessageBox
The Vision Pattern-Oriented Diagnostics Unified Pattern Catalogues
© 2013 Software Diagnostics Services
Software Diagnostics
A discipline studying abnormal software structure and behavior in software execution artifacts (such as memory dumps, software and network traces and logs) using pattern-driven and pattern-based analysis methodologies.
© 2013 Software Diagnostics Services
Diagnostics Pattern
A common recurrent identifiable problem together with a set of recommendations and possible solutions to apply in a specific context.
© 2013 Software Diagnostics Services
Pattern Orientation
© 2013 Software Diagnostics Services
Pattern-Driven
Finding patterns in software artefacts
Using checklists and pattern catalogs
© 2013 Software Diagnostics Services
Pattern-Based Pattern evolution
Catalogue evolution
Catalogue distribution
© 2013 Software Diagnostics Services
Economic Benefits Improved communication of
diagnostics reports using uniform pattern language
Increased productivity by systematic pattern usage
Increased quality by leveraging existing expertise
Support for global teams Quantifiable analysis
© 2013 Software Diagnostics Services
Native/Hybrid/Web Apps
© 2013 Software Diagnostics Services
iOS _______
Mac OS X
Android _______
Linux
WP _______
Windows 8
Pattern Catalogs
Pattern Implementation
Pattern Implementation
Pattern Implementation
Web _______
JS
Pattern Implementation
Stack Trace Collection
© 2013 Software Diagnostics Services
09-08 22:38:11.569: V/AudioHardwareMSM72XX(94): count : 4800 09-08 22:38:11.739: W/AudioFlinger(94): write blocked for 169 msecs, 1549 delayed writes, thread 0xccd0 09-08 22:38:14.309: I/System.out(21804): --- Stack Trace Collection --- 09-08 22:38:14.309: I/System.out(21804): Thread[JDWP,5,system]: 09-08 22:38:14.309: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[GC,5,system]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[Signal Catcher,5,system]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[main,5,main]: 09-08 22:38:14.319: I/System.out(21804): android.os.MessageQueue.nativePollOnce(Native Method) 09-08 22:38:14.319: I/System.out(21804): android.os.MessageQueue.next(MessageQueue.java:119) 09-08 22:38:14.319: I/System.out(21804): android.os.Looper.loop(Looper.java:117) 09-08 22:38:14.319: I/System.out(21804): android.app.ActivityThread.main(ActivityThread.java:3687) 09-08 22:38:14.319: I/System.out(21804): java.lang.reflect.Method.invokeNative(Native Method) 09-08 22:38:14.319: I/System.out(21804): java.lang.reflect.Method.invoke(Method.java:507) 09-08 22:38:14.319: I/System.out(21804): com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 09-08 22:38:14.319: I/System.out(21804): com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.main(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[HeapWorker,5,system]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[Compiler,5,system]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[Binder Thread #1,5,main]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.319: I/System.out(21804): Thread[Thread-10,5,main]: 09-08 22:38:14.319: I/System.out(21804): dalvik.system.VMStack.getThreadStackTrace(Native Method) 09-08 22:38:14.329: I/System.out(21804): java.lang.Thread.getStackTrace(Thread.java:737) 09-08 22:38:14.329: I/System.out(21804): java.lang.Thread.getAllStackTraces(Thread.java:630) 09-08 22:38:14.329: I/System.out(21804): com.example.deadlock.FullscreenActivity$3.run(FullscreenActivity.java:67) 09-08 22:38:14.329: I/System.out(21804): java.lang.Thread.run(Thread.java:1019) 09-08 22:38:14.329: I/System.out(21804): Thread[Binder Thread #2,5,main]: 09-08 22:38:14.329: I/System.out(21804): dalvik.system.NativeStart.run(Native Method) 09-08 22:38:14.329: I/System.out(21804): --- end ---
Android / Java example
Memory Analysis Patterns Not limited to memory dumps
Can be applied to traces / logs
© 2013 Software Diagnostics Services
Memory dumps Scripts Debugger
logs
Problem No / Limited memory dump analysis
Limited OS debugger support
© 2013 Software Diagnostics Services
Solution State Dump trace analysis pattern
Paratext memory analysis pattern
© 2013 Software Diagnostics Services
State Dump
© 2013 Software Diagnostics Services
Time# PID TID Time Message
stack traces variables status reports
Paratext
© 2013 Software Diagnostics Services
$ ps -t ps -t USER PID PPID VSIZE RSS WCHAN PC NAME […] app_42 24101 24100 137696 15756 ffffffff 00000000 S HeapWorker app_42 24102 24100 137696 15756 ffffffff 00000000 S GC app_42 24103 24100 137696 15756 ffffffff 00000000 S Signal Catcher app_42 24104 24100 137696 15756 ffffffff 00000000 S Compiler app_42 24105 24100 137696 15756 ffffffff 00000000 S Binder Thread # app_42 24106 24100 137696 15756 ffffffff 00000000 S Binder Thread # app_42 24107 24100 137696 15756 ffffffff 00000000 S Binder Thread # app_57 24109 93 146876 19268 ffffffff 00000000 S com.example.spikingthread app_57 24110 24109 146876 19268 ffffffff 00000000 S HeapWorker app_57 24111 24109 146876 19268 ffffffff 00000000 S GC app_57 24112 24109 146876 19268 ffffffff 00000000 S Signal Catcher app_57 24113 24109 146876 19268 ffffffff 00000000 S JDWP app_57 24114 24109 146876 19268 ffffffff 00000000 S Compiler app_57 24115 24109 146876 19268 ffffffff 00000000 S Binder Thread # app_57 24116 24109 146876 19268 ffffffff 00000000 S Binder Thread # app_57 24117 24109 146876 19268 ffffffff 00000000 S Thread-10 app_57 24122 24109 146876 19268 ffffffff 00000000 R Thread-11 shell 24123 143 800 336 c00a6fc8 afd0c3bc S /system/bin/sh root 24125 2 0 0 ffffffff 00000000 S flush-138:14 root 24126 2 0 0 ffffffff 00000000 S flush-179:0
Android / Java example
Mobile DA+TA Dump Analysis
Memory analysis patterns
Trace Analysis Trace analysis patterns
© 2013 Software Diagnostics Services
Mobile: Another Meaning
© 2013 Software Diagnostics Services
Further Reading
Introduction to Pattern-Driven Software Diagnostics
Introduction to Pattern-Based Software Diagnostics
Debugging TV episodes 0x32 and 0x33
© 2013 Software Diagnostics Services
Q&A
Please send your feedback using the contact form on PatternDiagnostics.com
© 2013 Software Diagnostics Services
Thank you for attendance!
© 2013 Software Diagnostics Services