Your browser does not support JavaScript!

access icon free Live interactive queries to a software application's memory profile

Memory operations are critical to an application's reliability and performance. To reason about their correctness and track opportunities for optimisations, sophisticated instrumentation frameworks, such as Valgrind and Pin, have been developed. Both provide only limited facilities for analysing the collected data. This work presents a Valgrind's extension for examining a software applications’ dynamic memory profile through live interactive analysis with SQL. The Pico COllections Query Library (pico ql) module maps Valgrind's data structures that contain the instrumented application's memory operations metadata to a relational interface. Queries are type-safe and the module imposes only a trivial overhead when idle. The authors evaluate the proposed approach on ten applications and through a qualitative study. They find 900 kb of undefined bytes in bzip2 that account for 12% of its total memory use and a performance-critical code execution path in the Unix commands sort and uniq. The referenced functions are part of glibc and have been independently modified to boost the library's performance. The qualitative study has users rate the usefulness, usability, effort, correctness, and expressiveness of pico ql queries compared to Python scripts. The findings indicate that querying with pico ql incurs lower user effort.


    1. 1)
      • 3. Prasad, V., Cohen, W., Eigler, F. C., et al: ‘Locating system problems using dynamic instrumentation’. Proc. of the 2005 Ottawa Linux Symp. (OLS), Ottawa, Canada, June 2005.
    2. 2)
      • 2. Cantrill, B.M., Shapiro, M.W., Leventhal, A.H.: ‘Dynamic instrumentation of production systems’. Andrea Arpaci-Dusseau and Remzi Arpaci- Dusseau, editors, Proc. of the USENIX 2004 Annual Technical Conf., ATEC ‘04 USENIX Association, Berkeley, CA, USA, 2004, pp. 1528.
    3. 3)
      • 14. McConnell, S.: ‘Code complete, second edition’ (Microsoft Press, Redmond, WA, USA, 2004).
    4. 4)
      • 16. Welty, C., Stemple, D.W.: ‘Human factors comparison of a procedural and a nonprocedural query language’, ACM Trans. Database Syst., 1981, 6, (4), pp. 626649.
    5. 5)
      • 10. Azadmanesh, M.R., Hauswirth, M.: ‘SQL for deep dynamic analysis?’. Proc. of the 13th Int. Workshop on Dynamic Analysis, WODA 2015 ACM, New York, NY, USA, 2015, pp. 27.
    6. 6)
      • 12. Lencevicius, R., Hölzle, U., Singh, A.K.: ‘Dynamic query-based debugging of object-oriented programs’, Autom. Softw. Eng., 2003, 10, (1), pp. 3974.
    7. 7)
      • 6. Fragkoulis, M., Spinellis, D., Louridas, P.: ‘An interactive SQL relational interface for querying main-memory data structures’, Computing, 2015, 97, (12), pp. 11411164.
    8. 8)
      • 5. Gregg, B.: ‘Systems performance: entreprise and the cloud’ (Prentice Hall, Upper Saddle River, NJ, 2013).
    9. 9)
      • 1. Nethercote, N., Seward, J.: ‘Valgrind: a framework for heavyweight dynamic binary instrumentation’. Proc. of the 2007 ACM SIGPLAN Conf. Programming Language Design and Implementation, PLDI ‘07 ACM, New York, NY, USA, 2007, pp. 89100.
    10. 10)
      • 17. Nanz, S., Furia, C.A.: ‘A comparative study of programming languages in rosetta code’. Proc. of the 37th Int. Conf. Software Engineering - Volume 1, ICSE ‘15, Piscataway, NJ, USA, 2015, pp. 778788.
    11. 11)
      • 11. Martin, M., Livshits, B., Lam, M.S.: ‘Finding application errors and security flaws using PQL: a program query language’. Proc. of the 20th Annual ACM SIGPLAN Conf. Object-oriented Programming, Systems, Languages, and Applications, OOPSLA ‘05 ACM, New York, NY, USA, 2005, pp. 365383.
    12. 12)
      • 7. Fragkoulis, M., Spinellis, D., Louridas, P., et al: ‘Relational access to unix kernel data structures’. Proc. of the Ninth European Conf. Computer Systems, EuroSys ‘14 ACM, New York, NY, USA, 2014, pp. 12:112:14.
    13. 13)
      • 4. Stallman, R.M., Support, C.: Debugging with GDB: The GNU source-level debugger, GDB version 4.16. Free software foundation, Boston, MA, 1996.
    14. 14)
      • 19. Melnik, S., Gubarev, A., Long, J.J., et al: ‘Dremel: interactive analysis of web-scale datasets’, Proc. VLDB Endow., 2010, 3, (1–2), pp. 330339.
    15. 15)
      • 15. Brooke, J.: ‘SUS: A quick and dirty usability scale’, in Jordan, P.W., Weerdmeester, B., Thomas, A., et al (Eds): ‘Usability evaluation in industry’ (Taylor and Francis, London, 1996), pp. 189194.
    16. 16)
      • 13. Davis, F.D.: ‘Perceived usefulness, perceived ease of use, and user acceptance of information technology’, MIS Q., 1989, 13, (3), pp. 319340.
    17. 17)
      • 8. Lee, K.H., Sumner, N., Zhang, X., et al: ‘Unified debugging of distributed systems with recon’. IEEE/IFIP 41st International Conference on Dependable Systems & Networks (DSN), Hong Kong, China, June 2011, pp. 8596.
    18. 18)
      • 18. Prechelt, L.: ‘An empirical comparison of seven programming languages’, Computer. (Long. Beach. Calif), 2000, 33, (10), pp. 2329.
    19. 19)
      • 9. Goldsmith, S.F., O'Callahan, R., Aiken, A.: ‘Relational queries over program traces’. Proc. of the 20th Annual ACM SIGPLAN Conf. Object-oriented Programming, Systems, Languages, and Applications, OOPSLA'05 ACM, 2005, New York, NY, USA, 2005, pp. 385402.

Related content

This is a required field
Please enter a valid email address