使用硬件性能计数器是个好主意吗

发布于 2024-12-03 02:23:47 字数 189 浏览 0 评论 0原文

假设我想实现一个使用硬件性能计数器的软件,例如用于计算退役商店的计数器。请注意,没有性能计数器的替代解决方案是可能的,但可能相对效率较低。然而,为了便携性和功效,我可以牺牲一点性能。另请注意,性能计数器将始终保持开启状态。

硬件性能计数器在功耗方面的表现如何。其次,是否有流行的单核或多核平台或处理器没有性能计数器。如果是这样,请您说出他们的名字。

Say I want to implement a software that uses hardware performance counters such as those for counting retired stores. Note that alternative solutions without the performance counters are possible but might be relatively a little inefficient. However, I can sacrifice performance a bit for portability and power efficiency. Also, note that the performance counters will be kept on the whole time.

How good hardware performance counters are in consuming power. Secondly, Are there popular platforms or processors, single or multicore, which don't have performance counters. If so, could you kindly name them.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

删除→记忆 2024-12-10 02:23:47

PAPI 是一个常见的分析器程序,允许您编译到代码中并访问硬件计数器。根据我自己的经验,它对性能没有明显影响。

虽然我不确定,但我认为它不会增加功耗,因为硬件计数器始终在硬件中启用。这只是阅读它们的问题。

据我所知,我不知道有任何现代非嵌入式处理器没有性能计数器。我可能错了。有人愿意纠正我吗?

PAPI is a common profiler program that allows you to compile into the code and access the hardwrae counters. From my own experience, it doesn't have a noticable effect on performance.

Although I don't know for sure, I would assume that it will not increase power consumption because hardware counters are always enabled in the hardware. It's just a matter of reading them.

As far as I know, I'm not aware of any modern non-embedded processors that don't have performance counters. I may wrong. Someone care to correct me?

孤云独去闲 2024-12-10 02:23:47

自从我使用性能计数器以来已经有一段时间了,但也许 PAPI 可以帮助你做一些事情。

It's a some time ago since I used performance counter but maybe PAPI can help you with some stuff.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文