Skip to content

perf(riscv64): static inline PMP/PMA CSR accessors#1089

Open
xiaokamikami wants to merge 1 commit into
masterfrom
perf/inline-pmp-pma-accessors
Open

perf(riscv64): static inline PMP/PMA CSR accessors#1089
xiaokamikami wants to merge 1 commit into
masterfrom
perf/inline-pmp-pma-accessors

Conversation

@xiaokamikami

@xiaokamikami xiaokamikami commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Inline the PMP/PMA CSR accessor helpers by moving their existing implementations into csr.h as static inline functions.

Motivation

These helpers are used by the MMU permission-check hot path. Marking only the definitions in priv.c as inline does not help callers in other translation units such as mmu.c, because the compiler cannot see the function bodies there. Keeping the implementations in the header allows those calls to be inlined without changing PMP/PMA semantics.

Notes

The helper logic is unchanged. This only changes linkage/placement so the compiler can inline the existing code.

@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions) Change vs Baseline (Throughput)
bitmanip.bin 1.385e+05 5.199e+07 2.664e+07 3.229e+07 5.199e+07 3.102e+07 -0.00% +4.08%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.752e+08 1.914e+08 1.790e+08 1.752e+08 1.841e+08 -0.00% -2.77%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.747e+08 1.943e+08 1.800e+08 1.747e+08 1.864e+08 +0.00% -3.45%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.718e+08 1.766e+08 1.677e+08 1.718e+08 1.684e+08 +0.00% -0.38%
amtest-riscv64-xs.bin 1.587e+04 8.706e+06 1.823e+07 1.284e+07 8.706e+06 1.516e+07 +0.00% -15.29%
aliastest-riscv64-xs.bin 1.376e+03 7.711e+06 1.785e+06 3.051e+06 7.708e+06 3.163e+06 -0.03% -3.55%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.757e+06 3.407e+06 5.427e+06 7.756e+06 5.405e+06 -0.00% +0.41%
zacas-riscv64-xs.bin 6.470e+04 1.222e+07 5.293e+07 1.826e+07 1.222e+07 1.612e+07 +0.00% +13.23%
linux-hello 6.677e+07 1.676e+10 3.984e+07 4.808e+07 1.676e+10 4.791e+07 +0.00% +0.35%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions) Change vs Baseline (Throughput)
bitmanip.bin 1.385e+05 6.267e+08 2.210e+06 2.473e+06 1.094e+09 6.973e+05 +42.73% +254.70%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 4.957e+09 6.766e+06 5.477e+06 6.387e+09 3.752e+06 +22.38% +45.97%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 4.994e+09 6.797e+06 5.520e+06 6.415e+09 3.391e+06 +22.15% +62.78%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 4.615e+09 6.576e+06 6.496e+06 6.036e+09 3.179e+06 +23.54% +104.35%
amtest-riscv64-xs.bin 1.588e+04 2.602e+07 6.101e+06 2.783e+06 3.435e+07 1.764e+06 +24.25% +57.74%
aliastest-riscv64-xs.bin 1.379e+03 3.536e+06 3.900e+06 9.630e+05 4.850e+06 7.930e+05 +27.10% +21.44%
softprefetchtest-riscv64-xs.bin 2.646e+03 5.272e+06 5.019e+06 1.696e+06 6.938e+06 1.341e+06 +24.01% +26.47%
zacas-riscv64-xs.bin 6.471e+04 9.922e+07 6.522e+06 2.856e+06 1.288e+08 2.137e+06 +22.96% +33.66%
linux-hello 7.522e+07 4.240e+11 1.774e+06 2.246e+06 6.673e+11 1.045e+06 +36.47% +114.95%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.
  • Change vs Baseline (Throughput) is computed from native throughput; positive means faster than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch from b646c8b to 1041569 Compare June 29, 2026 02:17
