scalac-profiling icon indicating copy to clipboard operation
scalac-profiling copied to clipboard

Color flag seems incorrect in the Usage instructions

Open acloudmovingby opened this issue 1 year ago • 2 comments

The Usage section says to do --color=scala-compilation when you run Flamegraph, but that makes it all black and it's hard to distinguish the flamegraph segments: image

If I remove that flag, we get nicer colors:

image

--color= doesn't seem to be a valid flag in the version of Flamegraph I used, so maybe it used to be?

Either way, I'm proposing removing that line from the docs.

acloudmovingby avatar Mar 26 '24 21:03 acloudmovingby

Apologies, misunderstood the syntax. The flamegraph tool does take a --color flag, and it sorts colors reasonably when I use --java.

image

I still get all black when using --color=scala-compilation but perhaps that's the nature of my code sample or I'm supposed to get scala-compilation imported somehow

acloudmovingby avatar Mar 27 '24 00:03 acloudmovingby

Hey @acloudmovingby. I wasn't able to reproduce the issue. I followed these steps:

  1. Cloned the scalacenter/scalac-profiling repository: git clone [email protected]:scalacenter/scalac-profiling.git
  2. cd into the external/Flamegraph directory
  3. Executed the git submodule update --init (an important part)
  4. Run the command including --color=scala-compilation:
/flamegraph.pl \
    --hash --countname="μs" \
    --color=scala-compilation \
    /Users/.../implicit-searches-global.flamegraph > compile-all-modules.svg

I got my coloured graph painted as expected: Screenshot 2024-03-27 at 08 42 26

danicheg avatar Mar 27 '24 05:03 danicheg