Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add perf event grouping. #2578

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 33 additions & 14 deletions docs/runtime_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,29 +185,29 @@ perf_event_attr:
{
"core": {
"events": [
["EVENT_NAME"]
"event_name"
],
"custom_events": [
{
"type": 18,
"config": [
"0x304"
],
"name": "EVENT_NAME"
"name": "event_name"
}
]
},
"uncore": {
"events": [
["EVENT_NAME"]
"event_name"
],
"custom_events": [
{
"type": 18,
"config": [
"0x304"
],
"name": "EVENT_NAME"
"name": "event_name"
}
]
}
Expand All @@ -228,9 +228,9 @@ Let's explain this by example:
{
"uncore": {
"events": [
["uncore_imc/cas_count_read"],
["uncore_imc_0/cas_count_write"],
["cas_count_all"]
"uncore_imc/cas_count_read",
"uncore_imc_0/cas_count_write",
"cas_count_all"
],
"custom_events": [
{
Expand Down Expand Up @@ -314,21 +314,40 @@ and perf events configuration for listed events:
{
"core": {
"events": [
["INSTRUCTIONS"],
["INSTRUCTION_RETIRED"]
"instructions",
"instruction_retired"
]
},
"uncore": {
"events": [
["uncore_imc/UNC_M_CAS_COUNT:RD"],
["uncore_imc/UNC_M_CAS_COUNT:WR"]
"uncore_imc/unc_m_cas_count:rd",
"uncore_imc/unc_m_cas_count:wr"
]
}
}
```

Notice: PMU_PREFIX is provided in the same way as for configuration with config values.

#### Grouping

```json
{
"core": {
"events": [
["instructions", "instruction_retired"]
]
},
"uncore": {
"events": [
["uncore_imc_0/unc_m_cas_count:rd", "uncore_imc_0/unc_m_cas_count:wr"],
["uncore_imc_1/unc_m_cas_count:rd", "uncore_imc_1/unc_m_cas_count:wr"]
]
}
}
```


### Further reading

* [perf Examples](http://www.brendangregg.com/perf.html) on Brendan Gregg's blog
Expand All @@ -342,8 +361,8 @@ See example configuration below:
{
"core": {
"events": [
["instructions"],
["instructions_retired"]
"instructions",
"instructions_retired"
],
"custom_events": [
{
Expand All @@ -357,7 +376,7 @@ See example configuration below:
},
"uncore": {
"events": [
["uncore_imc/cas_count_read"]
"uncore_imc/cas_count_read"
],
"custom_events": [
{
Expand Down
2 changes: 1 addition & 1 deletion manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig
newManager.machineInfo = *machineInfo
klog.V(1).Infof("Machine: %+v", newManager.machineInfo)

newManager.perfManager, err = perf.NewManager(perfEventsFile, machineInfo.NumCores, machineInfo.Topology)
newManager.perfManager, err = perf.NewManager(perfEventsFile, machineInfo.Topology)
if err != nil {
return nil, err
}
Expand Down
Loading