Contact Us     

TopMC: Performance Counter Monitor Tool

  • 2011-09-06   TopMC v2.0 is now released!
  • 2018-09-12   TopMC v3.0 is now released! TopMC supports uncore performence monitor on ivybridge_e, broadwell, skylake_sp
  • 2020-07-12   TopMC v4.18 is now released! Support for linux kernel 4.18 is added.

Overview of the TopMC

TopMC is a performance counter monitor tool which can easily support newest CPU architectures under linux. Currently, most of performance counter monitor tools cannot fully support newest Intel architecture, such as Nehalem. The performance counter events in Nehalem are splitted into core events and uncore events. And tools such as PAPI, Oprofile, pfmon, perfctr only support core events, excluding uncore events such as L3 misses, memory operations.

TopMC contains a kernel module to interact with linux kernel which eliminates the supports by native linux kerneli(Oprofile) or kernel patch(pfmon).

TopMC is a lightweight performance counter monitor and trace collector:
  • Easy to use: TopMC is consisted of a kernel module and some scripts. It is convenient to install, easy to understand, and efficienct to modify. Linux kernel is no longer to be recompiled, and scripts are free to modify.

  • Lightweight: Most performance counter monitor tools make use of system call to set the performance counter events in linux kernel. However, TopMC achieves this by procfs file system which occurs less overhead.

  • Per-thread counting: TopMC's kernel trace mode can detect thread switching which distinguishs performance counters of different threads, no matter whether thread migration happens.

  • User level RDPMC instruction: TopMC provides API using RDPMC instruction to monitor code fragements of applications. RDPMC instruction costs only tens of cycles.Thus, applications can obtain more accurate performance counters.

  • Support uncore events in Nehalem,ivybridge_e,broadwell,skylake_sp: The Intel architecture splits the performance counter events into two parts: core events and uncore events. Each part has its own performance counter registers. Most performance counter monitor tools can only support core events, but not uncore events related with L3 cache and memory controller.

  • Differences between TopMC and Perf: Perf is a performance analyzing tool in Linux´╝îPerf can be competent at anything that TopMC can do, while TopMC supports uncore events better. Perf can't count the performance of the certain function, but TopMC can do it, just insert some code at the beginning and end of the function, which is described in Usage.

Features of the TopMC

Besides providing low overhead performance counters at specific time, TopMC can collect performance counter traces which are helpful to analysis periodical behaviors of applications.

Last Updated: Sep 30, 2018