Rdpmc topdown - #238
Closed
willowec wants to merge 22 commits into
Closed
Conversation
… with papi results As using the rdpmc instruction directly has consistently reported reasonable results, it is used as the ground truth for this test
…on so that papi doesnt pollute rdpmc
…_validation While investigating the topdown rdpmc issues, it made sense to have more than one type of code to test. This was later removed once the issue was identified and resolved.
The tolerance for percentage comparisons was also raised to +-2.5, as there is often a decent amount of error when rdpmc is disabled. 2.5 percentage points is wide enough to account for that noise while still being tight enough to ensure the values are reasonable.
Added three missing topdown events to libpfm4 in order to enable level 2 event collection with rdpmc disabled. The missing events were TOPDOWN.FRONTEND_BOUND_SLOTS, TOPDOWN.HEAVY_OPS_SLOTS, and TOPDOWN.FETCH_LAT_SLOTS. This commit has also been submitted to libpfm4 as a patch.
… of topdown L2 events
…papi_events.csv Because this fix for topdown events was developed on an intel raptorlake machine, preset events needed to be added in order to run the validation tests with make fulltest
…OPDOWN events and ensures reset when rdpmc is enabled, if topdown events are allowed to accumulate they produce innacurate results. Therefore, a new field needs to be added for topdown events that ensures their reset flag is not disabled. The field is named 'metric' instead of 'topdown' so that in case events are developed in the future with similar behavior to topdown events, the name will still make sense.
7 tasks
willowec
marked this pull request as draft
September 26, 2024 16:03
Contributor
Author
|
Converting to a draft as not all of the tests are passing for raptorlake |
willowec
marked this pull request as ready for review
September 30, 2024 18:15
Contributor
Author
|
Un-drafting as the failing tests are in the sysdetect component and are due to the heterogeneity of the Raptorlake architecture, unrelated to the contributions of this patch. |
ilumsden
added a commit
to TauferLab/spack
that referenced
this pull request
Oct 15, 2024
ilumsden
added a commit
to TauferLab/spack
that referenced
this pull request
Oct 15, 2024
ilumsden
added a commit
to TauferLab/spack
that referenced
this pull request
Oct 16, 2024
ilumsden
added a commit
to TauferLab/spack
that referenced
this pull request
Oct 16, 2024
ilumsden
added a commit
to TauferLab/spack
that referenced
this pull request
Oct 16, 2024
tldahlgren
pushed a commit
to spack/spack
that referenced
this pull request
Oct 17, 2024
arezaii
pushed a commit
to arezaii/spack
that referenced
this pull request
Oct 22, 2024
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR fixes #207
Intel's topdown events, if opened using perf_event's
perf_event_open()behave differently when read usingread()than when they are read usingrdpmc(). This has a few unfortunate consequences. When a topdown event is read usingread()you get a value that is the number of slots recorded for that topdown category. So to get, for example, the percentage of slots that were retiring, you divide the value ofTOPDOWN:RETIRING_SLOTSby the value ofTOPDOWN:SLOTSand multiply the result by 100.However, when any topdown event is read using
rdpmc(), the result is always one value containing eight 8-bit percentages, no matter which event was read:In order to extract a percentage from this, you would instead do some shifting and masking as described in tools/perf/Documentation/topdown.txt
This means that storing and accumulating the values of topdown events makes sense only when
rdpmcis disabled in PAPI. In order to account for this, an additionalmetricfield was added toperf_eventcomponent'spe_event_info_tstruct, and is set during initialization for events matching theTOPDOWNbase event. Events with this field set no longer have their reset flag cleared whenrdpmcis enabled.A new validation test,
topdown_validation.cis added to verify that the results PAPI obtains agree with a direct call tordpmc()Because this patch was developed on an Intel Raptorlake machine, some other additions were also necessary to enable the development of this PR:
Author Checklist
Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
Commits are self contained and only do one thing
Commits have a header of the form:
module: short descriptionCommits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
The PR needs to pass all the tests