heh, I didn't expect to see poop on the front page of hacker news.
If you're curious about the poop-making process, I created it and released it all on one 6 hour twitch stream [1].
If you're curious about the poop-making process, I created it and released it all on one 6 hour twitch stream [1].
Watched a few mins and bookmarked it for another day. There were many other name suggestions that are good but I'm glad you kept the initial name.
struct perf_event_attr attr = {
.type = PERF_TYPE_HARDWARE,
.size = sizeof(struct perf_event_attr),
.config = PERF_COUNT_HW_INSTRUCTIONS,
.disabled = 1, /* only need to read once, not updating values, but fails with 0 also */
.exclude_kernel = 1,
.exclude_hv = 1
};
int fd = perf_event_open(&attr, 0, -1, -1, 0); /* fails, returns -1 */
Microsoft's kernel appears to have the right CONFIG_* as well, so I feel like it must be supported in some capacity, even if limited.