A program to draw rectangles from heap traces.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
HeapVizGL.pro
HeapVizGL_tests.pro
HeapVizGL_tests.pro.user Minor Nov 7, 2017
LICENSE
LICENSE_json.h
README.md
active_pages.vert
activeregioncache.cpp
activeregioncache.h
activeregionsdiagramlayer.cpp Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
activeregionsdiagramlayer.h
activeregionsdiagramlayer.o Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
address_shader.vert
addressdiagramlayer.cpp
addressdiagramlayer.h
addressdiagramlayer.o
displayheapwindow.cpp
displayheapwindow.h
event_shader.vert
eventdiagramlayer.cpp
eventdiagramlayer.h
eventdiagramlayer.o Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
glheapdiagram.cpp
glheapdiagram.h
glheapdiagram.o Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
glheapdiagramlayer.cpp
glheapdiagramlayer.h
glheapdiagramlayer.o Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
glsl_simulation_functions.cpp
glsl_simulation_functions.h
grid.frag
grid.vert
gridlayer.cpp
gridlayer.h
heap.json
heapblock.cpp
heapblock.h
heapblock.o Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
heapblockdiagramlayer.cpp Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
heapblockdiagramlayer.h
heapblockdiagramlayer.o
heaphistory.cpp
heaphistory.h Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
heaphistory.o
heapvizwindow.cpp
heapvizwindow.h Added a file chooser on startup and the ability to highlight blocks a… Jun 19, 2018
heapvizwindow.o
heapvizwindow.ui
heapwindow.cpp
heapwindow.h
json.hpp Hunting down jumping address lines in high address ranges May 22, 2017
linearbrightnesscolorscale.cpp
linearbrightnesscolorscale.h
linearbrightnesscolorscale.o
main.cpp
resource.qrc
simple.frag
simple.vert
testactiveregioncache.cpp
testactiveregioncache.h
testdisplayheapwindow.cpp
testdisplayheapwindow.h
transform3d.cpp Halfway through dealing with the 64-bit heap space issues Aug 19, 2016
transform3d.h
ui_heapvizwindow.h
vertex.cpp Halfway through dealing with the 64-bit heap space issues Aug 19, 2016
vertex.h

README.md

A Qt/OpenGL-based implementation of a heap history visualisation UI in along the lines of Gerardo Richarte's HeapDraw (for more details, check http://actes.sstic.org/SSTIC07/Rump_sessions/SSTIC07-rump-Richarte-Heap_Massaging.pdf)

The tool had been reimplemented by various people in various places a few times, usually in a hackish / nonscalable manner. zynamics used to hand source code for a JOGL-based UI out with some of our trainings, but that tool is not easily portable to modern OpenGL or 64-bit address spaces.

Other common mistakes include:

  • Not using OpenGL to render lots of rectangles.
  • Using floats or other low-precision coordinates to represent rectangle corners and hence suffering from rounding errors.
  • Not using a language that can deal with a couple million rectangles.

The codebase in this repository has the following goals:

  • Fast and scalable to 20m+ allocations. Haven't tried, but should work.
  • As precise as possible. Use precise integer arithmetic as much as possible to avoid rounding errors shifting rectangles around.
  • Useable. This will take some time.

Instructions for the moment:

  • Build using stock QtCreator.
  • You will need: libgflags-dev mesa-common-dev libqt4-opengl-dev
  • The current trunk will simply try to load /tmp/heap.json - use the enclosed json file as an example.

A million tasks are still left to do. Useful things that should be added:

  • Code to display tooltips when the mouse hovers over a block.
  • Code to highlight a block when it is clicked / selected.
  • Code to add horizontal red lines, too.
  • Code to select all blocks that are modified between two events.
  • ...

Contributions very welcome.

Basic controls:

  • CTRL + wheel: Zoom in / out
  • Click + drag: Pan diagram
  • CTRL + shift + wheel: Squash / stretch horizontally
  • shift + wheel: Squash / stretch vertically

Cheers, Halvar Flake / Thomas Dullien