google / google/perfetto

Feature Request: Provide a convenience view/table for counters with followers

Open
#4,758 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.5k
Forks
868
Avg merge
2d 1h
Merged PRs (30d)
218

Description

When I have a config similar to
```
perf_event_config {
timebase {
tracepoint {
name: "sched/sched_switch"
}
period: 1
}
followers {
raw_event {
type: 12
config: 17
}
name: "CPU_CYCLES"
}
followers {
raw_event {
type: 12
config: 8
}
name: "INST_RETIRED"
}
}
```

I would like to have a table like below, including column values such as CPU_CYCLES being in deltas rather than accumulated/sampled counter value.

| ts | cpu | sched_switch | CPU_CYCLES | INST_RETIRED |
| ------------ | --- | ------------ | ---------- | ------------ |
| 891848972656 | 3 | 1 | 786603 | 2134024 |

This would allow me to calculate metrics like IPC (INST_RETIRED / CPU_CYCLES) as a new column easily.

Currently I do this with joining, grouping, hard-coded pivoting over using WINDOWed values (to calculate deltas) which seems like waste given this should be already available at perf data consumption.

Contributor guide

Open the contributing guide

Research direction

Start with the perf_event_config example and the existing join, grouping, pivoting, and windowed-value approach described in the issue. Trace the perf data consumption path to find where a convenience table could be exposed. Done means the table provides timestamp, CPU, sched_switch, and follower columns as deltas, allowing IPC calculations without those manual transformations.

Written by the indexing model from the issue text.

Assessment

Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.