Skip to content

Commit

Permalink
Merge pull request #770 from unoplatform/dev/jela/runtime-update10
Browse files Browse the repository at this point in the history
Runtime update
  • Loading branch information
jeromelaban authored Sep 8, 2023
2 parents 63afd8a + fb7fc42 commit feb2f32
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Uno.Wasm.Bootstrap/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Uno.Wasm.Bootstrap
internal class Constants
{
public const string DefaultDotnetRuntimeSdkUrl = "https://unowasmbootstrap.azureedge.net/runtime/"
+ "dotnet-runtime-wasm-linux-40dbdf8-2ec0bc7f0bb-6016800435-Release.zip";
+ "dotnet-runtime-wasm-linux-d3ee003-49b266d7eb2-6123022990-Release.zip";

/// <summary>
/// Min version of the emscripten SDK. Must be aligned with dotnet/runtime SDK build in <see cref="NetCoreWasmSDKUri"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// source https://github.com/mono/mono/commits/a44926a5be1c648deec836e9cdda3c93e25f9a51
namespace Mono.Profiler.Aot {
public abstract class ProfileBase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// source https://github.com/mono/mono/commits/a44926a5be1c648deec836e9cdda3c93e25f9a51
using System;

namespace Mono.Profiler.Aot
Expand All @@ -24,4 +25,4 @@ public ProfileData (ModuleRecord[] modules, TypeRecord[] types, MethodRecord[] m
public TypeRecord[] Types { get; set; }
public MethodRecord[] Methods { get; set; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// source https://github.com/mono/mono/commits/a44926a5be1c648deec836e9cdda3c93e25f9a51
using System;
using System.IO;
using System.Collections.Generic;
Expand Down Expand Up @@ -146,4 +147,4 @@ public ProfileData ReadAllData(Stream stream)
}
}

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// source https://github.com/mono/mono/commits/a44926a5be1c648deec836e9cdda3c93e25f9a51
using System;
using System.IO;
using System.Collections.Generic;
Expand Down Expand Up @@ -28,8 +29,8 @@ private void WriteInt32 (int intValue)

private void WriteString (string str)
{
WriteInt32 (str.Length);
var buf = Encoding.UTF8.GetBytes (str);
WriteInt32 (buf.Length);
s_stream!.Write (buf, 0, buf.Length);
}

Expand Down
2 changes: 2 additions & 0 deletions src/Uno.Wasm.Bootstrap/Externals/Mono.Profiler.Aot/Records.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// source https://github.com/mono/mono/commits/a44926a5be1c648deec836e9cdda3c93e25f9a51

using System;
using System.Text;
using System.Text.Json;
Expand Down
37 changes: 20 additions & 17 deletions src/Uno.Wasm.Bootstrap/ShellTask.AOTProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,34 @@ public partial class ShellTask_v0
var excludedAssemblies = MixedModeExcludedAssembly?.ToDictionary(i => i.ItemSpec, i => i.ItemSpec)
?? new Dictionary<string, string>();

// LoadIntoBufferAsync uses exception filtering
excludedMethodsList.AddRange(DefaultAOTProfileExcludedMethods);
if (excludedMethodsList.Any() || excludedAssemblies.Any())
{
// LoadIntoBufferAsync uses exception filtering
excludedMethodsList.AddRange(DefaultAOTProfileExcludedMethods);

TryDumpProfileMethods(profile, "AOTProfileDump.Original.txt");
TryDumpProfileMethods(profile, "AOTProfileDump.Original.txt");

var excludedMethods = excludedMethodsList.Select(e => new Regex(e)).ToList();
var excludedMethods = excludedMethodsList.Select(e => new Regex(e)).ToList();

var q = from m in profile.Methods
where !excludedMethods.Any(e => e.Match(m.Type.FullName + '.' + m.Name).Success)
&& !excludedAssemblies.ContainsKey(m.Type.Module.Name)
select m;
var q = from m in profile.Methods
where !excludedMethods.Any(e => e.Match(m.Type.FullName + '.' + m.Name).Success)
&& !excludedAssemblies.ContainsKey(m.Type.Module.Name)
select m;

profile.Methods = q.ToArray();
profile.Methods = q.ToArray();

TryDumpProfileMethods(profile, "AOTProfileDump.Filtered.txt");
TryDumpProfileMethods(profile, "AOTProfileDump.Filtered.txt");

var writer = new Mono.Profiler.Aot.ProfileWriter();
var writer = new Mono.Profiler.Aot.ProfileWriter();

var outputFile = Path.Combine(IntermediateOutputPath, "aot-filtered.profile");
using (var outStream = File.Create(outputFile))
{
writer.WriteAllData(outStream, profile);
}
var outputFile = Path.Combine(IntermediateOutputPath, "aot-filtered.profile");
using (var outStream = File.Create(outputFile))
{
writer.WriteAllData(outStream, profile);
}

return outputFile;
return outputFile;
}
}

return profilePath;
Expand Down

0 comments on commit feb2f32

Please sign in to comment.