mono.git
6 years agoRevert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"
Ankit Jain [Tue, 4 Jul 2017 01:47:26 +0000 (21:47 -0400)]
Revert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"

This reverts commit 94dcde72917979d9b25b3786e214f08cbc4d2299.

6 years agoBump corefx (#5167)
Alexander Köplinger [Mon, 3 Jul 2017 21:35:53 +0000 (23:35 +0200)]
Bump corefx (#5167)

* Bump corefx

* Bump API snapshot submodule

6 years ago[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making...
Zoltan Varga [Mon, 3 Jul 2017 20:53:56 +0000 (16:53 -0400)]
[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)

6 years ago[ci] Tell babysitter where profiler stress result XML lives
Alexander Köplinger [Mon, 3 Jul 2017 19:09:11 +0000 (21:09 +0200)]
[ci] Tell babysitter where profiler stress result XML lives

This allows it to parse the XML and provide better results
about which tests failed.

6 years ago[Microsoft.Build] Improve assert in BuildSubmissionTest.EndBuildWaitsForSubmissionCom...
Alexander Köplinger [Sun, 2 Jul 2017 22:43:55 +0000 (00:43 +0200)]
[Microsoft.Build] Improve assert in BuildSubmissionTest.EndBuildWaitsForSubmissionCompletion

It started failing more frequently, let's see if we can get better data.
Also did the same change to a similar test.

6 years ago[jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being...
Zoltan Varga [Sun, 2 Jul 2017 22:05:18 +0000 (18:05 -0400)]
[jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being used.

6 years ago[System.ServiceModel] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 16:35:51 +0000 (18:35 +0200)]
[System.ServiceModel] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[Mono.Posix] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:28:40 +0000 (13:28 +0200)]
[Mono.Posix] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[System] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:16:30 +0000 (13:16 +0200)]
[System] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[corlib] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:02:31 +0000 (13:02 +0200)]
[corlib] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight saving time

6 years ago[jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceO...
Zoltan Varga [Sun, 2 Jul 2017 06:08:44 +0000 (02:08 -0400)]
[jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceOrContainsReferences (). The previous version only worked by accident. (#5160)

6 years ago[utils] Fix CppCheck warning in mono-threads-posix.c (#5161)
Alexander Köplinger [Sat, 1 Jul 2017 19:06:24 +0000 (21:06 +0200)]
[utils] Fix CppCheck warning in mono-threads-posix.c (#5161)

After the refactoring in 9aaa0083d0def5b940372dbd9375336b036249fd
CppCheck complained about using 'result' uninitialized (looks like
it can't deduce that g_error will abort the process anyway).

6 years ago[msvc] Update csproj files (#5162)
monojenkins [Sat, 1 Jul 2017 16:53:58 +0000 (18:53 +0200)]
[msvc] Update csproj files (#5162)

6 years ago[mcs] C#7 tuples var deconstruct
Marek Safar [Fri, 30 Jun 2017 22:34:37 +0000 (00:34 +0200)]
[mcs] C#7 tuples var deconstruct

6 years ago[mcs] Adds missing file
Marek Safar [Fri, 30 Jun 2017 18:22:27 +0000 (20:22 +0200)]
[mcs] Adds missing file

6 years ago[mcs] C# 7 tuple (foundation only).
Marek Safar [Fri, 30 Jun 2017 17:44:41 +0000 (19:44 +0200)]
[mcs] C# 7 tuple (foundation only).

Still couple of advanced features not implemented and parser cannot
deal with unnamed tuple type at type declaration level.

6 years agoMerge pull request #5159 from MaurGi/patch-1
Rodrigo Kumpera [Fri, 30 Jun 2017 16:18:20 +0000 (12:18 -0400)]
Merge pull request #5159 from MaurGi/patch-1

Console.Error.WriteLine in System.Net.NetworkInformation

6 years agoConsole.Error.WriteLine in System.Net.NetworkInformation
Mauro Giusti [Fri, 30 Jun 2017 16:13:31 +0000 (09:13 -0700)]
Console.Error.WriteLine in System.Net.NetworkInformation

Console.Error.WriteLine ("Got a bad hardware address length for an AF_PACKET {0} {1}",...

This Console.WriteLine interferes with Apache Storm that reads from the console I/O.

See bug: https://bugzilla.xamarin.com/show_bug.cgi?id=57887

6 years agoMerge pull request #5144 from kumpera/handle-fixes-part1
Rodrigo Kumpera [Fri, 30 Jun 2017 14:56:08 +0000 (10:56 -0400)]
Merge pull request #5144 from kumpera/handle-fixes-part1

[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.

6 years agoMerge branch 'master' into handle-fixes-part1
Rodrigo Kumpera [Fri, 30 Jun 2017 14:55:20 +0000 (10:55 -0400)]
Merge branch 'master' into handle-fixes-part1

6 years agoMerge pull request #5156 from lambdageek/bug-57850+57851
Aleksey Kliger (λgeek) [Fri, 30 Jun 2017 14:24:57 +0000 (10:24 -0400)]
Merge pull request #5156 from lambdageek/bug-57850+57851

[sre] Deal with ResolveEventHandler returning an AssemblyBuilder (Fixes #57850, #57851)

Fix a couple of bugs in the situation where a `ResolveEventHandler` happens to return an `AssemblyBuilder`.

* [#57850](https://bugzilla.xamarin.com/show_bug.cgi?id=57850) - if the `ResolveEventHandler` returns a reflection only assembly, throw a `FileNotFoundException`
* [#57851](https://bugzilla.xamarin.com/show_bug.cgi?id=57851) - don't look for a `ReferenceAssemblyAttribute` on assemblies returned by a `ResolveEventHandler` if they happen to be an `AssemblyBuilder`. (the native code path to get there is to try and instantiate a custom attribute in some other assembly, hence the fairly convoluted test in `assemblyresolve_event5` and its helper files)

6 years ago[loader] Don't try to look for ReferenceAssemblyAttribute on dynamic assemblies ...
Aleksey Kliger [Thu, 29 Jun 2017 22:12:34 +0000 (18:12 -0400)]
[loader] Don't try to look for ReferenceAssemblyAttribute on dynamic assemblies (Fixes #57851)

.NETFramework seems to ignore this custom attribute and allows instantiating
types from on assembly builders.

6 years ago[loader] Throw exn if ResolveEventHandler returns a refonly assembly (Fixes #57850)
Aleksey Kliger [Thu, 29 Jun 2017 16:52:52 +0000 (12:52 -0400)]
[loader] Throw exn if ResolveEventHandler returns a refonly assembly (Fixes #57850)

(Also depends on previous commit to ensure that MonoAssembly:refonly is set
correctly for dynamic assemblies)

6 years ago[sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly
Aleksey Kliger [Thu, 29 Jun 2017 19:06:01 +0000 (15:06 -0400)]
[sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly

This will ensure they show up in AppDomain.ReflectionOnlyGetAssemblies(), and
won't be allowed to execute

6 years ago[sre] use AssemblyBuilderAccess bitmask to set MonoDynamicImage flags
Aleksey Kliger [Thu, 29 Jun 2017 19:01:41 +0000 (15:01 -0400)]
[sre] use AssemblyBuilderAccess bitmask to set MonoDynamicImage flags

In particular this makes sure that AssemblyBuilderAccess.ReflectionOnly aren't
allowed to run.  And AssemblyBuilderAccess.CollectAndRun aren't allowed to save.

6 years ago[sre] Add MonoAssemblyBuilderAccess enum in native code
Aleksey Kliger [Thu, 29 Jun 2017 18:58:20 +0000 (14:58 -0400)]
[sre] Add MonoAssemblyBuilderAccess enum in native code

in sync with System.Reflection.Emit.AssemblyBuilderAccess

6 years ago[mono-error] Add mono_error_set_file_not_found
Aleksey Kliger [Thu, 29 Jun 2017 16:52:15 +0000 (12:52 -0400)]
[mono-error] Add mono_error_set_file_not_found

To throw System.IO.FileNotFoundException

6 years ago[tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono
Aleksey Kliger [Thu, 29 Jun 2017 23:23:44 +0000 (19:23 -0400)]
[tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57851

6 years ago[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available...
Zoltan Varga [Fri, 30 Jun 2017 03:05:00 +0000 (23:05 -0400)]
[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5147)

6 years ago[aot] Load aot images only in the root domain. (#5151)
Zoltan Varga [Fri, 30 Jun 2017 02:02:08 +0000 (22:02 -0400)]
[aot] Load aot images only in the root domain. (#5151)

6 years ago[tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder
Aleksey Kliger [Thu, 29 Jun 2017 22:42:12 +0000 (18:42 -0400)]
[tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57850

6 years ago[tests] Add some missing files to EXTRA_DIST
Aleksey Kliger [Thu, 29 Jun 2017 23:22:51 +0000 (19:22 -0400)]
[tests] Add some missing files to EXTRA_DIST

6 years ago[runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they...
Zoltan Varga [Thu, 29 Jun 2017 22:10:34 +0000 (18:10 -0400)]
[runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they can be freed when the dynamic method is freed. (#5152)

6 years ago[System] Request 32-bit capabilities
Eberhard Beilharz [Thu, 29 Jun 2017 16:50:25 +0000 (18:50 +0200)]
[System] Request 32-bit capabilities

This fixes a crash that happened when running in the debugger.
This fixes Xamarin-21261.

Change-Id: I0ccda9f3c11ec02457a932073665721be5e4e83e

6 years agoMerge pull request #5140 from alexrp/profiler-stress-fpe-fix
Alex Rønne Petersen [Thu, 29 Jun 2017 16:52:20 +0000 (18:52 +0200)]
Merge pull request #5140 from alexrp/profiler-stress-fpe-fix

[acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.

6 years ago[msvc] Update csproj files (#5149)
monojenkins [Thu, 29 Jun 2017 16:21:43 +0000 (18:21 +0200)]
[msvc] Update csproj files (#5149)

6 years ago[packaging/msbuild] Bump to get new changes on xplat-master (#5145)
Ankit Jain [Thu, 29 Jun 2017 12:41:29 +0000 (08:41 -0400)]
[packaging/msbuild] Bump to get new changes on xplat-master (#5145)

6 years ago[bcl] Drop a bunch of unused _2_1.cs files (#5112)
Alexander Köplinger [Thu, 29 Jun 2017 11:21:49 +0000 (13:21 +0200)]
[bcl] Drop a bunch of unused _2_1.cs files (#5112)

* [bcl] Drop a bunch of unused _2_1.cs files

They weren't used anywhere, not even mobile, so we can remove them.

6 years agoRevert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if availa...
Zoltan Varga [Thu, 29 Jun 2017 06:20:50 +0000 (02:20 -0400)]
Revert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)"

This reverts commit 616ea50718aba3af237637f77d9c58acdca9a61f.

Revert this as it fails to build on wrench.

6 years ago[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available...
Zoltan Varga [Thu, 29 Jun 2017 05:02:53 +0000 (01:02 -0400)]
[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)

6 years ago[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt...
Rodrigo Kumpera [Wed, 28 Jun 2017 22:48:28 +0000 (15:48 -0700)]
[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.

mono_w32handle_new_fd: We must hold scan_mutex while initializing an unallocated handle otherwise
mono_w32handle_foreach might think it's a valid handle.

mono_w32handle_timedwait_signal_handle: We must increment the refcount before installing the interrupt handle
as the other end can be called right after we finish installing and would trigger a failure.

6 years ago[w32handle] Replace mono_w32handle_{ref,unref} by mono_w32handle_{duplicate, close...
Ludovic Henry [Wed, 28 Jun 2017 22:42:35 +0000 (18:42 -0400)]
[w32handle] Replace mono_w32handle_{ref,unref} by mono_w32handle_{duplicate, close} (#5106)

* [w32handle] Fix handle dumped ref

* [w32handle] Replace exposing mono_w32handle_{ref,unref} by mono_w32handle_{duplicate,close}, it is closer to what the win32 API exposes.

* [w32handle] Remove unrefing of handles on shutdown

If one of the handle is a file handle for example, then w32file has already be cleaned up, so we cannot guarantee that the handle we are going to close is not going to call into w32file code.

6 years agoImplement GC roots ourselves in Boehm rather than relying on their concept of roots...
Jonathan Chambers [Tue, 27 Jun 2017 04:45:26 +0000 (00:45 -0400)]
Implement GC roots ourselves in Boehm rather than relying on their concept of roots which is mainly for static data segments in binaries and not implemented on all platforms (cannot remove roots on Windows) (#564)

6 years ago[packaging] Remove git_branch from msbuild and mono-extensions (#5141)
Alexander Köplinger [Wed, 28 Jun 2017 17:42:46 +0000 (19:42 +0200)]
[packaging] Remove git_branch from msbuild and mono-extensions (#5141)

We're checking out a specific commit for both now so the git branch
is no longer required.

Also fixes warnings that a 2017-06 branch doesn't exist in mono-extensions.

6 years agoManually invoke Xvfb, don't depend on the xvfb plugin (#5132)
Jo Shields [Wed, 28 Jun 2017 17:41:25 +0000 (18:41 +0100)]
Manually invoke Xvfb, don't depend on the xvfb plugin (#5132)

6 years ago[build] Add a new profile
Marek Safar [Tue, 27 Jun 2017 18:47:19 +0000 (20:47 +0200)]
[build] Add a new profile

6 years ago[nullgc] When building nullgc, don't try to link Boehm libs
Aleksey Kliger [Tue, 27 Jun 2017 14:33:23 +0000 (10:33 -0400)]
[nullgc] When building nullgc, don't try to link Boehm libs

Previous nullgc commit (52d9a55a861527ed4027f8e10a97e3cc880baf4a) didn't actually work in a clean tree.

6 years ago[acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler...
Alex Rønne Petersen [Wed, 28 Jun 2017 12:07:39 +0000 (14:07 +0200)]
[acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.

Also change the code to make it more likely that we actually do some runs
without sampling or heapshot enabled.

6 years ago[w32handle] Add some debugging code to help track down handle wait problems. (#5136)
Zoltan Varga [Tue, 27 Jun 2017 23:44:58 +0000 (19:44 -0400)]
[w32handle] Add some debugging code to help track down handle wait problems. (#5136)

6 years ago[w32handle] Zero out the handle specific data in the handle dtor to help debugging...
Zoltan Varga [Tue, 27 Jun 2017 22:05:34 +0000 (18:05 -0400)]
[w32handle] Zero out the handle specific data in the handle dtor to help debugging. (#5135)

6 years ago[msvc] Update csproj files (#5131)
monojenkins [Tue, 27 Jun 2017 16:32:41 +0000 (18:32 +0200)]
[msvc] Update csproj files (#5131)

6 years ago[man] Fix AOT temp path option description
Alexander Köplinger [Tue, 27 Jun 2017 14:58:46 +0000 (16:58 +0200)]
[man] Fix AOT temp path option description

It's `temp-path` in the code, not `temp_path`

6 years agoMerge pull request #5120 from lambdageek/bug-57744
Aleksey Kliger (λgeek) [Tue, 27 Jun 2017 14:44:30 +0000 (10:44 -0400)]
Merge pull request #5120 from lambdageek/bug-57744

[reflection] Convert correct MonoError to an exn in Assembly.GetTypes ()

6 years agoFix various compiler warnings (#5064)
cherusker [Tue, 27 Jun 2017 14:21:34 +0000 (16:21 +0200)]
Fix various compiler warnings (#5064)

* Fix compiler warnings (w32)

- add explicit (long long (unsigned)) type casts

- change %ld to %lld once, to match the general style of these logging messages

* Fix compiler warnings (threadpool)

- add explicit (void *) type casts

* Fix compiler warnings (boehm)

- add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea

- about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether.

* Fix compiler warnings (sgen)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc - metadata)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

- add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed

- ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning

* Fix compiler warnings (mini)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* [fixup!] Correct indentation

* [fixup!] Correct (void *)
- use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p

* [fixup!] Correct indentation of boehm-gc.c and add FIXME

* include <inttypes.h> and test the G_GINT64_FORMAT macro

* [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible

6 years ago[packaging/msbuild] Bump to get new changes on xplat-master (#5127)
Ankit Jain [Tue, 27 Jun 2017 04:57:07 +0000 (00:57 -0400)]
[packaging/msbuild] Bump to get new changes on xplat-master (#5127)

6 years ago[jit] Avoid emitting op_load_got_addr opcodes on x86 when using llvmonly, its not...
Zoltan Varga [Tue, 27 Jun 2017 03:19:07 +0000 (23:19 -0400)]
[jit] Avoid emitting op_load_got_addr opcodes on x86 when using llvmonly, its not needed. (#5125)

6 years ago[reflection] Convert correct MonoError to an exn in Assembly.GetTypes () (Fixes ...
Aleksey Kliger [Mon, 26 Jun 2017 19:52:08 +0000 (15:52 -0400)]
[reflection] Convert correct MonoError to an exn in Assembly.GetTypes () (Fixes #57744)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57744

6 years ago[bcl] Delete our ReflectionTypeLoadException
Aleksey Kliger [Mon, 26 Jun 2017 19:58:12 +0000 (15:58 -0400)]
[bcl] Delete our ReflectionTypeLoadException

We use the referencesource version

6 years ago[cil-strip] Move comment out of .sources file
Alexander Köplinger [Mon, 26 Jun 2017 17:16:47 +0000 (19:16 +0200)]
[cil-strip] Move comment out of .sources file

I forgot that we only run gensources.sh on libraries but not
tools so the comments don't get stripped out...

6 years ago[runtime] Add more logging in case mono_os_cond_timedwait () fails.
Zoltan Varga [Mon, 26 Jun 2017 17:04:36 +0000 (13:04 -0400)]
[runtime] Add more logging in case mono_os_cond_timedwait () fails.

6 years agoBump API snapshot
Alexander Köplinger [Mon, 26 Jun 2017 15:13:11 +0000 (17:13 +0200)]
Bump API snapshot

6 years ago[System.Core] Implement MemoryMappedFile.OpenExisting
Marius Ungureanu [Sat, 24 Jun 2017 18:48:17 +0000 (21:48 +0300)]
[System.Core] Implement MemoryMappedFile.OpenExisting

Reuse the existing icall infrastructure to give the same handle back.

This PR implements all OpenExisting methods (with the access rights parameter discarded) and the SafeHandle property.
In the runtime, we don't check the capacity parameter if we try to open a mmap file, and we fallthrough the handle refcount case.

6 years agoRevert "[cil-strip] Remove old private copy of Mono.Cecil"
Alexander Köplinger [Mon, 26 Jun 2017 10:32:33 +0000 (12:32 +0200)]
Revert "[cil-strip] Remove old private copy of Mono.Cecil"

(reverted from commit 4ea31227587b9df3a244d9c32a5a87a7afa70436)

6 years agoRevert "[cil-strip] Upgrade to latest Mono.Cecil API"
Alexander Köplinger [Mon, 26 Jun 2017 10:32:22 +0000 (12:32 +0200)]
Revert "[cil-strip] Upgrade to latest Mono.Cecil API"

(reverted from commit 0c9eb70a4646364f4b425f69b366be766043bef9)

Using newer Cecil means metadata tokens will be different which
breaks AOT compilation: https://github.com/mono/mono/pull/5102#issuecomment-310801767

6 years ago[msvc] Update csproj files
monojenkins [Sun, 25 Jun 2017 16:20:22 +0000 (16:20 +0000)]
[msvc] Update csproj files

6 years ago[llvm] Align aot variables to 8 bytes, parts of the aot code depend on it.
Zoltan Varga [Sat, 24 Jun 2017 19:12:38 +0000 (15:12 -0400)]
[llvm] Align aot variables to 8 bytes, parts of the aot code depend on it.

6 years ago[null_gc] Get null GC building again.
Aleksey Kliger [Fri, 23 Jun 2017 21:43:02 +0000 (17:43 -0400)]
[null_gc] Get null GC building again.

- Had to borrow a gchandles implementation from mono/metadata/boehm-gc.c
- Added coop handles support for NULL GC
- Fixed typos in configure.ac
- To use: `./configure --with-libgc=none --without-sgen --enable-boehm`
  You get a mono-boehm which actually is not collecting anything.

6 years ago[packaging/msbuild] Bump to get new changes on xplat-master (#5113) (#5114)
Ankit Jain [Sat, 24 Jun 2017 03:35:53 +0000 (23:35 -0400)]
[packaging/msbuild] Bump to get new changes on xplat-master (#5113) (#5114)

6 years ago[System] Fix compilation on watchos (#5108)
Ludovic Henry [Fri, 23 Jun 2017 23:32:35 +0000 (19:32 -0400)]
[System] Fix compilation on watchos (#5108)

6 years ago[cil-strip] Remove old private copy of Mono.Cecil
Alexander Köplinger [Fri, 23 Jun 2017 14:05:11 +0000 (16:05 +0200)]
[cil-strip] Remove old private copy of Mono.Cecil

No longer needed now that we're using the new Cecil.

6 years ago[cil-strip] Upgrade to latest Mono.Cecil API
Alexander Köplinger [Fri, 23 Jun 2017 14:03:36 +0000 (16:03 +0200)]
[cil-strip] Upgrade to latest Mono.Cecil API

This greatly simplifies the code and as a bonus also shaves off
about 300ms when stripping mscorlib.dll.

6 years agoMerge pull request #5103 from alexrp/profiler-signal-ack-fix
Rodrigo Kumpera [Fri, 23 Jun 2017 22:30:14 +0000 (15:30 -0700)]
Merge pull request #5103 from alexrp/profiler-signal-ack-fix

[profiler] Do the signal ack after checking that the thread is detached.

6 years ago[aot] Fix aot image loading messages in static mode.
Zoltan Varga [Fri, 23 Jun 2017 20:16:41 +0000 (16:16 -0400)]
[aot] Fix aot image loading messages in static mode.

6 years agoMerge pull request #5084 from BrzVlad/feature-worker-context
Vlad Brezae [Fri, 23 Jun 2017 18:10:18 +0000 (21:10 +0300)]
Merge pull request #5084 from BrzVlad/feature-worker-context

[sgen] Implement sgen worker context

6 years ago[sgen] Use concurrent mark concurrently with parallel minors
Vlad Brezae [Wed, 21 Jun 2017 10:43:39 +0000 (13:43 +0300)]
[sgen] Use concurrent mark concurrently with parallel minors

6 years ago[sgen] Implement work context for thread pool threads
Vlad Brezae [Thu, 15 Jun 2017 22:15:51 +0000 (01:15 +0300)]
[sgen] Implement work context for thread pool threads

We need to run jobs on the thread pool threads for parallel minor, parallel major, concurrent mark and concurrent sweep, some of which can run simultaneously. Instead of making separate threads reserved for each type of work, we create a work context abstraction (this contains a set of pending jobs to run and the sgen-worker callbacks). When a thread pool thread looks for work, it searches for work (jobs and idle work) through all contexts and finishes work from each one of them, from the highest to the lowest priority.

This is implemented by having different thread pool contexts (which contain the job list, work callbacks that indicate whether it should work and its ineherent priority), overall unrelated to the GC. The sgen worker infrastructure also creates separate worker contexts (which contain the object ops to be used and information about each worker, like the state and the private gray queue). We use at most two worker contexts (for minor and for major) and each worker context makes use of a sgen thread pool context.

6 years ago[sgen] Remove redundant code
Vlad Brezae [Wed, 21 Jun 2017 11:09:12 +0000 (14:09 +0300)]
[sgen] Remove redundant code

We always init worker distribute gray queue when initialising worker infrastructure.

6 years ago[sgen] Include split count in the parallel job
Vlad Brezae [Wed, 21 Jun 2017 10:55:57 +0000 (13:55 +0300)]
[sgen] Include split count in the parallel job

We were getting the split_count at job run time which makes little sense. Include it in the job, alongside the job index.

6 years ago[sgen] Run the scan pinned object job concurrently with minors
Vlad Brezae [Tue, 20 Jun 2017 12:22:39 +0000 (15:22 +0300)]
[sgen] Run the scan pinned object job concurrently with minors

Concurrent mark doesn't normally scan objects in the nursery since they can be moved. At the end of the concurrent mark, we were locking over the entire gc pause in order to make sure that the we can scan the latest pinned object list (aka none of those objects can be moved). Lock only over the pinning phase of the collection, since it is enough.

6 years agoMerge pull request #5098 from BrzVlad/fix-sgen-pagesize
Vlad Brezae [Fri, 23 Jun 2017 17:06:51 +0000 (20:06 +0300)]
Merge pull request #5098 from BrzVlad/fix-sgen-pagesize

[sgen] Fix sgen pagesize

6 years agoMerge pull request #5104 from mono/bump-bockbuild
Marius Ungureanu [Fri, 23 Jun 2017 16:08:23 +0000 (19:08 +0300)]
Merge pull request #5104 from mono/bump-bockbuild

Bump bockbuild

6 years agoBump bockbuild
Marius Ungureanu [Fri, 23 Jun 2017 16:05:48 +0000 (19:05 +0300)]
Bump bockbuild

6 years ago[profiler] Do the signal ack after checking that the thread is detached.
Alex Rønne Petersen [Fri, 23 Jun 2017 14:52:24 +0000 (16:52 +0200)]
[profiler] Do the signal ack after checking that the thread is detached.

Otherwise we could crash in mono_thread_info_current ().

6 years ago[aot] fixes temp-path argument only working when using LLVM compiler. (#5099)
Chris Lapa [Fri, 23 Jun 2017 13:30:23 +0000 (23:30 +1000)]
[aot] fixes temp-path argument only working when using LLVM compiler. (#5099)

Signed-off-by: Chris Lapa <chris@lapa.com.au>
6 years ago[packaging/msbuild] Bump to get new changes on xplat-master
Ankit Jain [Fri, 23 Jun 2017 06:16:31 +0000 (02:16 -0400)]
[packaging/msbuild] Bump to get new changes on xplat-master

6 years ago[packaging/msbuild] Update commit hash to point to xplat-master HEAD (#5100)
Ankit Jain [Fri, 23 Jun 2017 01:35:09 +0000 (21:35 -0400)]
[packaging/msbuild] Update commit hash to point to xplat-master HEAD (#5100)

6 years ago[sgen] Performance improvement for ms_block_size computations
Vlad Brezae [Thu, 22 Jun 2017 20:15:53 +0000 (23:15 +0300)]
[sgen] Performance improvement for ms_block_size computations

This reduces regressions for switching from MS_BLOCK_SIZE compile time constant
to ms_block_size variable by 85% on the tests where this was showing up. In the
future we should implement a block allocator, which would, amongst other benefits,
enable us to remove the block-size/page-size dependency.

6 years ago[sgen] Fix MS block size calculation.
Vlad Brezae [Wed, 21 Jun 2017 20:08:07 +0000 (23:08 +0300)]
[sgen] Fix MS block size calculation.

The block size must be a multiple of the system page size. Page size simply
cannot be determined reliably at compile time, so we must obtain the page size
through a system call on startup and use it as the block size. We still enforce
a minimum block size of 16kb on systems where the page size is smaller than
that.

The old code hardcoded page sizes for certain architectures with large pages.
THe problem is that those architectures don't necessarily have to have large
pages and on systems where this wasn't the case, we'd end up with a block size
much larger than needed.

Rebase of @alexrp's work.

6 years agoMerge pull request #5095 from kumpera/fix_fullaot
Rodrigo Kumpera [Thu, 22 Jun 2017 21:55:52 +0000 (14:55 -0700)]
Merge pull request #5095 from kumpera/fix_fullaot

[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it.

6 years ago[arm] Handle large offsets in OP_SEQ_POINT. Fixes #57476. (#5094)
Zoltan Varga [Thu, 22 Jun 2017 21:15:27 +0000 (17:15 -0400)]
[arm] Handle large offsets in OP_SEQ_POINT. Fixes #57476. (#5094)

6 years agoMerge pull request #5090 from alexrp/profiler-class-unload-removal
Alex Rønne Petersen [Thu, 22 Jun 2017 19:03:01 +0000 (21:03 +0200)]
Merge pull request #5090 from alexrp/profiler-class-unload-removal

[profiler] Remove class unload events.

6 years ago[profiler] Remove class unload events.
Alex Rønne Petersen [Thu, 22 Jun 2017 08:40:58 +0000 (10:40 +0200)]
[profiler] Remove class unload events.

These are never actually emitted by the profiler API because they make no sense
in the context of Mono's metadata layer.

6 years agoMerge pull request #5089 from alexrp/profiler-deadlock-fix
Alex Rønne Petersen [Thu, 22 Jun 2017 18:56:48 +0000 (20:56 +0200)]
Merge pull request #5089 from alexrp/profiler-deadlock-fix

[profiler] Fix a deadlock due to recursive use of the buffer lock.

6 years ago[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct...
Rodrigo Kumpera [Thu, 22 Jun 2017 18:48:13 +0000 (11:48 -0700)]
[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it.

6 years agoMerge pull request #5092 from alexrp/mini-coverage-increment
Alex Rønne Petersen [Thu, 22 Jun 2017 18:39:37 +0000 (20:39 +0200)]
Merge pull request #5092 from alexrp/mini-coverage-increment

[mini] Use an atomic add for the code coverage counter when possible.

6 years agoDocs: added missing ) to RelaxngPattern snippet (#5093)
Eddie Hedges [Thu, 22 Jun 2017 16:48:40 +0000 (11:48 -0500)]
Docs: added missing ) to RelaxngPattern snippet (#5093)

6 years ago[mini] Use an atomic add for the code coverage counter when possible.
Alex Rønne Petersen [Thu, 22 Jun 2017 15:32:10 +0000 (17:32 +0200)]
[mini] Use an atomic add for the code coverage counter when possible.

6 years ago[runtime] Add a few missing error_init () calls to the mono_custom_attrs_from_.....
Zoltan Varga [Thu, 22 Jun 2017 14:27:07 +0000 (10:27 -0400)]
[runtime] Add a few missing error_init () calls to the mono_custom_attrs_from_... functions. Fixes #57488. (#5076)

6 years ago[sre] Fix the signature of the create_dynamic_method () icall, make it static since...
Zoltan Varga [Thu, 22 Jun 2017 14:26:46 +0000 (10:26 -0400)]
[sre] Fix the signature of the create_dynamic_method () icall, make it static since the C implementation only takes two parameters, this only caused problems if the icall set the error, since it overwrite the DynamicMethod object instead. Fixes #57301. (#5081)

6 years agoMerge pull request #5091 from alexrp/mini-enter-leave-cleanup
Alex Rønne Petersen [Thu, 22 Jun 2017 13:55:26 +0000 (15:55 +0200)]
Merge pull request #5091 from alexrp/mini-enter-leave-cleanup

[mini] Remove codegen special cases around MONO_PROFILE_ENTER_LEAVE.