Flame graph produced for a single-threaded computation on a 16-core machine is rather useless

Open
#18 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
performance

Research direction

No files, tests, or entry points are named. Reproduce the issue with a single-threaded Julia computation and JULIA_NUM_THREADS=16, then trace how profiling samples become the flame graph; done means an optional regexp filter can remove sleeping-thread samples without affecting unfiltered output.

Written by the indexing model from the issue text.

Description

This isn't really a bug, but when I run a single-threaded computation in julia with JULIA_NUM_THREADS=16, I get, e.g., ~200 samples from my own code plus ~3000 samples in the functions poptask/wait/task_done_hook. This is correct in the sense that that is where the samples were taken, but when producing the flame graph all of the space in the graph (15/16=93% of it) is occupied by sleeping threads that were sampled.

There isn't such an issue with printed output from Profile because it is as intrusive, the same samples are just printed at the bottom on three lines.

Would you accept a pull request to optionally filter profiling data by a regexp to remove sleeping threads from the flame graph?

This is what it looks like:
flamegraph

Dominant language
Julia
Stars
145
Forks
14
Avg merge
2d 21h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tkluck/StatProfilerHTML.jl

All issues in tkluck/StatProfilerHTML.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.