diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-14 20:12:53 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-14 20:12:53 +0200 |
| commit | a4948d9fb1aded11e3111f3730b4e3e4e5bd540c (patch) | |
| tree | a769be7265ea956033380919eaf1d8d56e395892 /internal/flamegraph | |
| parent | 5373526439ef4f7554da365bff7817e8c621a9b4 (diff) | |
use syscall name without enter_ prefix
Diffstat (limited to 'internal/flamegraph')
| -rw-r--r-- | internal/flamegraph/flamegraph.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/flamegraph/flamegraph.go b/internal/flamegraph/flamegraph.go index 1bfd82e..85b6a5c 100644 --- a/internal/flamegraph/flamegraph.go +++ b/internal/flamegraph/flamegraph.go @@ -15,9 +15,11 @@ type counter struct { duration uint64 } -// TODO: Profile for CPU usage +// TODO: Profile for CPU usage. If too slow, can fan out into multiple maps and +// then merge at the end the maps. type Flamegraph struct { - // Collapsed flamegraph stats collector + // TODO: Keep al lthe individual files at the leaf in a map as well. + // And when dumped, only dump the N "highest" and summarize the other ones. collapsed map[string]map[types.TraceId]counter inCh chan *event.Pair Done chan struct{} @@ -97,7 +99,7 @@ func (f Flamegraph) dumpBy(outfile string, by func(counter) uint64) { } for traceId, cnt := range value { - _, err := fmt.Fprintf(file, "%s;syscall`%s %v\n", sb.String(), traceId, by(cnt)) + _, err := fmt.Fprintf(file, "%s;syscall`%s %v\n", sb.String(), traceId.Name(), by(cnt)) if err != nil { panic(err) } |
