Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISC-V] Simplify stack probing on riscv64 #112697

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sirntar
Copy link
Member

@sirntar sirntar commented Feb 19, 2025

This PR removes genStackProbe and disables genAllocLclFrame. It also changes generating assembly code for stack probing.

About genAllocLclFrame and genStackProbe:
On the riscv64 both methods should be used to probe stack, but they weren't called anywhere.

Before:

       lui      regPageSize, eeGetPageSize()>>12
Loop:
       lw       r0, 0(SP)               // tickle the page - read from the page
       sub      RA, SP, regPageSize
       bltu     RA, regCnt, Done
       sub      SP, SP, regPageSize
       j        Loop
Done:
       mov      SP, regCnt

After:

       lui      regPageSize, eeGetPageSize()>>12
       addi     regTmp, SP, 0
Loop:
       lw       r0, 0(regTmp)           // tickle the page - read from the page
       sub      regTmp, regTmp, regPageSize
       bgeu     regTmp, regCnt, Loop
Done:
       addi     SP, regCnt, 0

These changes reduced a little some coreclr tests execution time (up to 2%).

Part of #84834, cc @dotnet/samsung

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 19, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 19, 2025
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@risc-vv
Copy link

risc-vv commented Feb 19, 2025

RISC-V Release-CLR-VF2: 9459 / 9535 (99.20%)
=======================
      passed: 9459
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9641
 TOTAL tests: 9641
   REAL time: 2h 8min 58s 256ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 7d6e19a5b0df8dd5a5fcb2ea9187f4221b0fdd92
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9459 / 9535 (99.20%)
=======================
      passed: 9459
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9641
 TOTAL tests: 9641
   REAL time: 2h 45min 16s 995ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 7d6e19a5b0df8dd5a5fcb2ea9187f4221b0fdd92
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 480261 / 506459 (94.83%)
=======================
      passed: 480261
      failed: 156
     skipped: 1479
      killed: 26042
------------------------
  TOTAL libs: 258
 TOTAL tests: 507938
   REAL time: 2h 48min 21s 220ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 7d6e19a5b0df8dd5a5fcb2ea9187f4221b0fdd92
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 633974 / 666854 (95.07%)
=======================
      passed: 633974
      failed: 318
     skipped: 1453
      killed: 32562
------------------------
  TOTAL libs: 258
 TOTAL tests: 668307
   REAL time: 2h 24min 1s 135ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 7d6e19a5b0df8dd5a5fcb2ea9187f4221b0fdd92
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@sirntar sirntar force-pushed the simplify-stack-probing branch from 7d6e19a to a127b3f Compare February 19, 2025 16:07
@risc-vv
Copy link

risc-vv commented Feb 19, 2025

a127b3f is being scheduled for building and testing

GIT: a127b3f79f1b1d024540c640ece4d64f87418dce
REPO: dotnet/runtime
BRANCH: main

@risc-vv
Copy link

risc-vv commented Feb 19, 2025

2d6aee5 is being scheduled for building and testing

GIT: 2d6aee568b1ccf59b674856bf9cd77eba8b66f52
REPO: dotnet/runtime
BRANCH: main

@sirntar sirntar force-pushed the simplify-stack-probing branch from 2d6aee5 to 9ea1331 Compare February 19, 2025 16:36
@risc-vv
Copy link

risc-vv commented Feb 19, 2025

RISC-V Release-CLR-VF2: 9459 / 9535 (99.20%)
=======================
      passed: 9459
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9641
 TOTAL tests: 9641
   REAL time: 2h 2min 13s 460ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 9ea13314fb1894662f8850100aa29887e858d964
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9459 / 9535 (99.20%)
=======================
      passed: 9459
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9641
 TOTAL tests: 9641
   REAL time: 2h 45min 33s 976ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 9ea13314fb1894662f8850100aa29887e858d964
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 425097 / 453210 (93.80%)
=======================
      passed: 425097
      failed: 143
     skipped: 1477
      killed: 27970
------------------------
  TOTAL libs: 258
 TOTAL tests: 454687
   REAL time: 2h 45min 45s 316ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 9ea13314fb1894662f8850100aa29887e858d964
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@lewing
Copy link
Member

lewing commented Feb 19, 2025

/azp run runtime

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@clamp03 clamp03 added the arch-riscv Related to the RISC-V architecture label Feb 20, 2025
@risc-vv
Copy link

risc-vv commented Feb 20, 2025

9275f78 is being scheduled for building and testing

GIT: 9275f78b079c135a2a4004cb8394c66d78fdeb93
REPO: dotnet/runtime
BRANCH: main

@sirntar sirntar force-pushed the simplify-stack-probing branch from 9275f78 to dc68d32 Compare February 20, 2025 10:39
@risc-vv
Copy link

risc-vv commented Feb 20, 2025

RISC-V Release-CLR-VF2: 9460 / 9536 (99.20%)
=======================
      passed: 9460
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9642
 TOTAL tests: 9642
   REAL time: 2h 7min 13s 269ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: dc68d326ab608d646c2bb55c1efa0128ed4579ac
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9460 / 9536 (99.20%)
=======================
      passed: 9460
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9642
 TOTAL tests: 9642
   REAL time: 2h 45min 49s 704ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: dc68d326ab608d646c2bb55c1efa0128ed4579ac
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 630834 / 667704 (94.48%)
=======================
      passed: 630834
      failed: 144
     skipped: 1477
      killed: 36726
------------------------
  TOTAL libs: 258
 TOTAL tests: 669181
   REAL time: 2h 46min 42s 530ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: dc68d326ab608d646c2bb55c1efa0128ed4579ac
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 656785 / 684420 (95.96%)
=======================
      passed: 656785
      failed: 338
     skipped: 1452
      killed: 27297
------------------------
  TOTAL libs: 258
 TOTAL tests: 685872
   REAL time: 2h 26min 49s 538ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: dc68d326ab608d646c2bb55c1efa0128ed4579ac
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@clamp03 clamp03 requested a review from jakobbotsch February 21, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-riscv Related to the RISC-V architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants