Skip to content
/ memdb Public
forked from DataChi/memdb

Tools to track memory accesses in applications and visualize the patterns to reveal opportunities for optimization.

Notifications You must be signed in to change notification settings

conbrad/memdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 

Repository files navigation

memdb

This repository contains a family of tools to track memory accesses in applications and to visualize memory access patterns in order to reveal opportunities for program optimization.

At the moment, the tools allow you to detect sharing (true and false) in multithreaded C applications in order to debug scalability problems. To visualize data sharing in your application, you need to use the following three tools in the order that they are listed:

  • memtracker -- a Pin tool to collect a detailed memory trace of your running application
  • memtracker2json -- a script that converts the Pin trace to JSON format
  • memvis -- a tool that analyzes the JSON trace and produces HTML and JavaScript to visualize it.

You can run them sequentially or as a pipeline. If you run them sequentially, what needs to happen is this:

  1. memtracker will spit log records to stdout. Redirect this output to a file, say log.txt. (See scripts/memtracker.sh for an example.)
  2. Run memtracker2json.py -- supply log.txt as the input. Memtracker2json will output the JSON trace to the stdout. Save this trace to a file. (See the documentation below for an example).
  3. Run memvis, providing the JSON trace generated above as an input. See the memvis documentation (below) to visualize the output in the browser.

An alternative to running the tools sequentially is to pipe the output of each tool into the input of the next tool. This removes the need to save the traces. For an example, take a look at scripts/memtracker+m2j.sh.

About

Tools to track memory accesses in applications and visualize the patterns to reveal opportunities for optimization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.2%
  • C 12.1%
  • Python 3.1%
  • Shell 1.6%
  • Makefile 1.0%