Skip to content

Conversation

@kg
Copy link
Member

@kg kg commented Jul 14, 2023

Importing the dotnet runtime's function table into a trace appears to cause v8 to allocate 1-3mb of memory each time. Right now we no longer use call_indirect in jitted code, so it's safe to stop importing it, which seems to remove the allocation and reduce our memory usage significantly.

cc @vargaz @radical

…because it causes v8 to allocate lots of memory
@ghost
Copy link

ghost commented Jul 14, 2023

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

Issue Details

Importing the dotnet runtime's function table into a trace appears to cause v8 to allocate 1-3mb of memory each time. Right now we no longer use call_indirect in jitted code, so it's safe to stop importing it, which seems to remove the allocation and reduce our memory usage significantly.

cc @vargaz @radical

Author: kg
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@radical
Copy link
Member

radical commented Jul 14, 2023

If you want to try STJ/AOT with this change, then uncomment:

<!-- Disabled due to crash - https://github.com/dotnet/runtime/issues/86164 -->
<!--<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />-->
</ItemGroup>

.. and comment ..

<!-- Normally run with HighAOT, but disabling there, and for AOT - https://github.com/dotnet/runtime/issues/86164 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />

then /azp run runtime-wasm

@kg
Copy link
Member Author

kg commented Jul 14, 2023

If you want to try STJ/AOT with this change, then uncomment:

<!-- Disabled due to crash - https://github.com/dotnet/runtime/issues/86164 -->
<!--<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />-->
</ItemGroup>

.. and comment ..

<!-- Normally run with HighAOT, but disabling there, and for AOT - https://github.com/dotnet/runtime/issues/86164 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />

then /azp run runtime-wasm

Would you like me to combine that into this PR?

@radical
Copy link
Member

radical commented Jul 14, 2023

Would you like me to combine that into this PR?

whatever works for you. We can merge this even without enabling STJ.

@kg kg merged commit 34d95e1 into dotnet:main Jul 14, 2023
@kg kg mentioned this pull request Jul 14, 2023
radical pushed a commit that referenced this pull request Jul 14, 2023
Should be fine to do this since #88876 was merged.
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants