ashleydavies / MGAPP

A modified version of GAPP, made as part of my master's project at Imperial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MGAPP

GAPP is a profiler to detect serialization bottlenecks in parallel Linux applications. It works by tracing kernel context switch events by kernel probes managed using the extended Berkeley Packet Filter (eBPF) framework. It has been tested on multi-threaded and MPI C/C++ applications. — The GAPP README.

This repository was is an imaginatively named modified version of GAPP (Generic Automatic Parallel Profiler - corresponding publication), and was developed as part of my master's project in 2018-2019. GAPP was developed by Reena Nair at Imperial College alongside Tony Field, both of whom helped greatly with this.

The same prerequisites as GAPP are required.

Some of the main things that were added are:

  1. Classificiation of critical stack traces (I/O, synchronisation)
  2. Metadata about events
    • I/O file name
    • Socket address
  3. Waker / woken traces for synchronisation events where possible
  4. Analysis for individual locks that were detected
  5. A terminal-based GUI
  6. Some general QoL improvements:
    • Simplifying some common C++ stack trace patterns
    • Ability to spawn processes rather than tracking existing ones (and also to attach to a specific PID)

Some explanation is available in the associated report, although it was intended as my dissertation, and as such is not a condensed form of documentation.

Usage

A common usage example:

sudo ./mgapp.py -e path -s bin/mutex

The -e flag enables enhanced stack trace reporting, path indicates that you will be providing a path to the application to be traced, and -s indicates you would like mgapp.py to spawn the process for you (rather than attaching to one you will spawn yourself).

Thus, this is in some level equivalent to:

sudo ./mgapp.py -e path bin/mutex

And then running bin/mutex separately in another tab, leaving a sufficient delay (a few seconds) for mgapp.py to set up the appropriate kernel probes (which do not need the program to be running to set up).

Most of the flags from the original version of GAPP are still in place and functional. I would suggest reading the primary repository's documentation for more advanced usage instructions.

Structure

The source for MGAPP is held within the MGAPP folder (MGAPP/py/ for python files) along with mgapp.{py, c}.

The prog folder contains some small demo applications you can try this out on.

Disclaimer

The software in this repository has not been extensively tested and is likely to have a number of bugs and issues.

Please feel free to get in touch via email or a Github issue about anything you think might be broken, or if you have any questions related to usage, and I will be more than happy to help where possible.

Finally, to reiterate what was stated at the top, much of this repository is based on the fantastic work by Reena Nair and Tony Field. I highly recommend reading the publication for GAPP.

About

A modified version of GAPP, made as part of my master's project at Imperial


Languages

Language:C++ 47.6%Language:Python 42.0%Language:C 9.7%Language:Makefile 0.7%