mono.git
7 years ago[msvc] Update csproj files (#4295)
monojenkins [Thu, 26 Jan 2017 16:40:33 +0000 (16:40 +0000)]
[msvc] Update csproj files (#4295)

7 years ago[System.Data] SqlTypes and DataStorage from corefx (#4291)
Egor Bogatov [Thu, 26 Jan 2017 13:48:23 +0000 (14:48 +0100)]
[System.Data] SqlTypes and DataStorage from corefx (#4291)

7 years ago[ci] Set execute bit on run-test-mcs.sh
Alexander Köplinger [Thu, 26 Jan 2017 10:59:09 +0000 (11:59 +0100)]
[ci] Set execute bit on run-test-mcs.sh

7 years ago[ci] run mcs tests on mcs lane
Marek Safar [Thu, 26 Jan 2017 02:47:40 +0000 (21:47 -0500)]
[ci] run mcs tests on mcs lane

7 years agoFix PLATFORM_AOT_SUFFIX check in configure.ac
Alexander Köplinger [Thu, 26 Jan 2017 00:33:49 +0000 (01:33 +0100)]
Fix PLATFORM_AOT_SUFFIX check in configure.ac

7 years agoSkip AOTing profile assemblies if AOT_BUILD_FLAGS is not set
Alexander Köplinger [Wed, 25 Jan 2017 19:59:01 +0000 (20:59 +0100)]
Skip AOTing profile assemblies if AOT_BUILD_FLAGS is not set

Fixes the issue from a4b3ba6177d1af7dc93ba5cce56f444eeb976611
and 6f4f3643c6abf58d97a290c74254a74173736316.

When building those profiles as part of runtime_preset=all,
the AOT_BUILD_FLAGS variable is not set so AOTing doesn't work
because the command line flag in rules.make is incomplete.

We don't really need/want to AOT for runtime_preset=all,
the point is just to make sure these BCL profiles still build.

7 years ago[tools] Simplify cecil usage in stringreplacer
Marek Safar [Tue, 24 Jan 2017 22:12:52 +0000 (17:12 -0500)]
[tools] Simplify cecil usage in  stringreplacer

7 years agoDisable winaot in the runtime_preset=all as well
Alexander Köplinger [Wed, 25 Jan 2017 19:22:18 +0000 (20:22 +0100)]
Disable winaot in the runtime_preset=all as well

It runs into the same issue as orbis (6f4f3643c6abf58d97a290c74254a74173736316).

7 years ago[appdomain] Use coop handles for most methods in System.AppDomain (#4286)
Aleksey Kliger (λgeek) [Wed, 25 Jan 2017 18:53:46 +0000 (13:53 -0500)]
[appdomain] Use coop handles for most methods in System.AppDomain (#4286)

* [runtime] Use coop handles for ves_icall_System_AppDomain_GetData

* [runtime] Add mono_string_new_utf16_handle function that returns a MonoStringHandle

* [runtime] Use coop handles for ves_icall_System_AppDomain_InternalGetProcessGuid

* [runtime] Use coop handles for System.AppDomain icalls

  - ves_icall_System_AppDomain_InternalIsFinalizingForUnload
  - ves_icall_System_AppDomain_InternalPushDomainRef
  - ves_icall_System_AppDomain_InternalPushDomainRefByID
    (This one is slightly non-trivial because we switch from MonoException to MonoError)
  - ves_icall_System_AppDomain_InternalPopDomainRef
  - ves_icall_System_AppDomain_InternalSetDomainByID

* [runtime] Use coop handles for ves_icall_System_AppDomain_InternalSetDomain

* [runtime] Use coop handles for ves_icall_System_AppDomain_SetData

* [runtime] Coop handles for some AppDomain icalls

  - ves_icall_System_AppDomain_getCurDomain
  - ves_icall_System_AppDomain_getFriendlyName
  - ves_icall_System_AppDomain_getRootDomain
  - ves_icall_System_AppDomain_getSetup

* [coop handles] Add mono_string_handle_length function

* [marshal] Add mono_marshal_xdomain_copy_value_handle

* [coop handles] Add mono_aray_new_full_handle

* [appdomain] Use handles in mono_array_clone_in_domain

* [runtime] Use coop handles for ves_icall_System_AppDomain_createDomain

* [appdomain] Use coop handles for ves_icall_System_AppDomain_InternalUnload

7 years agoMerge pull request #4276 from henricm/winaot
Marek Safar [Wed, 25 Jan 2017 18:16:04 +0000 (13:16 -0500)]
Merge pull request #4276 from henricm/winaot

Updates for winaot profile

7 years agoChanging Win32_IP_ADAPTER_INFO to struct to work on AOT builds
Henric Müller [Tue, 17 Jan 2017 15:20:03 +0000 (16:20 +0100)]
Changing Win32_IP_ADAPTER_INFO to struct to work on AOT builds

7 years agoFixing AsyncOperationManagerTest test for winaot profile
Henric Müller [Tue, 17 Jan 2017 15:18:27 +0000 (16:18 +0100)]
Fixing AsyncOperationManagerTest test for winaot profile

7 years agoFixing tests that asume IPV4 when first adapter is IPV6
Henric Müller [Tue, 17 Jan 2017 15:14:26 +0000 (16:14 +0100)]
Fixing tests that asume IPV4 when first adapter is IPV6

7 years agoEnabling NativeObjectSecurity on windows aot
Henric Müller [Tue, 17 Jan 2017 15:12:04 +0000 (16:12 +0100)]
Enabling NativeObjectSecurity on windows aot

7 years agoFixes in NetworkInformation for winaot profile
Henric Müller [Tue, 17 Jan 2017 08:29:57 +0000 (09:29 +0100)]
Fixes in NetworkInformation for winaot profile

* Enabling windows specific code for winaot profile
which were disabled with MOBILE define.
* Making sure Win32_FIXED_INFO struct can get marshalled
correctly for AOT builds.

7 years agoEnabled win specific time zone code using WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:58:56 +0000 (08:58 +0100)]
Enabled win specific time zone code using WIN_PLATFORM

7 years agoEnabled win specific code in registry classes using WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:58:13 +0000 (08:58 +0100)]
Enabled win specific code in registry classes using WIN_PLATFORM

7 years agoEnabling Windows specific code paths with WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:48:05 +0000 (08:48 +0100)]
Enabling Windows specific code paths with WIN_PLATFORM

7 years agoAdding winaot corlib test assembly in LoadWithPartialName
Henric Müller [Tue, 17 Jan 2017 07:41:24 +0000 (08:41 +0100)]
Adding winaot corlib test assembly in LoadWithPartialName

7 years agoRemoving mini-exeptions-native-unwinder from project file
Henric Müller [Tue, 17 Jan 2017 07:37:23 +0000 (08:37 +0100)]
Removing mini-exeptions-native-unwinder from project file

7 years agoAdding .exp to git ignore file.
Henric Müller [Tue, 10 Jan 2017 10:59:54 +0000 (11:59 +0100)]
Adding .exp to git ignore file.

7 years agoAdding Console support for winaot
Henric Müller [Thu, 22 Dec 2016 13:40:55 +0000 (14:40 +0100)]
Adding Console support for winaot

Introducing a `MONO_FEATURE_CONSOLE` to be used instead of disabling
Windows specific Console related classes using `MOBILE` ifdef. The
`MONO_FEATURE_CONSOLE` will be set for profiles not setting `NO_CONSOLE`
which currently monodriod and monotouch profiles do.

7 years agoMerge pull request #4280 from vargaz/class-init-cond
Rodrigo Kumpera [Wed, 25 Jan 2017 13:53:12 +0000 (08:53 -0500)]
Merge pull request #4280 from vargaz/class-init-cond

[runtime] Implement the wait in mono_runtime_class_init_full () using…

7 years agoUpdates for winaot profile
Henric Müller [Thu, 22 Dec 2016 13:34:55 +0000 (14:34 +0100)]
Updates for winaot profile

7 years agoAdded support for Windows AOT suffix
Henric Müller [Tue, 20 Dec 2016 09:52:21 +0000 (10:52 +0100)]
Added support for Windows AOT suffix

* Adding support for .dll and .exe AOT suffixes.
* Fix issue with parsing gsharedvt optimazation flag on Windows.

7 years agoTemporarily exclude orbis from the runtime_preset=all to fix build break
Alexander Köplinger [Wed, 25 Jan 2017 02:36:31 +0000 (03:36 +0100)]
Temporarily exclude orbis from the runtime_preset=all to fix build break

It breaks on Jenkins with:

```
23:53:28 make aot-all-profile
23:53:28 MONO_PATH="class/lib/orbis/" /mnt/jenkins/workspace/test-mono-mainline-linux/label/ubuntu-1404-amd64/runtime/mono-wrapper  ,temp-path=class/lib/orbis/I18N.CJK.dll_bitcode_tmp --verbose class/lib/orbis/I18N.CJK.dll > class/lib/orbis/I18N.CJK.dll.so.aot-log
23:53:28 Cannot open assembly ',temp-path=class/lib/orbis/I18N.CJK.dll_bitcode_tmp': No such file or directory.
```

7 years ago[bcl] Fix build for orbis profile
Alexander Köplinger [Tue, 24 Jan 2017 22:55:38 +0000 (23:55 +0100)]
[bcl] Fix build for orbis profile

7 years ago[socket] Fix order of parameters for mono_w32file_create
Alexander Köplinger [Tue, 24 Jan 2017 21:35:44 +0000 (22:35 +0100)]
[socket] Fix order of parameters for mono_w32file_create

In 56edb3357c0af9eae94a01dd72c7623bd6322dd8 the call to ves_icall_System_IO_MonoIO_Open
was changed to mono_w32file_create, but that function uses a different parameter order:

```
mono_w32file_create (name, fileaccess, sharemode, createmode, attrs)
ves_icall_System_IO_MonoIO_Open (filename, mode, access_mode, share, options, error)
```

Fix the order so the parameters we pass are the intended ones.

7 years ago[msvc] Update csproj files (#4287)
monojenkins [Tue, 24 Jan 2017 17:12:19 +0000 (17:12 +0000)]
[msvc] Update csproj files (#4287)

7 years agoMerge pull request #3806 from BrzVlad/feature-parallel-gc-final
Vlad Brezae [Tue, 24 Jan 2017 11:03:05 +0000 (13:03 +0200)]
Merge pull request #3806 from BrzVlad/feature-parallel-gc-final

[sgen] Parallel concurrent major

7 years agoBump corert
Marek Safar [Mon, 23 Jan 2017 20:12:22 +0000 (15:12 -0500)]
Bump corert

7 years ago[build] Add new profile
Marek Safar [Mon, 23 Jan 2017 20:43:02 +0000 (15:43 -0500)]
[build] Add new profile

7 years ago[socket] Ensure werror is initialized to 0
Ludovic Henry [Mon, 23 Jan 2017 20:29:07 +0000 (15:29 -0500)]
[socket] Ensure werror is initialized to 0

7 years ago[build] Add System.Text.Encoding.CodePages dependency used for non-ascii files in...
Marek Safar [Mon, 23 Jan 2017 17:56:35 +0000 (12:56 -0500)]
[build] Add System.Text.Encoding.CodePages dependency used for non-ascii files in build

7 years ago[msvc] Update csproj files (#4284)
monojenkins [Mon, 23 Jan 2017 17:19:22 +0000 (17:19 +0000)]
[msvc] Update csproj files (#4284)

7 years ago[runtime] Remove duplicate unused SHA1 implementation.
Zoltan Varga [Mon, 23 Jan 2017 08:23:20 +0000 (03:23 -0500)]
[runtime] Remove duplicate unused SHA1 implementation.

7 years ago[mono-sha1] make SHA1Transform thread-safe
Bernhard Urban [Fri, 20 Jan 2017 15:15:04 +0000 (16:15 +0100)]
[mono-sha1] make SHA1Transform thread-safe

should fix https://bugzilla.xamarin.com/show_bug.cgi?id=41133

The bug exposed itself as System.MethodAccessExceptionMethod which is
thrown when a method isn't allowed to call another method.  Several
things are checked for this: Among other things, the runtime checks if
the public key in the friend list of the caller assembly matches the
public key in the callee assembly.

The issue here was that two threads computed the SHA1 at the same time,
using the same buffer and therefore computing garbage.

7 years ago[aot] Allow the redirection of aot profile output to an already opened fd using outfi...
Zoltan Varga [Mon, 23 Jan 2017 10:48:54 +0000 (05:48 -0500)]
[aot] Allow the redirection of aot profile output to an already opened fd using outfile=#<fdnum>.

7 years ago[runtime] Implement the wait in mono_runtime_class_init_full () using a cond variable...
Zoltan Varga [Fri, 20 Jan 2017 23:26:29 +0000 (18:26 -0500)]
[runtime] Implement the wait in mono_runtime_class_init_full () using a cond variable instead of a mutex.

Previously it waited for the initialization to be done using a mutex lock/unlock, which needed some additional checks before acquiring the lock. Use a normal cond variable instead. Remove some code duplication from the lock cleanup code.

7 years agoEnable AOT for all roslyn assemblies.
Zoltan Varga [Wed, 18 Jan 2017 00:50:19 +0000 (19:50 -0500)]
Enable AOT for all roslyn assemblies.

7 years agoFix a few cppcheck errors (#4281)
Alexander Köplinger [Mon, 23 Jan 2017 02:11:40 +0000 (03:11 +0100)]
Fix a few cppcheck errors (#4281)

* [zlib] Fix CppCheck error "Shifting a negative value is undefined behaviour"

This matches what upstream now does:
https://github.com/madler/zlib/blob/2edb94a3025d288dc251bc6cbb2c02e60fbd7438/inflate.c#L1529

* [scripts] Fix CppCheck error "Memory leak: nargv"

* [tests] Fix CppCheck error: "Memory leak: reference"

* [aot-compiler] Fix CppCheck error: "Resource leak: infile"

* [metadata] Fix CppCheck error: "Uninitialized variable: ret"

7 years agoMerge pull request #4274 from kumpera/cctor-abort
Rodrigo Kumpera [Sun, 22 Jan 2017 15:20:38 +0000 (10:20 -0500)]
Merge pull request #4274 from kumpera/cctor-abort

[runtime] Latest attempt at the cctor abort race. All tests passing locally.

7 years agoFix tarball build
Alexander Köplinger [Sun, 22 Jan 2017 02:13:56 +0000 (03:13 +0100)]
Fix tarball build

w32api.h wasn't included in any sources in the Makefile.
Also fix path in vcxproj, the file is in mono/utils not mono/metadata.

7 years ago[aot] Init the plt before setting acfg->methods_loaded which is accessed outside...
Zoltan Varga [Sat, 21 Jan 2017 11:04:22 +0000 (06:04 -0500)]
[aot] Init the plt before setting acfg->methods_loaded which is accessed outside the lock.

7 years ago[io-layer] Extract error (#4279)
Ludovic Henry [Sat, 21 Jan 2017 01:15:19 +0000 (20:15 -0500)]
[io-layer] Extract error (#4279)

* [file] Remove dead field

* [process] Remove wapi_getpid

* [process] Remove CloseHandle

* [io-layer] Remove dead MONO_TRACE

* [io-layer] Extract error

* [io-layer] Extract wapi.h

* [io-layer] Remove the io-layer

7 years ago[runtime] Fix the loaded llvm build.
Zoltan Varga [Sat, 21 Jan 2017 00:02:43 +0000 (19:02 -0500)]
[runtime] Fix the loaded llvm build.

7 years ago[corlib] Removes unused method
Marek Safar [Fri, 20 Jan 2017 22:23:58 +0000 (23:23 +0100)]
[corlib] Removes unused method

7 years ago[btls] Remove last traces of statically linked btls
Alexander Köplinger [Fri, 20 Jan 2017 19:34:29 +0000 (20:34 +0100)]
[btls] Remove last traces of statically linked btls

It was removed in d831fc4ec4c90930026342431641e529b2e34dc8.

7 years ago[btls] Add dependency on btls source files in Makefile so change tracking works
Alexander Köplinger [Fri, 20 Jan 2017 19:33:37 +0000 (20:33 +0100)]
[btls] Add dependency on btls source files in Makefile so change tracking works

7 years agoReally fix the file mode this time...
Alexander Köplinger [Fri, 20 Jan 2017 18:49:03 +0000 (19:49 +0100)]
Really fix the file mode this time...

Sorry, should probably get a coffee :(

7 years agoFix inadvertent file mode change in previous commit
Alexander Köplinger [Fri, 20 Jan 2017 18:44:36 +0000 (19:44 +0100)]
Fix inadvertent file mode change in previous commit

7 years ago[Facades] Refresh netstandard20 typeforwarders
Alexander Köplinger [Fri, 20 Jan 2017 18:40:55 +0000 (19:40 +0100)]
[Facades] Refresh netstandard20 typeforwarders

7 years ago[profiler] Add mono-profiler-aot.h to EXTRA_DIST
Alexander Köplinger [Fri, 20 Jan 2017 15:59:55 +0000 (16:59 +0100)]
[profiler] Add mono-profiler-aot.h to EXTRA_DIST

This broke the tarball build.

7 years ago[io-layer] Extract file (#4255)
Ludovic Henry [Fri, 20 Jan 2017 16:32:48 +0000 (11:32 -0500)]
[io-layer] Extract file (#4255)

* [io-layer] Merge io related headers

* [io-layer] Remove global variable _wapi_had_shut_down

* [io-layer] Inline io-portability.c file into io.c

* [io-layer] Inline locking.c file into io.c

* [io-layer] Inline posix.c file into io.c

* [file] Move metadata/file-io* files to metadata/w32file*

* [io-layer] Extract file functions

* [file] Remove overlapped parameter which is always NULL

* [file] Remove SECURITY_ATTRIBUTES parameter which is always NULL

* [file] Remove GET_FILEEX_INFO_LEVELS parameter which is always GetFileExInfoStandard

* [file] Replace ULARGE_INTEGER parameter type with guint64

* [file] Replace WIN32_FILE_ATTRIBUTE_DATA parameter type with MonoIOStat

* [file] Remove mono_w32file_create unused parameter tmplate

* [file] Fix win32 build

7 years ago[reflection] Use coop handles for MonoMethod icalls (#4272)
Aleksey Kliger (λgeek) [Fri, 20 Jan 2017 15:35:02 +0000 (10:35 -0500)]
[reflection] Use coop handles for MonoMethod icalls (#4272)

* [reflection] Use coop handles for MonoMethod.GetGenericArguments

* [reflection] Use handles for ves_icall_MonoMethod_GetGenericMethodDefinition
  and two more trivial functions:
  - ves_icall_MonoMethod_get_IsGenericMethod
  - ves_icall_MonoMethod_get_IsGenericMethodDefinition

* [runtime] Add mono_method_get_base_method function

  - Internal function in class-internals.h, for now.
  - Code factored out from ves_icall_MonoMethod_get_base_method
  - ves_icall_MonoMethod_get_base_method just calls this utility and wraps on
    reflection objects, using handles.

* [reflection] Use coop handles for ves_icall_MonoMethod_MakeGenericMethod_impl

* [reflection] Use coop handles for ves_icall_MonoMethod_GetPInvoke

* [reflection] Use coop handles for ves_icall_MonoMethod_get_core_clr_security_level

* [reflection] Use coop handles for ves_icall_MonoMethod_get_name

7 years ago[sgen] Always use a context specialized gray stack
Vlad Brezae [Fri, 20 Jan 2017 15:02:36 +0000 (17:02 +0200)]
[sgen] Always use a context specialized gray stack

7 years ago[bcl] Rename FEATURE_MONO_CAS to MONO_FEATURE_CAS
Alexander Köplinger [Fri, 20 Jan 2017 15:00:56 +0000 (16:00 +0100)]
[bcl] Rename FEATURE_MONO_CAS to MONO_FEATURE_CAS

To be consistent with the other MONO_FEATURE_* defines.

7 years ago[runtime] Mono.Dynamic.Interpreter is no more, delete it from the list of assemblies...
Zoltan Varga [Fri, 20 Jan 2017 10:08:50 +0000 (05:08 -0500)]
[runtime] Mono.Dynamic.Interpreter is no more, delete it from the list of assemblies compiled by make fullaotcheck.

7 years ago[runtime] Fix locking issues while accessing MonoClass bitfields. (#4275)
Zoltan Varga [Fri, 20 Jan 2017 08:28:22 +0000 (03:28 -0500)]
[runtime] Fix locking issues while accessing MonoClass bitfields. (#4275)

7 years ago[System.Transactions] Add stubs and visibility fixes for netstandard20 APIs
Alexander Köplinger [Fri, 20 Jan 2017 02:06:05 +0000 (03:06 +0100)]
[System.Transactions] Add stubs and visibility fixes for netstandard20 APIs

7 years ago[runtime] Poll for interruption on cctor execution if mono_threads_end_abort_protecte...
Rodrigo Kumpera [Fri, 20 Jan 2017 02:04:46 +0000 (18:04 -0800)]
[runtime] Poll for interruption on cctor execution if mono_threads_end_abort_protected_block returns true.

7 years ago[runtime] Add new thread state INTERRUPT_REQUEST_DEFERRED to fix race with abort...
Rodrigo Kumpera [Fri, 20 Jan 2017 02:02:20 +0000 (18:02 -0800)]
[runtime] Add new thread state INTERRUPT_REQUEST_DEFERRED to fix race with abort protected blocks.

The way this works is that when we install a protected block, we change a interrupt requested to interrupt request deferred.
Then, when protected block count drops to zero, we switch back and inform the caller to poll for interrupts.

Additionally, when interrupting, we set it to deferred if there's a protected block in effect and it's not a self interrupt.

7 years ago[threading] Change mono_thread_try_resume_interruption to check for the abort thresho...
Rodrigo Kumpera [Fri, 20 Jan 2017 02:01:43 +0000 (18:01 -0800)]
[threading] Change mono_thread_try_resume_interruption to check for the abort threshold too.

7 years ago[runtime] Workaround in Environment::Exit icall in case current thread has an interru...
Rodrigo Kumpera [Fri, 20 Jan 2017 02:00:46 +0000 (18:00 -0800)]
[runtime] Workaround in Environment::Exit icall in case current thread has an interruption token installed. Tracked under bug #51653.

7 years ago[mono/tests] Use multiple return values to make it easy to pinpoint the failure.
Rodrigo Kumpera [Fri, 20 Jan 2017 01:59:16 +0000 (17:59 -0800)]
[mono/tests] Use multiple return values to make it easy to pinpoint the failure.

7 years agoFix memory leak when creating sequence points (#4273)
Michael DeRoy [Fri, 20 Jan 2017 00:28:47 +0000 (19:28 -0500)]
Fix memory leak when creating sequence points (#4273)

7 years ago[sgen] Always use one concurrent worker
Vlad Brezae [Tue, 18 Oct 2016 13:32:58 +0000 (16:32 +0300)]
[sgen] Always use one concurrent worker

We have the infrastructure to use multiple concurrent workers, but, in theory, this could starve the mutator threads. In the future, we should do additional research and consider using multiple concurrent workers.

7 years ago[sgen] Awaken workers if they are finished while there is work to steal
Vlad Brezae [Fri, 21 Oct 2016 14:46:08 +0000 (17:46 +0300)]
[sgen] Awaken workers if they are finished while there is work to steal

7 years ago[sgen] Use non-synchronized gray stack when only one worker is running
Vlad Brezae [Mon, 17 Oct 2016 10:20:12 +0000 (13:20 +0300)]
[sgen] Use non-synchronized gray stack when only one worker is running

7 years ago[sgen] Spread the initial roots of workers
Vlad Brezae [Fri, 21 Oct 2016 11:05:35 +0000 (14:05 +0300)]
[sgen] Spread the initial roots of workers

A parallel phase starts with enqueuing of jobs and of sections to the distribute gray queue. In order to have a good work distribution we split jobs into multiple smaller jobs. We now do the same with the initial gray queue sections, by trying to always have a minimum number of starting sections.

7 years ago[sgen] Worker gray queue stealing
Vlad Brezae [Fri, 14 Oct 2016 17:14:35 +0000 (20:14 +0300)]
[sgen] Worker gray queue stealing

When a worker is out of work, it tries to steal a section from the bottom of another workers' private gray queue. This operation takes a lock. Pushes/Pops done by the owner thread on its own private gray queue are done in lock free fashion, using membar/CAS (at section level).

7 years ago[sgen] Properly init the size of a new gray queue section
Vlad Brezae [Wed, 12 Oct 2016 10:57:46 +0000 (13:57 +0300)]
[sgen] Properly init the size of a new gray queue section

To avoid confusion

7 years ago[profiler] Fix vtune build
Vlad Brezae [Fri, 30 Sep 2016 09:38:25 +0000 (12:38 +0300)]
[profiler] Fix vtune build

7 years ago[sgen] Add worker index to the binary protocol entries
Vlad Brezae [Thu, 29 Sep 2016 11:30:15 +0000 (14:30 +0300)]
[sgen] Add worker index to the binary protocol entries

7 years ago[sgen] Clean exit if we can't read binprot file due to unsupported version
Vlad Brezae [Thu, 29 Sep 2016 10:36:08 +0000 (13:36 +0300)]
[sgen] Clean exit if we can't read binprot file due to unsupported version

7 years ago[sgen] Switch to nopar context when we are left with one worker
Vlad Brezae [Wed, 28 Sep 2016 23:16:06 +0000 (02:16 +0300)]
[sgen] Switch to nopar context when we are left with one worker

Non-parallel context is significantly faster since it doesn't require CAS-ing. Use it when we are left with only one worker so we don't regress performance.

7 years ago[sgen] Parallel mod union scan jobs
Vlad Brezae [Wed, 28 Sep 2016 13:59:34 +0000 (16:59 +0300)]
[sgen] Parallel mod union scan jobs

7 years ago[sgen] Avoid allocating mod union cardtables for los objects when scanning
Vlad Brezae [Thu, 19 Jan 2017 20:20:33 +0000 (22:20 +0200)]
[sgen] Avoid allocating mod union cardtables for los objects when scanning

We should consider doing the same when marking the mod union card table, if we have no cards to mark.

7 years ago[sgen] Remove unused function
Vlad Brezae [Wed, 28 Sep 2016 22:32:18 +0000 (01:32 +0300)]
[sgen] Remove unused function

7 years ago[sgen] Use parallel workers when finishing concurrent collections
Vlad Brezae [Tue, 27 Sep 2016 21:21:11 +0000 (00:21 +0300)]
[sgen] Use parallel workers when finishing concurrent collections

7 years ago[sgen] Make getting object size safe with parallel collector
Vlad Brezae [Thu, 20 Oct 2016 23:30:32 +0000 (02:30 +0300)]
[sgen] Make getting object size safe with parallel collector

7 years ago[sgen] Support cementing from multiple workers
Vlad Brezae [Wed, 28 Sep 2016 13:16:32 +0000 (16:16 +0300)]
[sgen] Support cementing from multiple workers

7 years ago[sgen] Disable concurrent queue redirection
Vlad Brezae [Wed, 28 Sep 2016 21:40:06 +0000 (00:40 +0300)]
[sgen] Disable concurrent queue redirection

We used to support the case where workers are running and when the main gc thread populates the redirected gray queue, these queue sections are moved to the workers distribute gray queue from where they are distributed to all the workers. In order to simplify the process, the main gc thread should never do any relevant gc work concurrently with the workers. This means that we no longer need to handle the above case.

7 years ago[sgen] Add parallel copying infrastructure
Vlad Brezae [Tue, 27 Sep 2016 14:48:22 +0000 (17:48 +0300)]
[sgen] Add parallel copying infrastructure

Parallel copying should happen only when the world is stopped and the gc thread is not running. Each thread allocates from its own block freelist, which he obtains by pop-ing the global block free list.

When a worker has to copy an object, it first allocates a new object in a major block and initialises its contents. Afterwards it tries to forward the vtable, using a CAS operation. If the vtable already contains a forwarded object, we just return the forwarded address, and the object that we allocated will be left to die (we expect this case to be extremely unlikely, otherwise we could re-enque the free object in its block's freelist).

After the copying is done, the caller has the duty to update references and mark the new object (which we have to do it also with a CAS).

FIXME : This means that an object can reside on a gray queue without being marked, so another thread can enque again this same object. We should refactor this copying/mark/enqueing mechansim to avoid these issues.

7 years ago[sgen] Add free lists for each workers
Vlad Brezae [Fri, 23 Sep 2016 12:31:35 +0000 (15:31 +0300)]
[sgen] Add free lists for each workers

These will be used for object allocation by the workers

7 years ago[sgen] Parallel precleaning of los objects
Vlad Brezae [Wed, 1 Jun 2016 19:32:12 +0000 (22:32 +0300)]
[sgen] Parallel precleaning of los objects

In the future we should consider splitting large objects.

7 years ago[sgen] Remove unused parameter
Vlad Brezae [Wed, 1 Jun 2016 18:23:46 +0000 (21:23 +0300)]
[sgen] Remove unused parameter

7 years ago[sgen] Parallel major blocks precleaning
Vlad Brezae [Tue, 31 May 2016 21:45:19 +0000 (00:45 +0300)]
[sgen] Parallel major blocks precleaning

We allow spliting a major_scan_cardtable into multiple smaller jobs. For precleaning, we enqueue num_workers precleaning jobs, each one precleaning one in every num_workers blocks from the list.

7 years ago[sgen] Split precleaning into multiple jobs
Vlad Brezae [Tue, 31 May 2016 22:28:25 +0000 (01:28 +0300)]
[sgen] Split precleaning into multiple jobs

7 years ago[sgen] Enqueue preclean through a worker finish callback
Vlad Brezae [Tue, 31 May 2016 20:55:41 +0000 (23:55 +0300)]
[sgen] Enqueue preclean through a worker finish callback

It moves enqueuing back to the main gc giving more flexibility.

7 years ago[sgen] Enable multiple workers
Vlad Brezae [Mon, 30 May 2016 04:34:04 +0000 (07:34 +0300)]
[sgen] Enable multiple workers

7 years ago[sgen] CAS on LOS marking
Vlad Brezae [Mon, 30 May 2016 04:13:13 +0000 (07:13 +0300)]
[sgen] CAS on LOS marking

We make sure we don't double enqueue a large object.

7 years ago[sgen] Add CAS object marking for concurrent workers
Vlad Brezae [Mon, 30 May 2016 02:02:17 +0000 (05:02 +0300)]
[sgen] Add CAS object marking for concurrent workers

When marking an object we need to make sure we are not unmarking other objects (since marking is stored as bits). This also allows us to make sure that we never enqueue the same object multiple times on separate gray queues.

7 years ago[sgen] Add separate scan/copy context for concurrent parallel configuration
Vlad Brezae [Mon, 30 May 2016 01:25:10 +0000 (04:25 +0300)]
[sgen] Add separate scan/copy context for concurrent parallel configuration

7 years ago[sgen] Use array with fixed-size element for mark words
Vlad Brezae [Fri, 27 May 2016 23:12:14 +0000 (02:12 +0300)]
[sgen] Use array with fixed-size element for mark words

There is no benefit in using pointer size element and we need to special case between architectures.

7 years ago[sgen] Support multiple workers
Vlad Brezae [Tue, 17 May 2016 17:24:06 +0000 (20:24 +0300)]
[sgen] Support multiple workers

7 years ago[runtime] Collapse interruption_requested and abort_protected_block_count into a...
Rodrigo Kumpera [Fri, 16 Dec 2016 01:58:32 +0000 (23:58 -0200)]
[runtime] Collapse interruption_requested and abort_protected_block_count into a single var.

This change doesn't change behavior.

7 years ago[sre] Use coop handles in parts of sre.c
Aleksey Kliger [Thu, 12 Jan 2017 15:36:21 +0000 (10:36 -0500)]
[sre] Use coop handles in parts of sre.c

* Convert ves_icall_RuntimeType_MakeGenericType to use handles.
* The above necessitates converting mono_reflection_bind_generic_parameters and
  mono_reflection_type_get_handle (renamed to
  mono_reflection_type_handle_mono_type) to use handles.
* From there we have to touch a lot of builder internals:
  - ves_icall_DynamicMethod_create_dynamic_method
  - ves_icall_ModuleBuilder_RegisterToken
  - ves_icall_ModuleBuilder_basic_init
  - ves_icall_ModuleBuilder_getMethodToken
  - ves_icall_ModuleBuilder_getToken
  - ves_icall_ModuleBuilder_getUSIndex
  - ves_icall_TypeBuilder_create_runtime_class
* As well as runtime functions
  - mono_image_insert_string
  - mono_image_create_token
  - mono_class_{get,has,set}_ref_info
  - mono_reflection_is_usertype
  - mono_dynimage_encode_reflection_sighelper
  - mono_dynamic_image_register_token

7 years agoAdd mdb2ppdb man page, remove prj2make man page
Miguel de Icaza [Thu, 19 Jan 2017 18:48:14 +0000 (13:48 -0500)]
Add mdb2ppdb man page, remove prj2make man page

7 years agoMerge pull request #4269 from kumpera/nuget-fixing-round2
Rodrigo Kumpera [Thu, 19 Jan 2017 18:26:54 +0000 (10:26 -0800)]
Merge pull request #4269 from kumpera/nuget-fixing-round2

[runtime] A pair of small fixes for the ignore assembly work.