llnl / llnl/mitos

Automated hardware architecture detection in procsmpl.cpp (feature request)

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
15
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The performance event hardware counter codes used in [src/procsmpl.cpp](https://github.com/LLNL/Mitos/blob/develop/src/procsmpl.cpp#L113-L132) are specific to the Sandy Bridge generation of Intel processors. This results in an error being printed when `examples/api_test` is run (in addition to the performance event data being presumably lost) on a Westmere machine:

```
$ ./examples/api_test
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
0
```

These hardware counter encodings can be found on any architecture using a tool like [perfmon2](http://perfmon2.sourceforge.net/). Automated hardware architecture detection is desired in Mitos in order to allow it to be used out-of-the-box on architectures other than Sandy Bridge.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/procsmpl.cpp around the Sandy Bridge-specific counter encodings, then run examples/api_test on the reported Westmere case to reproduce the perf_event_open errors. Use the linked perfmon2 reference to investigate architecture-specific encodings; done means Mitos detects the hardware architecture and avoids losing performance event data on non-Sandy Bridge systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems, performance
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.