Skip to content

Commit

Permalink
Add README for buffer pool visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed Nov 12, 2021
1 parent 5ca8a7e commit c4cebb4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/buffer_pool_visualizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Buffer Pool Visualizer

A visual debugging tool for the Hermes `BufferPool` and `MetadataManager`.

To run, start a Hermes instance and then run `make viz` from the build
directory. It can also visualize a crashed Hermes run if the shared memory
segment still exists.

To enable in the build, set `HERMES_BUILD_BUFFER_POOL_VISUALIZER=ON` in CMake.
In order to visualize the `MetadataManager`, Hermes must be built with the CMake
option `HERMES_DEBUG_HEAP=ON`.

## Dependencies

[SDL](https://www.libsdl.org/) is the only additional dependency. On Ubuntu,
`sudo apt install libsdl2-dev`.

## Controls

| Key | Functionality |
|-----|--------------------------------------------------------|
| 0-9 | If viewing the `BufferPool`, display Tier N |
| 0 | If viewing the `MetadataManager`, display the ID heap |
| 1 | If viewing the `MetadataManager`, display the map heap |
| b | View the `BufferPool` |
| c | Print a count of all buffers and slabs |
| f | Print the sizes of the buffer free lists |
| m | View the `MetadataManager` |
| r | Reload the shared memory file |
| s | Save a bitmap of the current view |
| ESC | Exit the visualizer |

0 comments on commit c4cebb4

Please sign in to comment.