@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions) Change vs Baseline (Throughput)
bitmanip.bin 1.385e+05 5.199e+07 2.664e+07 2.970e+07 5.199e+07 3.217e+07 -0.00% -7.68%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.783e+08 1.881e+08 1.766e+08 1.783e+08 1.747e+08 +0.00% +1.08%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.777e+08 1.910e+08 1.853e+08 1.777e+08 1.798e+08 -0.00% +3.06%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.749e+08 1.735e+08 1.656e+08 1.749e+08 1.701e+08 +0.00% -2.65%
amtest-riscv64-xs.bin 1.587e+04 8.738e+06 1.816e+07 1.933e+07 8.738e+06 1.457e+07 +0.00% +32.64%
aliastest-riscv64-xs.bin 1.376e+03 7.715e+06 1.784e+06 5.957e+06 7.715e+06 6.198e+06 -0.00% -3.90%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.766e+06 3.403e+06 5.966e+06 7.765e+06 5.073e+06 -0.00% +17.61%
zacas-riscv64-xs.bin 6.470e+04 1.233e+07 5.246e+07 2.000e+07 1.233e+07 1.867e+07 +0.00% +7.11%
linux-hello 6.677e+07 1.682e+10 3.971e+07 4.843e+07 1.682e+10 4.763e+07 -0.00% +1.67%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions) Change vs Baseline (Throughput)
bitmanip.bin 1.385e+05 6.267e+08 2.210e+06 2.401e+06 1.094e+09 6.923e+05 +42.73% +246.77%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 4.957e+09 6.766e+06 5.479e+06 6.387e+09 3.209e+06 +22.38% +70.75%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 4.994e+09 6.797e+06 5.987e+06 6.415e+09 3.271e+06 +22.15% +83.06%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 4.615e+09 6.576e+06 5.442e+06 6.036e+09 3.099e+06 +23.54% +75.64%
amtest-riscv64-xs.bin 1.588e+04 2.602e+07 6.101e+06 2.724e+06 3.435e+07 1.971e+06 +24.25% +38.22%
aliastest-riscv64-xs.bin 1.379e+03 3.536e+06 3.900e+06 9.471e+05 4.851e+06 7.556e+05 +27.11% +25.34%
softprefetchtest-riscv64-xs.bin 2.646e+03 5.273e+06 5.018e+06 1.629e+06 6.938e+06 1.229e+06 +24.01% +32.57%
zacas-riscv64-xs.bin 6.471e+04 9.922e+07 6.522e+06 2.864e+06 1.288e+08 2.052e+06 +22.96% +39.58%
linux-hello 7.522e+07 4.240e+11 1.774e+06 2.325e+06 6.673e+11 9.604e+05 +36.47% +142.11%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.
  • Change vs Baseline (Throughput) is computed from native throughput; positive means faster than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch from 1041569 to 6b69dcf Compare July 7, 2026 09:49
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.199e+07 2.664e+07 1.567e+07 5.199e+07 2.872e+07 +0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.783e+08 1.881e+08 1.067e+08 1.783e+08 1.670e+08 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.777e+08 1.910e+08 1.624e+08 1.777e+08 1.696e+08 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.749e+08 1.735e+08 1.501e+08 1.749e+08 9.929e+07 -0.00%
amtest-riscv64-xs.bin 1.587e+04 8.738e+06 1.816e+07 1.535e+07 8.740e+06 1.625e+07 +0.03%
aliastest-riscv64-xs.bin 1.376e+03 7.715e+06 1.784e+06 3.324e+06 7.717e+06 5.004e+06 +0.03%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.767e+06 3.403e+06 5.860e+06 7.765e+06 7.342e+06 -0.03%
zacas-riscv64-xs.bin 6.470e+04 1.233e+07 5.246e+07 1.930e+07 1.234e+07 1.055e+07 +0.02%
rvv-workload-suite 4.566e+04 1.081e+08 4.224e+06 4.412e+06 1.081e+08 4.109e+06 -0.00%
linux-hello 6.677e+07 1.682e+10 3.971e+07 4.400e+07 1.682e+10 4.416e+07 -0.00%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 6.267e+08 2.210e+06 2.553e+06 1.094e+09 1.009e+06 +42.73%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 4.957e+09 6.766e+06 6.200e+06 6.387e+09 4.493e+06 +22.38%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 4.994e+09 6.797e+06 6.405e+06 6.415e+09 4.431e+06 +22.15%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 4.615e+09 6.576e+06 6.358e+06 6.036e+09 4.460e+06 +23.54%
amtest-riscv64-xs.bin 1.588e+04 2.602e+07 6.101e+06 2.645e+06 3.435e+07 1.916e+06 +24.25%
aliastest-riscv64-xs.bin 1.379e+03 3.535e+06 3.901e+06 1.070e+06 4.851e+06 7.648e+05 +27.13%
softprefetchtest-riscv64-xs.bin 2.646e+03 5.272e+06 5.019e+06 1.666e+06 6.939e+06 1.169e+06 +24.02%
zacas-riscv64-xs.bin 6.471e+04 9.922e+07 6.522e+06 2.549e+06 1.288e+08 1.976e+06 +22.96%
rvv-workload-suite 4.568e+04 2.811e+08 1.625e+06 9.345e+05 4.298e+08 5.983e+05 +34.60%
linux-hello 7.522e+07 4.240e+11 1.774e+06 2.275e+06 6.673e+11 1.154e+06 +36.47%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch from 1a617c6 to e7070e6 Compare July 9, 2026 02:30
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.747e+07 2.410e+07 1.453e+07 5.747e+07 2.505e+07 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.946e+08 1.723e+08 1.231e+08 1.946e+08 1.063e+08 +0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.940e+08 1.750e+08 1.488e+08 1.940e+08 1.666e+08 +0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.911e+08 1.588e+08 1.364e+08 1.911e+08 1.501e+08 +0.00%
amtest-riscv64-xs.bin 1.587e+04 8.832e+06 1.797e+07 1.462e+07 8.829e+06 2.116e+07 -0.03%
aliastest-riscv64-xs.bin 1.376e+03 7.730e+06 1.780e+06 5.733e+06 7.730e+06 2.785e+06 +0.00%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.783e+06 3.396e+06 5.576e+06 7.783e+06 5.361e+06 -0.00%
zacas-riscv64-xs.bin 6.470e+04 1.266e+07 5.110e+07 1.764e+07 1.266e+07 1.501e+07 -0.00%
rvv-workload-suite 4.566e+04 1.112e+08 4.106e+06 4.774e+06 1.112e+08 4.273e+06 +0.00%
linux-hello 6.677e+07 1.690e+10 3.951e+07 4.532e+07 1.690e+10 4.625e+07 -0.01%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 1.097e+09 1.262e+06 1.118e+06 1.097e+09 1.125e+06 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 6.447e+09 5.203e+06 4.555e+06 6.447e+09 4.394e+06 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 6.475e+09 5.242e+06 4.635e+06 6.475e+09 4.482e+06 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 6.090e+09 4.983e+06 4.394e+06 6.090e+09 4.379e+06 +0.00%
amtest-riscv64-xs.bin 1.588e+04 3.464e+07 4.583e+06 1.891e+06 3.464e+07 1.094e+06 -0.00%
aliastest-riscv64-xs.bin 1.379e+03 4.877e+06 2.828e+06 7.327e+05 4.877e+06 6.968e+05 +0.00%
softprefetchtest-riscv64-xs.bin 2.646e+03 6.987e+06 3.787e+06 1.222e+06 6.987e+06 1.095e+06 -0.00%
zacas-riscv64-xs.bin 6.471e+04 1.300e+08 4.979e+06 1.967e+06 1.300e+08 2.125e+06 +0.00%
rvv-workload-suite 4.568e+04 4.311e+08 1.060e+06 6.142e+05 4.311e+08 6.475e+05 +0.00%
linux-hello 7.522e+07 6.683e+11 1.125e+06 1.123e+06 6.683e+11 1.126e+06 +0.00%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch 2 times, most recently from f4cd96a to 64ba06a Compare July 10, 2026 03:14
@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.747e+07 2.410e+07 2.337e+07 5.747e+07 1.431e+07 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.946e+08 1.723e+08 1.376e+08 1.946e+08 1.635e+08 +0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.940e+08 1.750e+08 1.616e+08 1.940e+08 1.129e+08 +0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.911e+08 1.588e+08 1.533e+08 1.911e+08 1.511e+08 +0.00%
amtest-riscv64-xs.bin 1.587e+04 8.829e+06 1.798e+07 1.969e+07 8.830e+06 1.646e+07 +0.00%
aliastest-riscv64-xs.bin 1.376e+03 7.730e+06 1.780e+06 3.031e+06 7.730e+06 3.078e+06 -0.00%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.783e+06 3.396e+06 4.518e+06 7.784e+06 4.333e+06 +0.00%
zacas-riscv64-xs.bin 6.470e+04 1.266e+07 5.109e+07 1.668e+07 1.266e+07 1.307e+07 -0.02%
rvv-workload-suite 4.566e+04 1.112e+08 4.106e+06 5.844e+06 1.112e+08 5.435e+06 -0.01%
linux-hello 6.677e+07 1.690e+10 3.951e+07 4.714e+07 1.690e+10 4.704e+07 +0.01%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 1.097e+09 1.262e+06 1.061e+06 1.097e+09 9.958e+05 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 6.447e+09 5.203e+06 4.352e+06 6.447e+09 4.599e+06 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 6.475e+09 5.242e+06 4.365e+06 6.475e+09 4.431e+06 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 6.090e+09 4.983e+06 4.413e+06 6.090e+09 4.298e+06 -0.00%
amtest-riscv64-xs.bin 1.588e+04 3.464e+07 4.583e+06 1.328e+06 3.464e+07 1.652e+06 +0.00%
aliastest-riscv64-xs.bin 1.379e+03 4.877e+06 2.828e+06 5.959e+05 4.877e+06 7.474e+05 +0.00%
softprefetchtest-riscv64-xs.bin 2.646e+03 6.987e+06 3.787e+06 1.147e+06 6.987e+06 1.118e+06 +0.00%
zacas-riscv64-xs.bin 6.471e+04 1.300e+08 4.979e+06 1.943e+06 1.300e+08 1.876e+06 -0.00%
rvv-workload-suite 4.568e+04 4.311e+08 1.060e+06 6.108e+05 4.311e+08 5.815e+05 +0.00%
linux-hello 7.522e+07 6.683e+11 1.125e+06 1.125e+06 6.683e+11 1.120e+06 +0.00%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.747e+07 2.410e+07 2.134e+07 5.747e+07 2.382e+07 +0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.946e+08 1.723e+08 1.205e+08 1.946e+08 1.630e+08 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.940e+08 1.750e+08 1.631e+08 1.940e+08 1.680e+08 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.911e+08 1.588e+08 1.502e+08 1.911e+08 1.551e+08 +0.00%
amtest-riscv64-xs.bin 1.587e+04 8.832e+06 1.797e+07 1.545e+07 8.829e+06 1.578e+07 -0.03%
aliastest-riscv64-xs.bin 1.376e+03 7.730e+06 1.780e+06 2.516e+06 7.730e+06 2.785e+06 -0.00%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.783e+06 3.396e+06 6.132e+06 7.784e+06 1.017e+07 +0.00%
zacas-riscv64-xs.bin 6.470e+04 1.266e+07 5.110e+07 2.052e+07 1.266e+07 1.770e+07 +0.00%
rvv-workload-suite 4.566e+04 1.112e+08 4.107e+06 5.277e+06 1.112e+08 4.508e+06 +0.00%
linux-hello 6.677e+07 1.690e+10 3.951e+07 4.688e+07 1.690e+10 4.744e+07 +0.00%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 1.097e+09 1.262e+06 1.127e+06 1.097e+09 1.043e+06 +0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 6.447e+09 5.203e+06 4.383e+06 6.447e+09 4.501e+06 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 6.475e+09 5.242e+06 4.619e+06 6.475e+09 4.617e+06 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 6.090e+09 4.983e+06 4.208e+06 6.090e+09 4.310e+06 -0.00%
amtest-riscv64-xs.bin 1.588e+04 3.464e+07 4.583e+06 1.645e+06 3.464e+07 1.919e+06 -0.00%
aliastest-riscv64-xs.bin 1.379e+03 4.876e+06 2.828e+06 8.165e+05 4.877e+06 7.086e+05 +0.00%
softprefetchtest-riscv64-xs.bin 2.646e+03 6.987e+06 3.787e+06 1.279e+06 6.987e+06 1.334e+06 +0.00%
zacas-riscv64-xs.bin 6.471e+04 1.300e+08 4.979e+06 1.974e+06 1.300e+08 1.950e+06 -0.00%
rvv-workload-suite 4.568e+04 4.311e+08 1.060e+06 6.707e+05 4.311e+08 6.500e+05 +0.00%
linux-hello 7.522e+07 6.683e+11 1.125e+06 1.124e+06 6.683e+11 1.122e+06 +0.00%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch from 64ba06a to ba75951 Compare July 10, 2026 06:29
@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.747e+07 2.410e+07 2.473e+07 5.747e+07 3.183e+07 +0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.946e+08 1.723e+08 1.076e+08 1.946e+08 1.579e+08 +0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.940e+08 1.750e+08 1.485e+08 1.940e+08 1.160e+08 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.911e+08 1.588e+08 1.121e+08 1.911e+08 1.536e+08 +0.00%
amtest-riscv64-xs.bin 1.587e+04 8.832e+06 1.797e+07 1.602e+07 8.829e+06 1.515e+07 -0.03%
aliastest-riscv64-xs.bin 1.376e+03 7.732e+06 1.780e+06 2.985e+06 7.730e+06 2.466e+06 -0.03%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.786e+06 3.395e+06 5.142e+06 7.784e+06 1.045e+07 -0.03%
zacas-riscv64-xs.bin 6.470e+04 1.266e+07 5.110e+07 1.788e+07 1.266e+07 1.778e+07 +0.00%
rvv-workload-suite 4.566e+04 1.112e+08 4.106e+06 4.364e+06 1.112e+08 4.454e+06 -0.00%
linux-hello 6.677e+07 1.690e+10 3.951e+07 4.881e+07 1.690e+10 4.900e+07 -0.00%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 1.097e+09 1.262e+06 7.057e+05 1.097e+09 7.592e+05 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 6.447e+09 5.203e+06 3.459e+06 6.447e+09 3.256e+06 -0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 6.475e+09 5.242e+06 3.256e+06 6.475e+09 3.245e+06 -0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 6.090e+09 4.983e+06 3.452e+06 6.090e+09 3.338e+06 -0.00%
amtest-riscv64-xs.bin 1.588e+04 3.464e+07 4.583e+06 1.796e+06 3.464e+07 2.024e+06 -0.00%
aliastest-riscv64-xs.bin 1.379e+03 4.877e+06 2.828e+06 6.847e+05 4.877e+06 7.308e+05 +0.00%
softprefetchtest-riscv64-xs.bin 2.646e+03 6.987e+06 3.787e+06 1.070e+06 6.987e+06 1.185e+06 +0.00%
zacas-riscv64-xs.bin 6.471e+04 1.300e+08 4.979e+06 2.208e+06 1.300e+08 2.075e+06 -0.00%
rvv-workload-suite 4.568e+04 4.311e+08 1.060e+06 5.472e+05 4.311e+08 5.210e+05 +0.00%
linux-hello 7.522e+07 6.683e+11 1.125e+06 9.807e+05 6.683e+11 1.080e+06 +0.00%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@xiaokamikami xiaokamikami force-pushed the perf/inline-pmp-pma-accessors branch from ba75951 to de72881 Compare July 10, 2026 07:00
@github-actions

