Imported Upstream version 6.8.0.73

Former-commit-id: d18deab1b47cfd3ad8cba82b3f37d00eec2170af
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-12-10 18:00:56 +00:00
parent bceda29824
commit 73ee7591e8
1043 changed files with 16271 additions and 22080 deletions

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using Mono.Options;
using System.Linq;
using Mono.Profiler.Aot;
using static System.Console;
@@ -20,8 +21,14 @@ namespace aotprofiletool {
static bool Verbose;
static Regex FilterMethod;
static Regex SkipMethod;
static Regex FilterModule;
static Regex SkipModule;
static Regex FilterType;
static Regex SkipType;
static int SkipCount = 0;
static int TakeCount = int.MaxValue;
static string Output;
@@ -51,14 +58,29 @@ namespace aotprofiletool {
"Set adb socket forwarding for Android",
v => AdbForward = true },
{ "filter-method=",
"Filter by method with regex {VALUE}",
"Include by method with regex {VALUE}",
v => FilterMethod = new Regex (v) },
{ "skip-method=",
"Exclude by method with regex {VALUE}",
v => SkipMethod = new Regex (v) },
{ "filter-module=",
"Filter by module with regex {VALUE}",
"Include by module with regex {VALUE}",
v => FilterModule = new Regex (v) },
{ "skip-module=",
"Exclude by module with regex {VALUE}",
v => SkipModule = new Regex (v) },
{ "filter-type=",
"Filter by type with regex {VALUE}",
"Include by type with regex {VALUE}",
v => FilterType = new Regex (v) },
{ "skip-type=",
"Exclude by type with regex {VALUE}",
v => SkipType = new Regex (v) },
{ "take-count=",
"Take {VALUE} methods that match",
v => TakeCount = int.Parse (v) },
{ "skip-count=",
"Skip the first {VALUE} matching methods",
v => SkipCount = int.Parse (v) },
{ "m|methods",
"Show methods in the profile",
v => Methods = true },
@@ -182,12 +204,10 @@ namespace aotprofiletool {
ICollection<ModuleRecord> modules = new List<ModuleRecord> (pd.Modules);
if (FilterMethod != null || FilterType != null || FilterModule != null) {
methods = new List<MethodRecord> ();
types = new HashSet<TypeRecord> ();
modules = new HashSet<ModuleRecord> ();
foreach (var method in pd.Methods) {
methods = pd.Methods.Where (method => {
var type = method.Type;
var module = type.Module;
@@ -195,24 +215,51 @@ namespace aotprofiletool {
var match = FilterModule.Match (module.ToString ());
if (!match.Success)
continue;
return false;
}
if (SkipModule != null) {
var skip = SkipModule.Match (module.ToString ());
if (skip.Success)
return false;
}
if (FilterType != null) {
var match = FilterType.Match (method.Type.ToString ());
if (!match.Success)
continue;
return false;
}
if (SkipType != null) {
var skip = SkipType.Match (method.Type.ToString ());
if (skip.Success)
return false;
}
if (FilterMethod != null) {
var match = FilterMethod.Match (method.ToString ());
if (!match.Success)
continue;
return false;
}
methods.Add (method);
if (SkipMethod != null) {
var skip = SkipMethod.Match (method.ToString ());
if (skip.Success)
return false;
}
return true;
}).Skip (SkipCount).Take (TakeCount).ToList ();
foreach (var method in methods) {
var type = method.Type;
var module = type.Module;
types.Add (type);
modules.Add (module);
}

View File

@@ -27,7 +27,6 @@ TEST_CASES := \
ifdef INCLUDE_DISABLED
TEST_CASES += \
System.Core/test-queryable-01.cs \
System.Runtime.Serialization/test-dcs-01.cs \
mscorlib/test-marshaling.cs
endif
@@ -41,7 +40,15 @@ endif
ifndef AOT_FRIENDLY_PROFILE
TEST_CASES += \
mscorlib/test-remoting.cs \
mscorlib/test-reflection.cs
mscorlib/test-reflection.cs \
System.Core/test-queryable-01.cs \
System.Core/test-queryable-02.cs
endif
ifdef MCS_MODE
NO_INSTALL=1
NO_BUILD=1
NO_TEST=1
endif
TESTS_COMPILER = $(MCS) -nologo -noconfig -unsafe -nostdlib -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll

View File

@@ -18,6 +18,7 @@
../../../external/linker/src/linker/Linker/MarkingHelpers.cs
../../../external/linker/src/linker/Linker/MethodAction.cs
../../../external/linker/src/linker/Linker/MethodBodyScanner.cs
../../../external/linker/src/linker/Linker/OutputException.cs
../../../external/linker/src/linker/Linker/OverrideInformation.cs
../../../external/linker/src/linker/Linker/MethodDefinitionExtensions.cs
../../../external/linker/src/linker/Linker/MethodReferenceExtensions.cs

View File

@@ -19,7 +19,7 @@ typedef struct BundleMonoAPI
void (*mono_register_bundled_assemblies) (const MonoBundledAssembly **assemblies);
void (*mono_register_config_for_assembly) (const char* assembly_name, const char* config_xml);
void (*mono_jit_set_aot_mode) (MonoAotMode mode);
void (*mono_aot_register_module) (void* aot_info);
void (*mono_aot_register_module) (void** aot_info);
void (*mono_config_parse_memory) (const char *buffer);
void (*mono_register_machine_config) (const char *config_xml);
} BundleMonoAPI;

View File

@@ -49,12 +49,6 @@ validate_api_struct ()
exit (1);
}
#ifdef USE_DEFAULT_MONO_API_STRUCT
// We don't export in jit.h
// So declare here, and get it from mono
void mono_aot_register_module (void *aot_info);
#endif // USE_DEFAULT_MONO_API_STRUCT
static void
init_default_mono_api_struct ()
{