Memory Management for Android Apps Min Ji, Kim Embedded Software Lab.

Slides:



Advertisements
Similar presentations
Interval Heaps Complete binary tree. Each node (except possibly last one) has 2 elements. Last node has 1 or 2 elements. Let a and b be the elements in.
Advertisements

Reducing Pause Time of Conservative Collectors Toshio Endo (National Institute of Informatics) Kenjiro Taura (Univ. of Tokyo)
Android Tools & Wireless ADB Αντρέας Λύμπουρας Θεόφιλος Φωκάς Ζαχαρίας Χ’’Λάμπρου.
Memory Leak WEBLOGIC SERVER.  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best Practices.
Fixing Memory Leaks in Android Applications using DDMS & MAT Presented by Sravankumar Reddy Javaji CS286 Mobile Programming.
Memory issues in production systems. Production system Restricted access Application, DB, Application server, log files Debugging, monitoring Investigation.
Android: Managing Memory
This presentation: Sasha GoldshteinCTO, Sela Group Garbage Collection Performance Tips.
Task-aware Garbage Collection in a Multi-Tasking Virtual Machine Sunil Soman Laurent Daynès Chandra Krintz RACE Lab, UC Santa Barbara Sun Microsystems.
Memory Allocation and Garbage Collection. Why Dynamic Memory? We cannot know memory requirements in advance when the program is written. We cannot know.
V0.01 © 2009 Research In Motion Limited Introduction to Java Application Development for the BlackBerry Smartphone Trainer name Date.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Development of a wireless body area sensing system for alcohol craving study Master’s Project Defense Sandeep Ravi Advisor: Dr.Yi Shang.
Introduction to Android Platform Overview
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
Memory Leak Overview and Tools. AGENDA  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best.
Of Bytes, Cycles and Battery Life. Who am [2] [1]
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402.
2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Karsten Vennemann, Seattle Free and Easy Web Mapping.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Mobile Device Programming
Mobile Application Optimization. Sanath Nandasiri Programmer.(Not a singer) (Exilesoft)
Embedded Software SKKU 14 1 Sungkyunkwan University Tizen v2.3 Application Profiling & Debugging.
Teaching Data Analysis: Excel and Web Based tools Dr. Sebastian Interlandi Penn Wood High School Lansdowne, PA.
Student: Panteleev Vladimir, FAF-051 Adviser: Lect. Sup. Radu Melnic Ministerul Educaţiei şi Tineretului al Republicii Moldova Universitatea Tehnic ă a.
Click to add text © 2012 IBM Corporation Design Manager Server Instrumentation Instrumentation Data Documentation Gary Johnston, Performance Focal Point,
Challenges and Solutions for Embedded Java Michael Wortley Computer Integrated Surgery March 1, 2001.
David F. Bacon Perry Cheng V.T. Rajan IBM T.J. Watson Research Center ControllingFragmentation and Space Consumption in the Metronome.
Pool Overview The Windows Pool has four basic allocation areas: Allocations that can be paged out of memory to the pagefile Paged Pool Allocations.
Understanding VirtualAlloc usage using Windows Performance Analyzer
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
Sofia Event Center May 2014 Angel Todorov Principal Architect, Infragistics Inc. Debugging, Profiling and Optimizing Web Apps with IE11 – F12 Developer.
2 Common ASP.NET production issues and how to troubleshoot them with WinDbg Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session Code:
 Can access all API’s made available by OS vendor.  SDK’s are platform-specific.  Each mobile OS comes with its own unique tools and GUI toolkit.
Free, online, technical courses Take a free online course. Microsoft Virtual Academy.
Improve Embedded System Stability and Performance through Memory Analysis Tools Bill Graham, Product Line Manager Development Tools November 14, 2006.
Free, online, technical courses Take a free online course. Microsoft Virtual Academy.
By: Chuqing He. Android Overview - Purchased by Google in First Android Phone was sold in Oct Linux-based - Holds 75% of the worldwide.
.NET Garbage Collection Performance Tips Sasha Goldshtein | SELA Group.
3 main operating system! BY Charlotte Oates. Microsoft windows! A family of operating systems for personal computers. Windows dominates the personal computer.
3 Important Performance tracking tools in an Android Application Development Workflow Here are 3 tools every Android application developer should familiarize.
QlikView Sizing Walkthru - RAM. Total RAM on the QlikView Server One or more QlikView documents (QVWs) loaded on Server Unaggregated QVW data model QlikView.
GST Helpline - A Complete GST App TO RESOLVE GST INDIA QUERIES
Cloud-Computing Cloud Web-Blog Software Application Download Software.
Bishnu Priya Nanda , Tata Consultancy Services Ltd.
Java 9: The Quest for Very Large Heaps
Cork: Dynamic Memory Leak Detection with Garbage Collection
Android.
Unit-2 Objects and Classes
Fastdroid Produced by : Firas Abdalhaq Mohammad Amour Supervised by : Dr. Raed Alqadi.
Hardware, Software & Firmware
CMPE419 Mobile Application Development
OPERATING SYSTEM OVERVIEW
PerfView Measure and Improve Your App’s Performance for Free
Google Hangouts Google Hangouts is a instant messaging service. Hangouts supports text, voice and video conversations, and is cross-platform on the.
Pick Diamonds from Garbage
Am I Reading GC Logs Correctly?
ColdFusion Performance Troubleshooting and Tuning
Created By: Asst. Prof. Ashish Shah, J.M.Patel College, Goregoan West
Software - Operating Systems
Performance And Scalability In Oracle9i And SQL Server 2000
CMPE419 Mobile Application Development
AEM Operations Dec 2017.
Java Virtual Machine Profiling. Agenda Introduction JVM overview Performance concepts Monitoring Profiling VisualVM demo Tuning Conclusions.
Presentation transcript:

Memory Management for Android Apps Min Ji, Kim Embedded Software Lab.

2/27 Embedded Software Lab. Introduction Google I/O Development Conference, 2011 Google I/O Development Conference ?? Thousands of developers’ festival for two days of deep technical contents. Android, Google Chrome, Google APIs, Google Web Toolkit, App Engine, etc.

3/27 Embedded Software Lab. No more memory management? 512MB RAM2GB RAM

4/27 Embedded Software Lab. Heap Size Heap size limits(for multi-tasking) Nexus One: 32MB Galaxy S: 48MB Nexus 7: 48MB ActivityManager.getMemoryClass() Large Heaps ActivityManager.getLargeMemoryClass() Degrades performance

5/27 Embedded Software Lab. Garbage Collection Heap object reference

6/27 Embedded Software Lab. Garbage Collection Bigger heaps cause longer pauses. Pre-Gingerbread GCGingerbread and beyond Stop-the-worldConcurrent(mostly) Full heap collectionPartial collections Pause times is often over 100ms Pause time is usually less than 5ms

7/27 Embedded Software Lab. Bitmaps Old way(pre-Honeycomb) freed via recycle() or finalizer hard to debug full, stop-the-world GCs New way freed synchronously by GC easier to debug concurrent & partial GCs

8/27 Embedded Software Lab. Overview Changes in Gingerbread and Honeycomb heap size Garbage Collection bitmaps Understanding heap usage Logs Memory leaks Eclipse Memory Analyzer(MAT)

9/27 Embedded Software Lab. Interpreting Log Messages Reason for GC GC_CONCURRENT GC_FOR_MALLOC GC_EXTERNAL_ALLOC GC_HPROF_DUMP_HEAP GC_EXPLICIT

10/27 Embedded Software Lab. Interpreting Log Messages Reason for GC Amount freed

11/27 Embedded Software Lab. Interpreting Log Messages Reason for GC Amount freed Heap statistics

12/27 Embedded Software Lab. Interpreting Log Messages Reason for GC Amount freed Heap statistics External memory statistics

13/27 Embedded Software Lab. Interpreting Log Messages Reason for GC Amount freed Heap statistics External memory statistics Pause time

14/27 Embedded Software Lab. Heap Dumps Binary dump of all objects Create with: DDMS android.os.Debug.dumpHprofData() Convert to standard HPROF format: hprof-conv orig.hprof converted.hprof Analyze with MAT, jhat, etc.

15/27 Embedded Software Lab. Memory Leaks Memory Leak? Referencing to an unused object preventing from garbage collecting

16/27 Embedded Software Lab. Eclipse Memory Analyzer(MAT) Download from or Eclipse plug-in is providedhttp://eclipse.org/mat “Shallow heap” and “Retained heap” Shallow heap : just size of object

17/27 Embedded Software Lab. Eclipse Memory Analyzer(MAT) Download from or Eclipse plug-in is providedhttp://eclipse.org/mat “Shallow heap” and “Retained heap” Retained heap : total size of memory after freeing that object

18/27 Embedded Software Lab. Eclipse Memory Analyzer(MAT) Dominator Tree Based on graph theory Dominator: closest object on every path to node A B C E D

19/27 Embedded Software Lab. Heap Dumps : Example com.google.android.apps.maps

20/27 Embedded Software Lab. Heap Dumps : Example

21/27 Embedded Software Lab. Heap Dumps : Example

22/27 Embedded Software Lab. Heap Dumps : Example

23/27 Embedded Software Lab. Heap Dumps : Example

24/27 Embedded Software Lab. Heap Dumps : Example

25/27 Embedded Software Lab. Heap Dumps : Example

26/27 Embedded Software Lab. Heap Dumps : Example

27/27 Embedded Software Lab. Heap Dumps : Example