Copy link
Copy Markdown

NEMU Performance Results - XS Interpreter

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 5.748e+07 2.410e+07 1.646e+07 5.747e+07 1.682e+07 -0.00%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 1.946e+08 1.723e+08 1.707e+08 1.946e+08 1.065e+08 +0.00%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 1.940e+08 1.750e+08 1.609e+08 1.940e+08 1.598e+08 +0.00%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 1.911e+08 1.588e+08 1.567e+08 1.911e+08 1.579e+08 -0.00%
amtest-riscv64-xs.bin 1.587e+04 8.832e+06 1.797e+07 1.435e+07 8.830e+06 1.421e+07 -0.02%
aliastest-riscv64-xs.bin 1.376e+03 7.730e+06 1.780e+06 3.065e+06 7.730e+06 2.855e+06 -0.00%
softprefetchtest-riscv64-xs.bin 2.643e+03 7.783e+06 3.396e+06 4.222e+06 7.783e+06 5.073e+06 +0.00%
zacas-riscv64-xs.bin 6.470e+04 1.266e+07 5.109e+07 1.528e+07 1.266e+07 1.577e+07 -0.02%
rvv-workload-suite 4.566e+04 1.112e+08 4.106e+06 5.231e+06 1.112e+08 4.425e+06 -0.01%
linux-hello 6.677e+07 1.690e+10 3.951e+07 4.877e+07 1.690e+10 4.823e+07 +0.00%

