# Linux perf tool support

**URL:** <https://forums.sifive.com/t/linux-perf-tool-support/3926>\
**Category:** RISC-V\
**Created:** [July 28, 2020, 6:43am UTC](https://forums.sifive.com/t/linux-perf-tool-support/3926 "2020-07-28T06:43:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thearni](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@thearni](https://forums.sifive.com/u/thearni)\
**Post date:** [July 28, 2020, 6:43am UTC](https://forums.sifive.com/t/linux-perf-tool-support/3926/1 "2020-07-28T06:43:02Z")

</div>

Hello, I was wondering if any of you would know about the progress regarding the support for the perf tool in RiscV.

After installing the latest Linux kernel and the perf command line tool (that was on a HiFive Unleashed) I realized there wasn’t support for perf events. After investigating a bit, I found multiple pages mentioning the lack of performance counter overflow interrupts in the RiscV specification to be the main problem.

Is that indeed the problem? Do you know if there is some work to add that feature to the RiscV specification? Or maybe a workaround?

Thanks.

---

<div class="post-metadata">

**Author:** ![vmedea](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@vmedea](https://forums.sifive.com/u/vmedea)\
**Post date:** [July 29, 2020, 5:22pm UTC](https://forums.sifive.com/t/linux-perf-tool-support/3926/2 "2020-07-29T17:22:08Z")

</div>

There’s some recent discussion about improving hardware performance counters on the RISC-V mailing lists: [https://lists.riscv.org/g/tech-privileged/topic/a\_proposal\_to\_enhance\_risc\_v/75675990?p=Created,,,20,1,0,0::recentpostdate%2Fsticky,,,20,2,0,75675990#](https://lists.riscv.org/g/tech-privileged/topic/a_proposal_to_enhance_risc_v/75675990?p=Created,,,20,1,0,0::recentpostdate%2Fsticky,,,20,2,0,75675990#)

---

<div class="post-metadata">

**Author:** ![Rakeshhs](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@Rakeshhs](https://forums.sifive.com/u/Rakeshhs)\
**Post date:** [November 12, 2020, 4:57pm UTC](https://forums.sifive.com/t/linux-perf-tool-support/3926/3 "2020-11-12T16:57:48Z")

</div>

Worked on kernel 5.5.6 and enabled following kernel configurations

CONFIG\_CGROUP\_PERF  
CONFIG\_HAVE\_PERF\_EVENTS  
CONFIG\_PERF\_USE\_VMALLOC  
CONFIG\_PERF\_EVENTS  
CONFIG\_DEBUG\_PERF\_USE\_VMALLOC  
CONFIG\_TRACEPOINTS

Verified the perf events on Hi-Five unleashed Board.
