Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

the topdown metric is not accurate #578

shaileneF started this conversation in General
Discussion options

Hello, there is a situation that the topdown metric is not accurate.
I found that you are reading top-down events in the following way

 cFrontendBoundSlots = extract_bits(perfMetrics, 16, 23);
 cBadSpeculationSlots = extract_bits(perfMetrics, 8, 15);
 cBackendBoundSlots = extract_bits(perfMetrics, 24, 31);
 cRetiringSlots = extract_bits(perfMetrics, 0, 7);
 const double total = double(cFrontendBoundSlots + cBadSpeculationSlots + cBackendBoundSlots + cRetiringSlots);
 if (total != 0)
 {
 cFrontendBoundSlots = m->FrontendBoundSlots[core_id] += uint64((double(cFrontendBoundSlots) / total) * double(slots));
 cBadSpeculationSlots = m->BadSpeculationSlots[core_id] += uint64((double(cBadSpeculationSlots) / total) * double(slots));
 cBackendBoundSlots = m->BackendBoundSlots[core_id] += uint64((double(cBackendBoundSlots) / total) * double(slots));
 cRetiringSlots = m->RetiringSlots[core_id] += uint64((double(cRetiringSlots) / total) * double(slots));
 }
So you didn't handle the overflow of top-down events?
I found that the metric backend_bound is very high and the metric frontend_bound is very low. Does is related to the overflow? why didn't you handle the overflow, maybe it doesn't need to handle this? 
Could you tell me some way to collect topdown metrics by configure and read the register?
Thank you and I am looking forward to your response!
You must be logged in to vote

Replies: 1 comment

Comment options

here you can find more detail about this method: https://dyninst.github.io/scalable_tools_workshop/petascale2018/assets/slides/TMA%20addressing%20challenges%20in%20Icelake%20-%20Ahmad%20Yasin.pdf

check out the slide 16 (PERF_METRIC register). The counter can't overflow because it always reports a ratio in HW.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #576 on September 13, 2023 09:06.

AltStyle によって変換されたページ (->オリジナル) /