NEMU Performance Results - XS Ref Shared Object

Test Guest Instructions Host Instructions Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s) Baseline Host Instructions Baseline Actual NEMU Throughput (instr/s) Change vs Baseline (Instructions)
bitmanip.bin 1.385e+05 6.299e+08 2.199e+06 2.479e+06 1.097e+09 7.572e+05 +42.60%
coremark-riscv64-xs-rv64gc-o2.bin 3.354e+06 5.017e+09 6.686e+06 5.650e+06 6.447e+09 4.194e+06 +22.18%
coremark-riscv64-xs-rv64gc-o3.bin 3.394e+06 5.054e+09 6.716e+06 5.938e+06 6.475e+09 3.296e+06 +21.95%
coremark-riscv64-xs-rv64gcb-o3.bin 3.035e+06 4.668e+09 6.500e+06 5.988e+06 6.090e+09 3.435e+06 +23.34%
amtest-riscv64-xs.bin 1.588e+04 2.631e+07 6.035e+06 2.754e+06 3.464e+07 2.038e+06 +24.05%
aliastest-riscv64-xs.bin 1.379e+03 3.561e+06 3.872e+06 7.382e+05 4.877e+06 6.480e+05 +26.97%
softprefetchtest-riscv64-xs.bin 2.646e+03 5.321e+06 4.973e+06 1.453e+06 6.988e+06 9.467e+05 +23.85%
zacas-riscv64-xs.bin 6.471e+04 1.004e+08 6.446e+06 2.946e+06 1.300e+08 2.196e+06 +22.76%
rvv-workload-suite 4.568e+04 2.823e+08 1.618e+06 1.084e+06 4.311e+08 5.527e+05 +34.51%
linux-hello 7.522e+07 4.248e+11 1.771e+06 2.354e+06 6.683e+11 1.049e+06 +36.43%
  • Host Instructions is measured by DynamoRIO's inscount client.
  • Estimated Host Throughput assumes a fixed 4GHz CPU and IPC=2.5.
  • Actual NEMU Throughput is a single native NEMU run and may vary with host CPU performance.
  • Baseline columns are populated on pull_request runs when the PR base contains the same defconfig.
  • Change vs Baseline (Instructions) is computed from host instruction count; positive means fewer host instructions than baseline.

@klin02

klin02 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Note the performance benefits comes from static inline . @xiaokamikami Please help provide corresponding PR title and final commit message.

@xiaokamikami xiaokamikami changed the title perf(riscv64): inline PMP and PMA CSR accessors perf(riscv64): static inline PMP/PMA CSR accessors Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants