Skip to content

Commit 7028044

Browse files
committed
- rebased
- removed perftrace runtime flavor - removed MonoWasmBuildVariant==perftrace - made IsThreadingSupported respect build flavor via IsBrowserThreadingSupported and --use-threads - removed most of event-pipe wasm sample - removed DISABLE_WASM_USER_THREADS and MonoWasmThreadsNoUser - fixed mono_wasm_execute_timer for WS without Main - added COOP into SimpleServer - fixed problem with SharedArrayBuffer in WS
1 parent 5fe7b06 commit 7028044

File tree

38 files changed

+40
-468
lines changed

38 files changed

+40
-468
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,29 +137,9 @@ jobs:
137137
# NOTE - Since threading is experimental, we don't want to block mainline work
138138
shouldContinueOnError: true
139139
scenarios:
140-
- normal
141140
- WasmTestOnBrowser
142-
- WasmTestOnNodeJS
143-
144-
# Library tests with internal threads only
145-
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
146-
parameters:
147-
platforms:
148-
- browser_wasm
149-
#- browser_wasm_win
150-
nameSuffix: _Threading_PerfTracing
151-
extraBuildArgs: /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
152-
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
153-
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
154-
# Always run for runtime-wasm because tests are not run in runtime
155-
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
141+
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592
156142

157-
# NOTE - Since threading is experimental, we don't want to block mainline work
158-
shouldContinueOnError: true
159-
scenarios:
160-
- normal
161-
- WasmTestOnBrowser
162-
- WasmTestOnNodeJS
163143

164144
# EAT Library tests - only run on linux
165145
- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
@@ -264,7 +244,7 @@ jobs:
264244
platforms:
265245
- Browser_wasm
266246
- Browser_wasm_win
267-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
247+
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
268248
nameSuffix: DebuggerTests_MultiThreaded
269249
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
270250
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}

eng/pipelines/mono/templates/workloads-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ jobs:
5555
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg
5656
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.browser-wasm*.nupkg
5757
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg
58-
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm*.nupkg
5958
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg
6059
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg
6160
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg
6261
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg
63-
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm*.nupkg
6462
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg
6563
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg
6664
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm*.nupkg

eng/pipelines/runtime-official.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,6 @@ extends:
180180
extraStepsParameters:
181181
name: MonoRuntimePacks
182182

183-
- template: /eng/pipelines/common/platform-matrix.yml
184-
parameters:
185-
jobTemplate: /eng/pipelines/common/global-build-job.yml
186-
buildConfig: release
187-
runtimeFlavor: mono
188-
platforms:
189-
- browser_wasm
190-
jobParameters:
191-
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
192-
nameSuffix: AllSubsets_Mono_perftrace
193-
isOfficialBuild: ${{ variables.isOfficialBuild }}
194-
runtimeVariant: perftrace
195-
extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
196-
extraStepsParameters:
197-
name: MonoRuntimePacks
198-
199183
- template: /eng/pipelines/common/platform-matrix.yml
200184
parameters:
201185
jobTemplate: /eng/pipelines/common/global-build-job.yml

eng/pipelines/runtime.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,6 @@ extends:
505505
scenarios:
506506
- WasmTestOnBrowser
507507

508-
- template: /eng/pipelines/common/templates/wasm-build-only.yml
509-
parameters:
510-
platforms:
511-
- browser_wasm
512-
nameSuffix: _Threading_PerfTracing
513-
extraBuildArgs: /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
514-
alwaysRun: ${{ variables.isRollingBuild }}
515-
516508
# WASI/WASM
517509

518510
- template: /eng/pipelines/common/templates/wasm-library-tests.yml

eng/testing/tests.browser.targets

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@
9696
<_AppArgs Condition="'$(WasmTestAppArgs)' != ''">$(_AppArgs) $(WasmTestAppArgs)</_AppArgs>
9797

9898
<WasmXHarnessMonoArgs Condition="'$(XunitShowProgress)' == 'true'">$(WasmXHarnessMonoArgs) --setenv=XHARNESS_LOG_TEST_START=1</WasmXHarnessMonoArgs>
99+
<!-- snapshots are not yet supported with threads -->
100+
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --no-memory-snapshot</WasmXHarnessMonoArgs>
101+
<!-- help unit test with PlatformDetection.IsThreadingSupported via IsBrowserThreadingSupported env variable -->
102+
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --use-threads</WasmXHarnessMonoArgs>
99103
</PropertyGroup>
100104

101105
<PropertyGroup Condition="'$(RunScriptCommand)' == ''">
@@ -104,7 +108,7 @@
104108

