Supporting Riscv Performance Counters Through Performance Analysis