pmcgui

This is an old revision of the document!


pmc(3) is a performance measurement framework for FreeBSD which uses the hardware performance measurement counters in modern CPUs to provide low-overhead, non-intrusive, system-wide measurement of production systems.

The project consists in creating a graphical user interface (GUI) analysis tool. It will be based on the performance monitoring counters framework pmc(3) and pmclog(3), using in-cpu measurement counters. The PMC GUI will allow a visual detection of performance bottlenecks in the execution of a program.

Management / welcome screen: The user associates PMCs (measurements) and processes. A set of allowed measurements i.e. according to the CPU - will be proposed to the user. Target processes can be selected by mouse.

Display/monitoring: The user can see in realtime what is happening. Profiling will concern selected processes, threads, and children or descendant processes. Spots/rectangles will correspond to a code segment. There will be a time view of the spots, with 1-2-3D graphes and color codes. Eventually, an interactive link to the function or code of the program should be implemented.

It's mostly in python and c, and is event driven (asynchronous). The GUI itself use wxPython. The program use FreeBSD specific and non FreeBSD specific system calls. A makefile generate a quick and dirty python module to pmc(3). It can be a good idea to simulate pmc_read() output in a first time. See http://blogs.freebsdish.org/mprevot/ for more details, and discussion.

A port is not done yet, but you can use pkg_add -r py24-wxPython py24-freebsd py24-ezpyinline for dependencies.

A main event loop [G] manage user interface events (mouse and keyboard events) and other workers. One thread [S] get every second the state of the system, eg active processes that can be bound to. One thread [P] get pmc data. One thread [V] build images every 1/25s. [G] can create or kill workers, but have readonly access to the data they generate. [V] have readonly access to [S] and [P] generated data.

  • State system thread worker. Processes are displayed and sortable per uid, cpu usage, name.
  • pmc(3) simulator.
  • Double buffering display, graph constructor.

The GUI loop will naturally grow as other parts of the program are added, and feedbacks are made.

  • pmcgui.1184346377.txt.gz
  • Last modified: 2007/07/13 17:06
  • by MathieuPrevot