105109
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
106110
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
107-
<_XHarnessArgs Condition="('$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true') and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
111+
<_XHarnessArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread' and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
108112
<_XHarnessArgs >$(_XHarnessArgs) -s dotnet.native.js.symbols</_XHarnessArgs>
109113
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbol-patterns wasm-symbol-patterns.txt</_XHarnessArgs>
110114
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbolicator WasmSymbolicator.dll,Microsoft.WebAssembly.Internal.SymbolicatorWrapperForXHarness</_XHarnessArgs>
@@ -288,7 +292,6 @@
288292
<Target Name="_GetRuntimePackNuGetsToBuild" Condition="'$(WasmSkipMissingRuntimePackBuild)' != 'true'" Returns="@(_NuGetsToBuild)">
289293
<PropertyGroup>
290294
<_DefaultBuildVariant Condition="'$(MonoWasmBuildVariant)' == 'multithread'">.multithread.</_DefaultBuildVariant>
291-
<_DefaultBuildVariant Condition="'$(MonoWasmBuildVariant)' == 'perftrace'">.perftrace.</_DefaultBuildVariant>
292295
<_DefaultBuildVariant Condition="'$(_DefaultBuildVariant)' == ''">.</_DefaultBuildVariant>
293296

294297
<_DefaultRuntimePackNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono$(_DefaultBuildVariant)$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg</_DefaultRuntimePackNuGetPath>
@@ -305,7 +308,6 @@
305308

306309
<ItemGroup>
307310
<_BuildVariants Include="multithread" Condition="'$(_DefaultBuildVariant)' != '.multithread.'" />
308-
<_BuildVariants Include="perftrace" Condition="'$(_DefaultBuildVariant)' != '.perftrace.'" />
309311

310312
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.%(_BuildVariants.Identity).$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg"
311313
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static bool IsPrivilegedProcess
116116
public static bool FileCreateCaseSensitive => IsCaseSensitiveOS;
117117
#endif
118118

119-
public static bool IsThreadingSupported => !IsBrowser && !IsWasi;
119+
public static bool IsThreadingSupported => !IsWasi && IsEnvironmentVariableTrue("IsBrowserThreadingSupported");
120120
public static bool IsBinaryFormatterSupported => IsNotMobile && !IsNativeAot;
121121

122122
public static bool IsStartingProcessesSupported => !IsiOS && !IstvOS;

src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
55
</PropertyGroup>
66

7-
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' == 'multithread' or
8-
'$(MonoWasmBuildVariant)' == 'perftrace'">
7+
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' == 'multithread'">
98
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
109
but this contract still does since we only expose the wasm threading through System.Diagnostics.Tracing.WebAssembly.PerfTracing
1110
so we need to baseline the ApiCompat errors related to that -->

src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
1111
<StrongNameKeyId>SilverlightPlatform</StrongNameKeyId>
1212
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
13-
<FeatureWasmPerfTracing Condition="'$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace'">true</FeatureWasmPerfTracing>
13+
<FeatureWasmPerfTracing Condition="'$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmPerfTracing>
1414
<FeatureWasmThreads Condition="'$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
1515
<DefineConstants Condition="'$(FeatureWasmPerfTracing)' == 'true'">$(DefineConstants);FEATURE_WASM_PERFTRACING</DefineConstants>
1616
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>

src/libraries/tests.proj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-threads-minimal\Wasm.Browser.Threads.Minimal.Sample.csproj" />
5555
</ItemGroup>
5656

57-
<!-- Samples that require a perf-tracing wasm runtime -->
58-
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(MonoWasmBuildVariant)' != 'perftrace'" >
59-
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-eventpipe\Wasm.Browser.EventPipe.Sample.csproj" />
60-
</ItemGroup>
61-
6257
<!-- wasm EAT/AOT -->
6358
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(RunDisabledWasmTests)' != 'true' and '$(EnableAggressiveTrimming)' == 'true'">
6459
</ItemGroup>
@@ -375,13 +370,6 @@
375370
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
376371
</ItemGroup>
377372

378-
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(MonoWasmBuildVariant)' == 'perftrace' and '$(RunDisabledWasmTests)' != 'true'">
379-
<!-- Issue: https://github.com/dotnet/runtime/issues/74411 -->
380-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
381-
<!-- Issue: https://github.com/dotnet/runtime/issues/74413 -->
382-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
383-
</ItemGroup>
384-
385373
<!-- Aggressive Trimming related failures -->
386374
<ItemGroup Condition="('$(TargetOS)' != 'browser' and '$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true') or ('$(TargetOS)' == 'browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true')">
387375
</ItemGroup>

src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121

122122
<FeatureMono>true</FeatureMono>
123123
<FeatureWasmThreads Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and '$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
124-
<FeatureWasmPerfTracing Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and ('$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace')">true</FeatureWasmPerfTracing>
124+
<FeatureWasmPerfTracing Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and ('$(MonoWasmBuildVariant)' == 'multithread')">true</FeatureWasmPerfTracing>
125125
<FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
126126
<FeatureManagedEtw>true</FeatureManagedEtw>
127127
<FeaturePortableTimer Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsWasi)' != 'true'">true</FeaturePortableTimer>

0 commit comments

Comments
 (0)