Imported Upstream version 5.18.0.161

Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-19 08:34:24 +00:00
parent 37fbf886a3
commit e19d552987
28702 changed files with 3868076 additions and 803 deletions

View File

@@ -105,6 +105,21 @@ namespace Mono {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void WriteStateToFile_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
static void
WriteStateToFile (Exception exc)
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
using (var payload_chars = RuntimeMarshal.MarshalString (payload_str))
{
WriteStateToFile_internal (payload_chars.Value, portable_hash, unportable_hash);
}
}
static void SendMicrosoftTelemetry (string payload_str, ulong portable_hash, ulong unportable_hash)
{
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
@@ -150,5 +165,43 @@ namespace Mono {
}
#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern string DumpStateSingle_internal (out ulong portable_hash, out ulong unportable_hash);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern string DumpStateTotal_internal (out ulong portable_hash, out ulong unportable_hash);
static Tuple<String, ulong, ulong>
DumpStateSingle ()
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = DumpStateSingle_internal (out portable_hash, out unportable_hash);
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
static Tuple<String, ulong, ulong>
DumpStateTotal ()
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = DumpStateTotal_internal (out portable_hash, out unportable_hash);
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void RegisterReportingForNativeLib_internal (IntPtr modulePathSuffix, IntPtr moduleName);
static void RegisterReportingForNativeLib (string modulePathSuffix_str, string moduleName_str)
{
using (var modulePathSuffix_chars = RuntimeMarshal.MarshalString (modulePathSuffix_str))
using (var moduleName_chars = RuntimeMarshal.MarshalString (moduleName_str))
{
RegisterReportingForNativeLib_internal (modulePathSuffix_chars.Value, moduleName_chars.Value);
}
}
}
}