summaryrefslogtreecommitdiff
path: root/internal/flamegraph
diff options
context:
space:
mode:
Diffstat (limited to 'internal/flamegraph')
-rw-r--r--internal/flamegraph/worker.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/flamegraph/worker.go b/internal/flamegraph/worker.go
index 09458fd..7369949 100644
--- a/internal/flamegraph/worker.go
+++ b/internal/flamegraph/worker.go
@@ -24,7 +24,12 @@ func (w worker) run(ctx context.Context, wg *sync.WaitGroup, ch <-chan *event.Pa
for {
select {
case ev := <-ch:
- filePath := ev.File.Name()
+ var filePath string
+ if ev.File == nil {
+ filePath = "N:file"
+ } else {
+ filePath = ev.File.Name()
+ }
pathMap, ok := w.collapsed[filePath]
if !ok {
pathMap = make(map[types.TraceId]counter)