1 / 23

Runtime Techniques for Efficient and Reliable Program Execution

Runtime Techniques for Efficient and Reliable Program Execution. Harry Xu CS 295 Winter 2012. Who Am I. Recently got my Ph.D. (in 08/11) Interested in (static and dynamic) program analysis Theoretical foundations (mathematical models)

maleah
Download Presentation

Runtime Techniques for Efficient and Reliable Program Execution

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Runtime Techniques for Efficientand ReliableProgram Execution Harry Xu CS 295 Winter 2012

  2. Who Am I • Recently got my Ph.D. (in 08/11) • Interested in (static and dynamic) program analysis • Theoretical foundations (mathematical models) • Applications (e.g., compiler, performance tuning, verification, security, distributed computing, etc.) • Most recent interest--- software bloat analysis

  3. Who Are You • Your name • Advisor • Research interests • What do you expect from the class

  4. Program Analysis • Dynamic analysis v.s. static analysis

  5. Analysis Dimensions • Analysis scope • Intraprocedural– focusing on each individual function • Interprocedural– considering calling structures • Context sensitivity • Context-sensitive– distinguishing different callers when analyzing each function • Context-insensitive– get a unified solution

  6. Concerns • Precision • Requires higher context-sensitivity, finer-grained abstractions, etc. • Scalability • The opposite • Find the right balance • Combine static and dynamic analyses

  7. Application Domains • Static analysis • Static compiler (e.g., type system and optimizations) • Verification tools – prove a program is “bug-free” • Dynamic analysis • (Dynamic) optimizing compiler (e.g., providing feedback) • Testing – find bugs in specific program runs • Performance tuning

  8. This Class • Focus on dynamic analysis • Foundations • Various profiling techniques • Dynamic slicing • Calling context encoding • Applications • Memory leak detection • Software bloat detection • Finding bugs • Providing feedback in a dynamic compiler

  9. This Class • A research seminar • Emphasize both • Fundamental technology (i.e., science) • Practical problems (i.e., engineering) • CS Research • Solving engineering problemswith scientific solutions

  10. Foundations I – Profiling void main(String[] s){ A a = new A(…); for(…){ B b = new B(…); } } long totalObjs = 0; • A run-time technique that gathers execution information • E.g., total # objects created during the execution • How--- via program instrumentation totalObjs ++; totalObjs ++; print(totalObjs);

  11. Foundations I – Profiling • Kinds • Path profiling (Week 1) • Calling context profiling (Week 4) • Dependence profiling (Week 5)

  12. Foundations II – Dynamic Slicing void main(String[] s){ a.f = …; … c = b.f; } • Record all memory accesses and their dependence relationships • Applications • Automated debugging • Performance analysis 0x23456789

  13. Foundations III – Context Profiling void m(…){ bar(new A()); //call 1 } void n(…){ bar (new B()); //call 2 } void bar(A a){ a.f = …; } • Record calling contexts for method invocations m n call 2 call 1 bar

  14. Foundations III – Context Profiling void m(…){ bar(new A()); //call 1 } void n(…){ bar (new B());//call 2 } void bar(A a){ a.f = …; } • Record calling contexts for method invocations • Applications • Context-sensitive dynamic analysis • Interprocedural compiler optimization m n call 1 call 2 bar bar

  15. Application I – Memory Leak Detection • C/C++ memory leaks • a = malloc (…), but no free(a) • Can be detected by both static and dynamic analyses • Memory leaks in managed programs(week 3 and 7) • Caused by unnecessary references • Itisundecidabletodetermineobjectliveness • Usedynamicanalysiswithvariousheuristics

  16. Application II – Software Bloat Analysis • Inefficient run-time work and resource usage to achieve simple tasks • Surprisingly common • Supporting thousands of users (millions are expected) • Consequences for scalability, power usage, and performance • Week 3 and 8

  17. Application III – Bug Detection • Use dynamic analysis to find functional bugs (Week 7 and 8) • We are not going to cover • Concurrency bug detection • Systematic testing • One security paper (DieHarder)

  18. Application IV – Optimizing Compiler • Use dynamic analysis to provide feedback to direct optimizations (Week 10) • Dynamic analyses exist in almost all modern dynamic compilers

  19. Grading Policy I • Paper critiques (15%) • Problem definition • Key insights/contributions • Weakness/flaws • Opportunities for future work • Your problems in understanding the paper • Due 6pm the day before the class • Presenters are exempt from writing critiques for papers they are presenting

  20. Grading Policy II • Paper presentations (30%) • Two presentations on similar topics in one class • 30 mins for each • Important presentation skills • Focus on high-level ideas • Illustrate basic ideas using concrete examples and pictures • Do not copy algorithms/formulae/complex examples from the paper • Include interesting/non-trivial questions you want discuss in the class • Register for papers before Friday Jan 13

  21. Grading Policy III • In-class discussion (15%) • Assume your audience has read the paper • Try to say non-obvious, interesting things • Depth is more important than breadth

  22. Grading Policy IV • Projects (30%) • Either by yourself or with another student • Try to work on an ambitious project that may not work eventually, rather than a simple project that is guaranteed to work • It is a good idea to make it your own research project, rather than think of it as something to fulfill the class requirement • Let’s publish them!!!

  23. Important Notice • Paper critiques for the first two papers are due 6pm Tuesday (1/10) • Paper selection due on Friday (1/13) • Any problem with the current class schedule?

More Related