dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.74k forks source link

[MulticoreJIT] Single file deployment does not support ProfileOptimization #108270

Open FixBo opened 1 month ago

FixBo commented 1 month ago

Create app with profile enable

ProfileOptimization.SetProfileRoot(AppDomain.CurrentDomain.BaseDirectory); ProfileOptimization.StartProfile("profile");

Publish as selfcontained single file

dotnet publish --sc -p:PublishSingleFile=true

Run application

The "profile" is created with a size of only 64 bytes

According to my research, it's because of this check https://github.com/dotnet/runtime/blob/19da949dbc1e462e8404799b9218754cf571c8d0/src/coreclr/vm/multicorejitplayer.cpp#L452

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov See info in area-owners.md if you want to be subscribed.