1

i am collecting profile with custom instrumentation of each function and the format is simple. Each line in the profile dump has the following data:

symbol address, start time, end time

Is it possible to convert this to a format consumable by flamegraph charting tool? What are the formats consumed by a framegraph charting tool?

A. K.
  • 34,395
  • 15
  • 52
  • 89

1 Answers1

1

a) No, because flamegraphs need call stacks, and b) flamegraphs are pretty but useless for finding speedups. Speed problems easily hide in them, and they usually ignore I/O. Also here.

Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135
  • is it possible to construct call stacks from the timestamps assuming everything is single threaded? – A. K. Dec 16 '21 at 05:45
  • 1
    No, because at the time of entering or exiting a routine you don't know where it was called from. Listen, forget flame graphs. They are popular because they are pretty, but little else. What you need is stack samples (line-of-code level) taken at random wall-clock times, which the user can see, not summarized. They will lead directly to whatever is costing time. – Mike Dunlavey Dec 16 '21 at 13:33
  • assuming single threaded application, the call sequence will be chronological. so as long as a function `foo` is within the [start time, end time] bounds of another function `bar`, can we not safely say `bar` calls `foo`... transitively? – A. K. Dec 18 '21 at 20:21
  • @A.K. I suppose. It would be a chore figuring out what the hierarchy is. – Mike Dunlavey Dec 19 '21 at 17:03