Conversation
|
Thank you for taking the time to contribute to FreeBSD! There is an issue that needs to be resolved:
Note Please review CONTRIBUTING.md, then update and push your branch again. |
|
I tested that I didn't break the i386 and aarch64 builds. On AMD64 I tested the existing AMD counters and the new IBS events using pmcstat. I've made this patch a draft until I get an external consumer of the API to give me their approval, but otherwise it's ready for review. In addition, I plan to use the multipart payload to implement LBR/BRS. In the meantime, I'll cleanup and push my other diffs including documentation. |
0680bd1 to
09a38f2
Compare
|
Hi. I am unlikely to be able to review this in detail until next week. I am not familiar with the AMD IBS feature. From a brief overview, it appears that it might be a better fit for the Maybe or maybe it is not appropriate. |
|
Yes I originally thought similarly, but the problem with IBS is that it needs to be used with specific counters to provide a complete picture. IBS is also not the only exception, BRS and LBR both make more sense using this approach as they will trigger off counters. For these reasons it was an early requirement from our downstream consumer of the hwpmc module. |
| */ | ||
| #define PMC_MDEP_CLASS_INDEX_TSC 1 | ||
| #define PMC_MDEP_CLASS_INDEX_K8 2 | ||
| #define PMC_MDEP_CLASS_INDEX_IBS 3 |
There was a problem hiding this comment.
Needs to not collide with other AMD counters, the Intel counters are separate.
|
Just a couple of questions, but overall I think it looks good. Note: I've not verified the details match the docs on this, however. |
This patch adds support for AMD IBS. It adds a new class of performance counter that cotains two events: ibs-fetch and ibs-op events. Unlike most existing sampled events, IBS events provide a number of values containing extra information regarding the sample. To support this we use the existing callchain event, and introduce a new flag for multipart payloads. The first 8 bytes of the pc_sample contains a header that defines up to four payloads. Sponsored by: Netflix
09a38f2 to
708d4c4
Compare
|
Diff is ready. Took a little longer than expected to fix the stop logic once I hit this spurious NMI on one machine. Now the PMC stop consumes several steps to clear the counter, clear the enable bit, then retry in a loop to clear the entire control register for 50us. |
708d4c4 to
2fcef1f
Compare
|
Seems like someone broke kernel-toolchain so none of the builds are passing, nothing to do with hwpmc |
2fcef1f to
b9da553
Compare
|
So most of the failed builds are because monthly compute limit has been exceeded. |
This patch adds initial support for AMD IBS. It adds a new class of performance counter that cotains two events: ibs-fetch and ibs-op events. Unlike most existing sampled events, IBS events provide a number of values containing extra information regarding the sample. To support this we use the existing callchain event, and introduce a new flag for multipart payloads. The first 8 bytes of the pc_sample contains a header that defines up to four payloads.
Sponsored by: Netflix