Skip to content

Instantly share code, notes, and snippets.

trevnorris /
Last active Jul 21, 2021
Quick steps of how to create a flame graph using perf

The will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading )
sudo sysctl kernel.perf_event_paranoid=0
beaufour /
Created Dec 4, 2012
Python: Streaming Gzip reader
import zlib
import string
BLOCK_SIZE = 16384
"""Read block size"""
"""zlib window buffer size, set to gzip's format"""