SIF: A Selective Instrumentation Framework for Mobile Apps Shuai Hao, Ding Li, William G.J. Halfond Ramesh Govindan.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

BellRigner – 1/30/2012 Match the graph to the function: f(x) = x 3 – 2x + 2 g(x) = -2x h(x) = x 4 – 2 i(x) = -x 3 – 1 A B C D.
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
1 Multithreaded Programming in Java. 2 Agenda Introduction Thread Applications Defining Threads Java Threads and States Examples.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Electricity and Magnetism
Year 6 mental test 5 second questions
1 Automating the Generation of Mutation Tests Mike Papadakis and Nicos Malevris Department of Informatics Athens University of Economics and Business.
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
ZMQS ZMQS
Proud Members of the Consulting Group, LLC
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
11 Contracts CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 6)
1 of Audience Survey Results Larry D. Gustke, Ph.D. – October 5, 2013.
ABC Technology Project
A Survey of Web Cache Replacement Strategies Stefan Podlipnig, Laszlo Boszormenyl University Klagenfurt ACM Computing Surveys, December 2003 Presenter:
Trap Diagnostic Facility Todays Software Diagnostic Tool with innovative features for the z/OS software developer Arney Computer Systems.
© S Haughton more than 3?
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
VOORBLAD.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
“Start-to-End” Simulations Imaging of Single Molecules at the European XFEL Igor Zagorodnov S2E Meeting DESY 10. February 2014.
Squares and Square Root WALK. Solve each problem REVIEW:
Do you have the Maths Factor?. Maths Can you beat this term’s Maths Challenge?
© 2012 National Heart Foundation of Australia. Slide 2.
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
1 Atlantic Annual Viewing Trends Adults 35-54, Total TV, By Daypart Average Minute Audience (000) Average Weekly Reach (%) Average Weekly Hours Viewed.
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
1 Unit 1 Kinematics Chapter 1 Day
PSSA Preparation.
Xiao Zhang and Wenliang Du Dept. of Electrical Engineering & Computer Science Syracuse University.
University of Minnesota Optimizing MapReduce Provisioning in the Cloud Michael Cardosa, Aameek Singh†, Himabindu Pucha†, Abhishek Chandra
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
How Cells Obtain Energy from Food
Drill down Reconciliation Analysis Report (RFMFGRCN_RP1) in the Background Instructions Guide June, 2012.
Scalable Rule Management for Data Centers Masoud Moshref, Minlan Yu, Abhishek Sharma, Ramesh Govindan 4/3/2013.
Security and Programming Language Work on SmartPhones
Presentation transcript:

SIF: A Selective Instrumentation Framework for Mobile Apps Shuai Hao, Ding Li, William G.J. Halfond Ramesh Govindan

Background 2 App Behaviors are Complex Source: 3/7/2013www.zdnet.com Source: 6/6/2012www.zdnet.com, 2/9/2013

MotivationDesignImplementationEvaluation Motivation 3 Many Studies on App Behavior AppInsight [OSDI12] AppInsight [OSDI12] AppInsight [OSDI12] AppInsight [OSDI12]

MotivationDesignImplementationEvaluation Motivation 4 Many Studies on App Behavior FreeMarket [NDSS12] FreeMarket [NDSS12] AppInsight [OSDI12] AppInsight [OSDI12] FreeMarket [NDSS12] FreeMarket [NDSS12]

MotivationDesignImplementationEvaluation Motivation 5 Many Studies on App Behavior AppInsight [OSDI12] AppInsight [OSDI12] FreeMarket [NDSS12] FreeMarket [NDSS12] All use app instrumentation Dr. Android [SPSM12] Dr. Android [SPSM12] Dr. Android [SPSM12] Dr. Android [SPSM12]

Server Client App App Cloud Phone In-App Billing API In-App Billing MotivationDesignImplementationEvaluation Motivation 6 App Instrumentation Process is Complex Original Instrumented FreeMarket

It raises the level of abstraction for performing app instrumentation. Goal 7 Instrumentation Framework for Mobile Apps

Approach 8 Instrumentation Framework for Mobile Apps Instrumentation Framework High-level Instrumentation Specification App Instrumented

Find critical paths todebug slow apps Study vulnerability of In-AppBilling service Support fine-grained permissions Remove ads from app Traceapps access to both user location and Internet Binary? Instrument what? Modify app functionality? R1: Instrument binary R2: Instrument at different levels of granularity: bytecode, method, path R2: Instrument at different levels of granularity: bytecode, method, path Requirements 9 Survey of Recent Research R3: Permit user-specified instrumentation Task AppInsight FreeMarket Dr. Android AdCleaner Location Auditor bytecode, method,path bytecode path

