adding consistent palette option + cleanup tabs/spaces etc. #25

merged 5 commits into from Nov 25, 2013


None yet
2 participants

shawn-sterling commented Nov 22, 2013

Hello Brendan!

First of all, I was at LISA13, attended both of your talks; loved them. I have been using flamegraph quite a bit since then, thank you for creating this tool!

The feature I added creates a palette file so the colors will be consistent. I know you have the --hash option; but that is not quite what I was looking for (also the hash option colors (for what I'm doing) are very close together so It's hard to tell anything apart).

This lets me have a baseline color map, and on the second flamegraph I set a different $colors and it makes the differences really stand out. If you take a look at the example svgs I have put in the demos dir, you will see what I mean (updated documentation with more details).

Also, this lets you manually edit the colors so you can set some key functions to hot pink or whatever to make them stand out like a sore thumb. I imagine building up a very large palette file over time with many custom colors for particular symbols.

Lastly if you don't think this is a good fit, no worries.

Have a good day.


Note1: My perl is rusty (switched to python) and the perl mafia may kill me for not using Storable to write the hash to disk, but I was following your lead of not using any additional modules. :)

Note2: From the looks of it you are using 8 column width tab tabs, and Tim Bunce is using space tabs. I tried to make it all tab tabs but fear I may have screwed up the spacing. I use 4 column space tabs so I'm a stranger in a strange land here :) . I added a vim modeline at the bottom of what it appears you are using. If you let me know your actual settings I'll fix the tabs/spacing and do another pull request.

Note3: I couldn't think of a better option/name for "--cp" happy to call it something else if you think of something better.


brendangregg commented Nov 25, 2013

Wow, the palette-example-broken.svg example really works, and an efficient way to do it - switching to a different --colors palette for the differences. I'll be trying this out myself for similar debugging cases. Thanks!

@brendangregg brendangregg added a commit that referenced this pull request Nov 25, 2013

@brendangregg brendangregg Merge pull request #25 from shawn-sterling/master
adding consistent palette option + cleanup tabs/spaces etc.

@brendangregg brendangregg merged commit d9d56df into brendangregg:master Nov 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment