Note: This version is outdated. Please contact (tommy [dot] janjusic [at] gmail [dot] com) (Tommy), for more info.
Gleipnir is a memory profiling and tracing tool based on the Valgrind binary instrumentation framework. It maps instruction load and store operations to
program's internal data structures. The purpose is to use the tracing data to enable
cache simulation with respect to program's internal data structures.
The name Gleipnir comes from the Norse mythology. Gleipnir is a deceptively strong ribbon which was
used to bind a mythical wolf named Fenrir. The idea behind Gleipnir is that, while
simplistic, it can be used to bind the memory hogs in applications.
contact: tjanjusic [at] unt [dot] edu
The current version was tested and working on Linux 3.2.0-45 Ubuntu 12.04.
Requirements: gcc-4.4.5 (should work with earlier versions up to 3.x.x), autotools
5.10, subversion
for plotting, Latex/TexLive, gnuplot, and/or Latex beamer
Get the latest version of Valgrind and Gleipnir:
$ svn co svn://svn.valgrind.org/valgrind/trunk valgrind $ cd valgrind $ svn co http://csrl.unt.edu/svn/tools/gleipnir gleipnir --username=guest
username: guest, password: Password2013
cd into the gleipnir directory
$ cd gleipnir (valgrind_src/gleipnir)
Before making Valgrind and Gleipnir:
Apply debug patch and makefile patches.
$ ./glconf -d
This will patch debuginfo.c and pub_tool_debuginfo.h for Gleipnir's use, and update Valgrind's makefiles and conf files.
Malloc wrap vs. Malloc replace?
wrap - will patch Valgrind and wrap malloc calls (i.e. NOT USE Valgrind's malloc replacement
function) - it's similar but different than standard glibc - malloc() implementation.
'-p' applies the patch '-m wrap/malloc' configures gleipnir.
$ ./glconf -p -m wrap
replace - will NOT patch Valgrind, but configure Gleipnir to use gl_malloc_replacement.c ( i.e. Allocation will call VG_(cli_malloc)() )
$ ./glconf -m replace
Applying the patch will not (should not) break other tools. (fingers crossed)
IMPORTANT: If you want to switch between the configurations (wrap vs replace), you have to distclean and start from top, I'm not sure why, maybe something to do with linking libraries - I really don't understand how everything is linked.
Proceed with the normal Valgrind install
autogen.sh; configure --prefix=<install dir> make; make install
For general questions please contact: tjanjusic [at] unt [dot] edu
Follow this link for an explanation on how to run Gleipnir.
Gleipnir's traces are only useful in context of a cache simulator or other analysis software, follow this link for an explanation on Gl_cSim.