Requirements 10 Survey of Recent Research R1: Instrument binary R2: Instrument at different levels of granularity: bytecode, method, path R3: Permit user-specified instrumentation

Challenges 11 Finding the Right Abstractions R2: Instrument at different levels of granularity: bytecode, method, path How to find the high-level abstractions for what to instrument? Gmail Involves ~150,000 path! Involves ~150,000 path! How to succinctly specify code paths of interest?

R3: Provide user-specified instrumentation Arbitrary user-level instrumentation can change execution time of instrumented app Challenges 12 Providing Overhead Feedback CFG BAD Instr. Spec. BAD Instr. Spec GOOD Instr. Spec. GOOD Instr. Spec. How to provide quick offline overhead feedback?

Contributions Novel and flexible abstractions for specifying instrumentation points Support for user-specified instrumentation with quick overhead feedback Extensive evaluation that demonstrates expressivity and efficiency 13 SIF: Selective Instrumentation Framework

MotivationDesignImplementationEvaluation SIF Workflow 14 Instrumenter SIFScript App Instrumented Overhead Estimator User Overhead Feedback SIF Refine High execution time

Task AppInsight FreeMarket Dr. Android AdCleaner Location Auditor Insert before/after code point Replace code point Track paths A B MotivationDesignImplementationEvaluation SIF Abstractions 15 Survey of Recent Research Operations on set of instructions that share common attributes Codepoint Set Abstraction Set of dynamic traces between two user-specified codepoints Set of dynamic traces between two user-specified codepoints Path Set Abstraction

User-specified instrumentation MotivationDesignImplementationEvaluation SIFScript 16 AdCleaner Instrumentation code Specify codepoint filter Hook with user defined code Select target codepoints Place instrumentation Before After

MotivationDesignImplementationEvaluation SIFScript 17 Location Auditor C B A 2 2 GPS Internet D GPS Internet Find API invokes to GPS Find API invokes to INTERNET Place instrumen- tation

MotivationDesignImplementationEvaluation Realizing Path Set Abstraction C B A 2 2 GPS Internet D Reachability Analysis Find potential set of methods M Invoke instructions Class hierarchy M = {A, B, C, D}

MotivationDesignImplementationEvaluation Realizing Path Set Abstraction 19 Path Profiling Ball-Larus approach Extension to inter- procedural profiler Control Flow Graph Path 1 Path 2 Runtime Statistics - Path 1: 3 times - Path 2: 5 times Runtime Statistics - Path 1: 3 times - Path 2: 5 times Unfolding path statistics Record call-site info P 1,P 2,P 2,P 1,P 2,P 2,P 1,P 2 Call Site 2 P 1,CS 1,CS 2,P 2,CS 1,… Call Site 1

MotivationDesignImplementationEvaluation Realizing Path Set Abstraction 20 Path Stitching Reproduce inter- procedural paths by simulated call stack analysis C B A 2 2 GPS Internet D C B A 2 2 GPS Internet D A: P2, CS2 C: P2, CS2 D: P1 A: P2, CS2 C: P2, CS2 D: P1

MotivationDesignImplementationEvaluation Estimating Overhead Feedback 21 CFG User Code Overhead Instructions inserted by SIF User-specified instrumentation code Introduced Overhead instruction i in 6 6 User Code and Dynamic execution statistics e.g. by workload generator Profiled estimates for instruction execution time

MotivationDesignImplementationEvaluation Evaluation 22 Overview Completeness Classicaltasks: e.g. timing profiler Recentresearch: e.g.AppInsight,FreeMarket Conciseness #Source lines of code Efficiency Instrumentationtime Runtime overhead Accuracy of overhead feedback

MotivationDesignImplementationEvaluation Evaluation 23 Conciseness of SIF SIF abstractions permit concise specifications

MotivationDesignImplementationEvaluation Evaluation 24 Efficiency of SIF: Runtime Overhead SIF introduces <5% runtime overhead

MotivationDesignImplementationEvaluation Evaluation 25 Efficiency of SIF: Accuracy of Overhead Feedback SIFs estimation error is within 7%

Conclusion 26 Abstractions for specifying instrumentation points Support for user-specified instrumentation with quick overhead feedback Extensive evaluations that demonstrates expressivity and efficiency SIF: A Selective Instrumentation Framework Future Work Port SIF to other platforms Use SIF to study various kinds of app behaviors Extend overhead estimator to support more sophisticated instrumentation