The goal of this project is to develop language and/or library support for performance debugging. Presently, performance debugging tools operate at a very coarse grain (think gprof), and can have a large impact on the performance of a program (think valgrind). This project seeks to allow programmers to target specific performance characteristics of narrow regions of code, lessening the performance impact of such debugging, and providing more useful information. Additionally, a tool like this could be used in an "always-on" way, allowing different reporting mechanisms when performance targets aren't met.
Specifically, this project would proceed as follows:
- Create an API for accessing the performance counters exposed by the Linux cgroups mechanism
- Add syntax to C using the CIL library whose implementation uses the cgroups mechanism to selectively enable and measure these counters over syntactically scoped regions of code.
- Add syntax to C which allows the programmer to specify performance targets over these ranges of code.
- Finally, add syntax to C to constrain a program's resource usage over syntactically scoped regions of code
Background: Ocaml, Linux, Compilers