Fix perfstats failing to compile with NOHW=1
This patch will fix NOHW=1 compilation failure in next.
!1583 (closed) has an equivalent fix for master, but note that merging that will probably create a merge conflict when merging next and master.