Since r289025 we have at least 5 bits class size. (Before it was even 16 bits)
But macro handling conversion between pmcid and set of CPU, MODE, CLASS, ROWINDEX still use 4 bits class size and 8 bits mode size. It's break some libpmc API methods, like pmc_capabilities.
Looking on that, we have only 4 modes and MODE field is a number proposing patch moves 4 bits of mode to extend CLASS field.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
This looks fine to me, thanks for fixing this.
It seems that pmc_id_t should be an opaque type for consumers of libpmc? I.e. the only userspace consumer of these bit macros should be libpmc itself.
If that is the case, then this change should be okay without a PMC_VERSION bump. There are no uses of PMC_ID_TO_MODE or PMC_ID_MAKE_ID in libpmc. However, I did not check if this was true for older releases.
sys/sys/pmc.h | ||
---|---|---|
407 | Comment needs updating? |
sys/sys/pmc.h | ||
---|---|---|
407 | Sure. I will update it. |