mono.git
7 years agoRewrite of Windows x64 value type ABI to support DirectX wrapper libraries.
lateralusX [Thu, 14 Jul 2016 11:27:44 +0000 (13:27 +0200)]
Rewrite of Windows x64 value type ABI to support DirectX wrapper libraries.

Current implementation used different value type ABI’s depending on if call
was a managed->native, native->managed or managed->managed call. The implementation
was also overcomplicated since it was a tweaked copy from System V x64 value type
ABI with scenarios and conditions that wouldn’t apply to the Windows x64 value
type ABI. Having a uniform value type ABI when possible regardless of managed->native,
native->managed or managed->managed calls simplifies scenarios and reduce complexity.

While all the above are legitimate reasons the primary driving factor behind
the rewrite was a different issue. There are .NET wrapper libraries around DirectX API
used by game engines and other libraries that uses a pattern using a call into a stub
managed method that gets patched directly in the MSIL to a calli that will end up in a
native DirectX vtable method. In current ABI we can’t detect scenario like this, so arguments
are passed as if the call was a managed->managed call causing issues for value types. Since DirectX
uses value types a lot (vectors, matrixes etc.), this was a blocker getting these technologies
running on Windows using DirectX at all. Another approach could be to change the behavior of the
library, but this would require a major redesign of the library and since several of these libraries
are mature, that wasn’t a realistic option, especially since MS .NET runtime handles the libraries as is
without modifications.

The rewrite makes sure Windows x64 value type ABI follow the platform value type ABI in all scenarios.

7 years agoMerge pull request #3279 from xmcclure/tarjan-crash-2
Andi McClure [Thu, 14 Jul 2016 16:28:03 +0000 (12:28 -0400)]
Merge pull request #3279 from xmcclure/tarjan-crash-2

Re-allow bridge callbacks to be set after GC init

7 years ago[llvm] Implement some SIMD opcodes using LLVM IR instead of calling an llvm intrinsics.
Zoltan Varga [Thu, 14 Jul 2016 16:24:22 +0000 (12:24 -0400)]
[llvm] Implement some SIMD opcodes using LLVM IR instead of calling an llvm intrinsics.

7 years agoMerge pull request #3281 from lambdageek/dev/g-ptr-array
Aleksey Kliger (λgeek) [Thu, 14 Jul 2016 15:32:58 +0000 (11:32 -0400)]
Merge pull request #3281 from lambdageek/dev/g-ptr-array

[reflection] RuntimeType Field and Method search partly in managed

7 years ago[Facades] Remove wrong private facade
Marek Safar [Thu, 14 Jul 2016 12:23:46 +0000 (14:23 +0200)]
[Facades] Remove wrong private facade

7 years agoMerge pull request #3276 from esdrubal/access_token_move
Marcos Henrich [Thu, 14 Jul 2016 09:27:19 +0000 (10:27 +0100)]
Merge pull request #3276 from esdrubal/access_token_move

[corlib] Replaced SafeAccessTokenHandle.cs with ref source.

7 years ago[mcs] Add missing error message argument
Marek Safar [Thu, 14 Jul 2016 06:38:13 +0000 (08:38 +0200)]
[mcs] Add missing error message argument

7 years ago[bcl] Include all facade directories in the tarball
Alexander Köplinger [Wed, 13 Jul 2016 23:50:54 +0000 (01:50 +0200)]
[bcl] Include all facade directories in the tarball

net_4_x_PARALLEL_SUBDIRS doesn't implicitly include all facades anymore after 10c5e7251252be4466c4909310fe19b863266784.

7 years ago[reflection] Managed RuntimeType.GetConstructors_internal
Aleksey Kliger [Wed, 13 Jul 2016 22:22:40 +0000 (18:22 -0400)]
[reflection] Managed RuntimeType.GetConstructors_internal

7 years ago[Facades] Update list of full assemblies
Marek Safar [Wed, 13 Jul 2016 22:13:03 +0000 (00:13 +0200)]
[Facades] Update list of full assemblies

7 years ago[reflection] RuntimeType.GetMethodsByName in managed
Aleksey Kliger [Wed, 13 Jul 2016 19:51:48 +0000 (15:51 -0400)]
[reflection] RuntimeType.GetMethodsByName in managed

Also:
  1. MethodBase.GetMethodFromHandleInternalType_native icall
  2. reimplemented the other MethodBase GetMethodFromHandleXXX methods
  in terms of this new icall.
  3. MonoError-ize mono_class_get_methods_by_name

7 years ago[reflection] Managed version of RuntimeType.GetFields_internal
Aleksey Kliger [Wed, 13 Jul 2016 17:37:34 +0000 (13:37 -0400)]
[reflection] Managed version of RuntimeType.GetFields_internal

7 years agoBack out pending_bridge_callbacks_mutex in previous commit
Andi McClure [Wed, 13 Jul 2016 19:49:04 +0000 (15:49 -0400)]
Back out pending_bridge_callbacks_mutex in previous commit

The mutex on pending_bridge_callbacks was overkill because the init
model for the mono runtime already enforces the callbacks being set on
the init thread. Added a couple comments to formalize this.

7 years agoMerge pull request #3240 from alexanderkyte/aot_compiler_leaks
Zoltan Varga [Wed, 13 Jul 2016 19:03:14 +0000 (15:03 -0400)]
Merge pull request #3240 from alexanderkyte/aot_compiler_leaks

[runtime] Fix aot compiler leaks

7 years agoMerge pull request #3248 from esdrubal/web_request_abort
Marcos Henrich [Wed, 13 Jul 2016 16:41:22 +0000 (17:41 +0100)]
Merge pull request #3248 from esdrubal/web_request_abort

[System] EndRead now throws WebException on abort.

7 years agoMerge pull request #3268 from esdrubal/mono-sym-enable
Marcos Henrich [Wed, 13 Jul 2016 16:27:02 +0000 (17:27 +0100)]
Merge pull request #3268 from esdrubal/mono-sym-enable

[runtime] Enable compact seq point by default

7 years ago[corlib] Replaced SafeAccessTokenHandle.cs with ref source.
Marcos Henrich [Wed, 13 Jul 2016 16:24:37 +0000 (17:24 +0100)]
[corlib] Replaced SafeAccessTokenHandle.cs with ref source.

7 years ago[corlib] Add Mono.SafeGPtrArrayHandle
Aleksey Kliger [Tue, 12 Jul 2016 20:59:41 +0000 (16:59 -0400)]
[corlib] Add Mono.SafeGPtrArrayHandle

Wrap a GPtrArrayHandle struct in a safe handle that will free the
native resource after we're done.

7 years ago[corlib] Mono.RuntimeStructs.GPtrArray
Aleksey Kliger [Tue, 12 Jul 2016 20:20:56 +0000 (16:20 -0400)]
[corlib] Mono.RuntimeStructs.GPtrArray

and corresponding Mono.RuntimeGPtrArrayHandle
reflecting native GPtrArray struct in managed code.

7 years ago[reflection] Switch ves_icall_RuntimeType_GetFields_internal to GPtrArray
Aleksey Kliger [Tue, 12 Jul 2016 22:43:54 +0000 (18:43 -0400)]
[reflection] Switch ves_icall_RuntimeType_GetFields_internal to GPtrArray

instead of MonoPtrArray.  Next step is to return the GPtrArray to
managed code, so using a stack allocated array won't work anymore.

7 years ago[logging] Default to stdout if MONO_LOG_DEST is unset (#3272)
Aleksey Kliger (λgeek) [Wed, 13 Jul 2016 15:21:01 +0000 (11:21 -0400)]
[logging] Default to stdout if MONO_LOG_DEST is unset (#3272)

Follow up to e70a8aca1cd575582459db406ab3410e53074b73, do what the man
page says and default to stdout if MONO_LOG_DEST isn't specified.

7 years agoMerge pull request #3254 from mono/netstandard
Marek Safar [Wed, 13 Jul 2016 11:30:34 +0000 (13:30 +0200)]
Merge pull request #3254 from mono/netstandard

[bcl] netstandard 1.6 support

7 years ago[runtime] Added gen-seq-points-file= deprecated option
Marcos Henrich [Wed, 13 Jul 2016 10:17:36 +0000 (11:17 +0100)]
[runtime] Added gen-seq-points-file= deprecated option

Added gen-seq-points-file= back with deprecated message to avoid crashes
in application still using it.

7 years ago[runtime] Enable compact seq point by default
Marcos Henrich [Tue, 12 Jul 2016 16:31:22 +0000 (17:31 +0100)]
[runtime] Enable compact seq point by default

Enable compact seq points by default so that the stack trace have IL
offsets instead os native ones.

This changes will allow any stacktrace generated from now on to be
symbolicated using mono-symbolicate.

Deprecates options gen-compact-seq-points.

7 years ago[bcl] netstandart 1.6 support
Marek Safar [Wed, 13 Jul 2016 08:52:19 +0000 (10:52 +0200)]
[bcl] netstandart 1.6 support

7 years ago[mono-api-html] Add option to ignore breaking changes
Mikayla Hutchinson [Wed, 6 Jul 2016 18:00:04 +0000 (14:00 -0400)]
[mono-api-html] Add option to ignore breaking changes

7 years agoAllow bridge callbacks to be set after GC init
Andi McClure [Tue, 12 Jul 2016 22:31:58 +0000 (18:31 -0400)]
Allow bridge callbacks to be set after GC init

This is cleanup to the previous emergency fix for bug 42469. The goal of that fix was to defer bridge processor initialization until after sgen init, but it introduced a requirement mono_gc_register_bridge_callback be called before sgen init. This breaks Xamarin Designer, which sets up callbacks late.

This patch introduces an sgen_init_bridge () which is called both at startup and after callbacks are set, and performs the initialization once all pieces are in place. Additional concurrency and style issues are also addressed.

7 years agoMerge pull request #3224 from ludovic-henry/iolayer-extract-wait-handle
Ludovic Henry [Tue, 12 Jul 2016 21:00:28 +0000 (23:00 +0200)]
Merge pull request #3224 from ludovic-henry/iolayer-extract-wait-handle

[io-layer] Extract handle lifetime + waiting + signalling to utils

7 years ago[aot] Fixes strip tool invocation in to wrap paths in AOT compilation.
João Matos [Tue, 12 Jul 2016 15:59:26 +0000 (16:59 +0100)]
[aot] Fixes strip tool invocation in to wrap paths in AOT compilation.

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

7 years agoFix windows build after 162f843968caf500ab09ea7176691e67334d416f
Aleksey Kliger [Tue, 12 Jul 2016 16:10:07 +0000 (12:10 -0400)]
Fix windows build after 162f843968caf500ab09ea7176691e67334d416f

7 years ago[corlib] Rewrite RuntimeType.GetGenericParameterConstraints (#3260)
Aleksey Kliger (λgeek) [Tue, 12 Jul 2016 15:16:59 +0000 (11:16 -0400)]
[corlib] Rewrite RuntimeType.GetGenericParameterConstraints (#3260)

* [corlib] Rewrite RuntimeType.GetGenericParameterConstraints

using managed code for managed object manipulation by surfacing the
native MonoGenericParamInfo struct to managed code as Mono.RuntimeStructs.GenericParamInfo

* [corlib] RuntimeType::GetGenericParameterAttributes can be managed code now.

* [corlib] Fix x86 breakage

RuntimeTypeHandle.GetGenericParameterInfo returns a pointer
Not a struct that's the same size as a pointer.  On the x86 Linux
calling convention they behave differently.

7 years agoMerge pull request #3265 from xmcclure/tarjan-crash
Andi McClure [Tue, 12 Jul 2016 15:11:46 +0000 (11:11 -0400)]
Merge pull request #3265 from xmcclure/tarjan-crash

Defer bridge processor init until after sgen init, fixing crash (bug 42469)

7 years ago[amd64] Reorganize add_valuetype () to make it easier to use the platform calling...
Zoltan Varga [Tue, 12 Jul 2016 13:34:41 +0000 (09:34 -0400)]
[amd64] Reorganize add_valuetype () to make it easier to use the platform calling convention for managed code as well. Implement dyncall support for passing/returning vtypes in registers.

7 years ago[io-layer] Move handles out of the io-layer to utils/w32handle
Ludovic Henry [Wed, 6 Jul 2016 10:10:25 +0000 (12:10 +0200)]
[io-layer] Move handles out of the io-layer to utils/w32handle

7 years ago[io-layer] Inline init_handles_slot
Ludovic Henry [Mon, 4 Jul 2016 16:28:44 +0000 (18:28 +0200)]
[io-layer] Inline init_handles_slot

7 years ago[io-layer] Replace _WAPI_PRIVATE_HANDLES and _WAPI_PRIVATE_HAVE_SLOT by _wapi_handle_...
Ludovic Henry [Mon, 4 Jul 2016 15:18:02 +0000 (17:18 +0200)]
[io-layer] Replace _WAPI_PRIVATE_HANDLES and _WAPI_PRIVATE_HAVE_SLOT by _wapi_handle_lookup_data

7 years ago[io-layer] Remove any remaining dependency of handles.c on other parts of the io...
Ludovic Henry [Fri, 1 Jul 2016 11:35:12 +0000 (13:35 +0200)]
[io-layer] Remove any remaining dependency of handles.c on other parts of the io-layer

7 years ago[io-layer] Replace _WAPI_HANDLE_INVALID by INVALID_HANDLE_VALUE
Ludovic Henry [Fri, 1 Jul 2016 11:41:58 +0000 (13:41 +0200)]
[io-layer] Replace _WAPI_HANDLE_INVALID by INVALID_HANDLE_VALUE

7 years ago[io-layer] Remove wapi_getdtablesize
Ludovic Henry [Fri, 1 Jul 2016 11:37:18 +0000 (13:37 +0200)]
[io-layer] Remove wapi_getdtablesize

7 years ago[io-layer] Move DuplicateHandle and CloseHandle to wapi.c
Ludovic Henry [Fri, 1 Jul 2016 11:34:25 +0000 (13:34 +0200)]
[io-layer] Move DuplicateHandle and CloseHandle to wapi.c

7 years ago[io-layer] Remove use of _wapi_has_shut_down
Ludovic Henry [Fri, 1 Jul 2016 11:33:50 +0000 (13:33 +0200)]
[io-layer] Remove use of _wapi_has_shut_down

7 years ago[io-layer] Remove unnecessary locking of _WAPI_SHARED_SEM_FILESHARE
Ludovic Henry [Mon, 4 Jul 2016 11:00:31 +0000 (13:00 +0200)]
[io-layer] Remove unnecessary locking of _WAPI_SHARED_SEM_FILESHARE

7 years ago[io-layer] Move _wapi_handle_spin to handles.c
Ludovic Henry [Mon, 11 Jul 2016 20:31:52 +0000 (22:31 +0200)]
[io-layer] Move _wapi_handle_spin to handles.c

7 years ago[io-layer] Move _WAPI_FD_HANDLE, _WAPI_SHARED_NAMESPACE and _WAPI_HANDLE_INVALID...
Ludovic Henry [Fri, 1 Jul 2016 11:27:46 +0000 (13:27 +0200)]
[io-layer] Move _WAPI_FD_HANDLE, _WAPI_SHARED_NAMESPACE and _WAPI_HANDLE_INVALID to handles-private.h

7 years ago[io-layer] Remove pseudo global handle
Ludovic Henry [Thu, 30 Jun 2016 17:50:20 +0000 (19:50 +0200)]
[io-layer] Remove pseudo global handle

7 years ago[io-layer] Allocate WapiHandle specific data on the heap
Ludovic Henry [Thu, 30 Jun 2016 17:45:58 +0000 (19:45 +0200)]
[io-layer] Allocate WapiHandle specific data on the heap

7 years ago[io-layer] Register WapiHandleOps dynamically
Ludovic Henry [Thu, 30 Jun 2016 16:05:33 +0000 (18:05 +0200)]
[io-layer] Register WapiHandleOps dynamically

7 years ago[io-layer] Move WapiHandleType and WapiHandleOps to handles-private.h
Ludovic Henry [Thu, 30 Jun 2016 15:37:49 +0000 (17:37 +0200)]
[io-layer] Move WapiHandleType and WapiHandleOps to handles-private.h

7 years ago[io-layer] Extract _wapi_search_handle_namespace from handles.c
Ludovic Henry [Thu, 30 Jun 2016 15:08:30 +0000 (17:08 +0200)]
[io-layer] Extract _wapi_search_handle_namespace from handles.c

7 years ago[io-layer] Add typename and typesize handle operations
Ludovic Henry [Thu, 30 Jun 2016 14:37:32 +0000 (16:37 +0200)]
[io-layer] Add typename and typesize handle operations

7 years ago[io-layer] Move _wapi_getpid out of handles.c
Ludovic Henry [Thu, 30 Jun 2016 13:45:36 +0000 (15:45 +0200)]
[io-layer] Move _wapi_getpid out of handles.c

7 years ago[io-layer] Add details operation on handle
Ludovic Henry [Thu, 30 Jun 2016 13:36:52 +0000 (15:36 +0200)]
[io-layer] Add details operation on handle

7 years ago[io-layer] Move io-layer initialization out of handles.c
Ludovic Henry [Thu, 30 Jun 2016 12:49:08 +0000 (14:49 +0200)]
[io-layer] Move io-layer initialization out of handles.c

7 years ago[io-layer] Move file_share_hash to io.c
Ludovic Henry [Thu, 30 Jun 2016 12:36:44 +0000 (14:36 +0200)]
[io-layer] Move file_share_hash to io.c

7 years ago[io-layer] Remove empty function _wapi_shm_semaphores_remove
Ludovic Henry [Thu, 30 Jun 2016 12:25:26 +0000 (14:25 +0200)]
[io-layer] Remove empty function _wapi_shm_semaphores_remove

7 years ago[io-layer] Remove unused _wapi_sem_id
Ludovic Henry [Thu, 30 Jun 2016 12:07:04 +0000 (14:07 +0200)]
[io-layer] Remove unused _wapi_sem_id

7 years ago[io-layer] Extract WapiHandleBase from _WapiHandleUnshared
Ludovic Henry [Thu, 30 Jun 2016 10:30:36 +0000 (12:30 +0200)]
[io-layer] Extract WapiHandleBase from _WapiHandleUnshared

7 years ago[io-layer] Make _WAPI_PRIVATE_MAX_SLOTS and _WAPI_HANDLE_INITIAL_COUNT definition...
Ludovic Henry [Thu, 30 Jun 2016 10:08:29 +0000 (12:08 +0200)]
[io-layer] Make _WAPI_PRIVATE_MAX_SLOTS and _WAPI_HANDLE_INITIAL_COUNT definition private

7 years ago[io-layer] Make _wapi_global_signal_handle definition private
Ludovic Henry [Thu, 30 Jun 2016 10:05:56 +0000 (12:05 +0200)]
[io-layer] Make _wapi_global_signal_handle definition private

7 years ago[io-layer] Make _WapiHandleUnshared definition private
Ludovic Henry [Mon, 27 Jun 2016 12:37:12 +0000 (14:37 +0200)]
[io-layer] Make _WapiHandleUnshared definition private

7 years ago[io-layer] Factor Mutex and NamedMutex code
Ludovic Henry [Mon, 27 Jun 2016 10:37:52 +0000 (12:37 +0200)]
[io-layer] Factor Mutex and NamedMutex code

7 years ago[io-layer] Factor Semaphore and NamedSemaphore code
Ludovic Henry [Fri, 24 Jun 2016 22:18:33 +0000 (00:18 +0200)]
[io-layer] Factor Semaphore and NamedSemaphore code

7 years ago[io-layer] Factor Event and NamedEvent code
Ludovic Henry [Fri, 24 Jun 2016 19:21:46 +0000 (21:21 +0200)]
[io-layer] Factor Event and NamedEvent code

7 years ago[io-layer] Make named handle use their equivalent non-named handle
Ludovic Henry [Fri, 24 Jun 2016 18:50:50 +0000 (20:50 +0200)]
[io-layer] Make named handle use their equivalent non-named handle

7 years agoMerge pull request #3267 from lateralusX/jlorenss/fix-win-build-missing-exports
Alexander Köplinger [Tue, 12 Jul 2016 08:48:23 +0000 (10:48 +0200)]
Merge pull request #3267 from lateralusX/jlorenss/fix-win-build-missing-exports

Fix windows build issue due to missing export in def files.

7 years agoFix windows build issue due to missing export in def files.
lateralusX [Tue, 12 Jul 2016 07:24:38 +0000 (09:24 +0200)]
Fix windows build issue due to missing export in def files.

7 years ago[runtime] Make mono_thread_resume_interruption () work during shutdown as well by...
Zoltan Varga [Tue, 12 Jul 2016 03:46:01 +0000 (23:46 -0400)]
[runtime] Make mono_thread_resume_interruption () work during shutdown as well by checking for ThreadState_StopRequested as well. Hopefully fixes #41644.

7 years agoDefer bridge processor init until after sgen init (bug 42469)
Andi McClure [Mon, 11 Jul 2016 21:51:56 +0000 (17:51 -0400)]
Defer bridge processor init until after sgen init (bug 42469)

mono_gc_register_bridge_callbacks is a function which the android implementation calls before initializing the runtime. One of the things this function previously did was initialize the default bridge processor if none has been initialized yet. However, because the function gets called before initializing the runtime, a bridge processor was never initialized. This lead to two bad effects:

- If a bridge processor was ever manually specified, the bridge processor would get initialized twice
- Tarjan crashes if initialized before sgen, so when Tarjan became the default bridge processor Android always crashed on launch

The default bridge processor is now initialized at the end of sgen_gc_init.

7 years agoMore verbose error message when sgen_register_fixed_internal_mem_type fails
Andi McClure [Mon, 11 Jul 2016 21:51:36 +0000 (17:51 -0400)]
More verbose error message when sgen_register_fixed_internal_mem_type fails

7 years agoFix Windows build
Aleksey Kliger [Mon, 11 Jul 2016 20:16:33 +0000 (16:16 -0400)]
Fix Windows build

7 years ago[runtime] Add mono_set_allocator_vtable which expose the eglib alloc vtable functiona...
Rodrigo Kumpera [Mon, 11 Jul 2016 17:23:06 +0000 (13:23 -0400)]
[runtime] Add mono_set_allocator_vtable which expose the eglib alloc vtable functionality.

7 years agoFixed up configure overridable allocators option. Moved g_vasprintf implementation...
Dolphin Hawkins [Tue, 5 Jul 2016 20:49:05 +0000 (13:49 -0700)]
Fixed up configure overridable allocators option. Moved g_vasprintf implementation to gstr which forwards to the system vasprintf when appropriate

7 years agoFixed eglib test build error
Dolphin Hawkins [Wed, 22 Jun 2016 21:31:05 +0000 (14:31 -0700)]
Fixed eglib test build error

7 years agofixed formatting error
Dolphin Hawkins [Wed, 22 Jun 2016 21:21:46 +0000 (14:21 -0700)]
fixed formatting error

7 years agoEnabled g_mem_set_vtable through the configure option --with-overridable-allocators...
Dolphin Hawkins [Wed, 22 Jun 2016 16:49:12 +0000 (09:49 -0700)]
Enabled g_mem_set_vtable through the configure option --with-overridable-allocators and exposed through mono_set_allocator_vtable

7 years ago[eglib] Fix Windows build
Alexander Köplinger [Mon, 11 Jul 2016 10:10:00 +0000 (12:10 +0200)]
[eglib] Fix Windows build

7 years ago[eglib] Fix compilation on Windows after 3bebb7696e
Alexander Köplinger [Mon, 11 Jul 2016 09:31:29 +0000 (11:31 +0200)]
[eglib] Fix compilation on Windows after 3bebb7696e

eglib uses G_OS_WIN32 instead of HOST_WIN32 for the Windows-specific code.

7 years agoFix tarball/package build that was broken by 0a8d5a08
Alexander Köplinger [Sun, 10 Jul 2016 23:00:33 +0000 (01:00 +0200)]
Fix tarball/package build that was broken by 0a8d5a08

The new header file wasn't included in the tarball.

7 years agoMerge pull request #3192 from esdrubal/sym-spec
Marcos Henrich [Fri, 8 Jul 2016 21:51:36 +0000 (22:51 +0100)]
Merge pull request #3192 from esdrubal/sym-spec

mono-symbolicate spec implementation

7 years agoMerge pull request #3252 from xmcclure/tarjan-opt-basic
Andi McClure [Fri, 8 Jul 2016 21:51:02 +0000 (17:51 -0400)]
Merge pull request #3252 from xmcclure/tarjan-opt-basic

Cleanup on gc bridge to support future optimizations

7 years ago[mono-symbolicate] Use Mono.Options.
Marcos Henrich [Fri, 8 Jul 2016 13:12:55 +0000 (14:12 +0100)]
[mono-symbolicate] Use Mono.Options.

7 years ago[corlib] Lowercase and no '-' in metadata guids.
Marcos Henrich [Fri, 8 Jul 2016 10:32:20 +0000 (11:32 +0100)]
[corlib] Lowercase and no '-' in metadata guids.

MVID and AOTID stacktrace metadata no longer displays guids with '-'.

Metadata is now also using lowercase instead of uppercase.

Changed mono-symbolicate and mono --aot to use the minimalistic GUIDs.

7 years ago[corlib] StackTrace fixes.
Marcos Henrich [Thu, 7 Jul 2016 16:57:04 +0000 (17:57 +0100)]
[corlib] StackTrace fixes.

Replaced static constructor with delayed initialization.

Fixed possible undeterministic order of dumped MVIDs.

Used AppendFormat when possible.

Added comment to StackTrace.AddMetadataHandler explaining that it can be
used with reflection by outside code, to avoid removing it or changing
its signature.

Added StringComparer.Ordinal to dictionary.

7 years agoCleanup on gc bridge to support future optimizations
Andi McClure [Fri, 8 Jul 2016 21:40:58 +0000 (17:40 -0400)]
Cleanup on gc bridge to support future optimizations

Consists mostly of
- Comments
- Consolidate duplicate dynarray implementations in new-bridge and
  tarjan-bridge into a single header full of statics

7 years ago[corlib] Ignore metadata on stacktrace tests
Marcos Henrich [Tue, 5 Jul 2016 17:10:06 +0000 (18:10 +0100)]
[corlib] Ignore metadata on stacktrace tests

StackTrace tests no longer fail with stacktrace metadata.

7 years ago[corlib] Add Metadata to inner exceptions.
Marcos Henrich [Tue, 5 Jul 2016 16:53:37 +0000 (17:53 +0100)]
[corlib] Add Metadata to inner exceptions.

7 years ago[corlib] Skip MVID of stackframes without method.
Marcos Henrich [Mon, 4 Jul 2016 10:02:16 +0000 (11:02 +0100)]
[corlib] Skip MVID of stackframes without method.

Fixes NRE caused by stackframes without any method assigned to them.

7 years ago[corlib] GetAotId now returns null, if unavailable
Marcos Henrich [Thu, 30 Jun 2016 11:17:37 +0000 (12:17 +0100)]
[corlib] GetAotId now returns null, if unavailable

Also fixes issue when mono_domain still doesn't have any executing
assembly set.

7 years ago[mono-symbolicate] Improved Makefile
Marcos Henrich [Tue, 21 Jun 2016 10:31:29 +0000 (11:31 +0100)]
[mono-symbolicate] Improved Makefile

Makefile now stores managed assemblies into the msym dir.

Each test now uses a separate directory to store stacktraces outputs and
symbols.

7 years ago[runtime] AOTID is now properly stored.
Marcos Henrich [Tue, 21 Jun 2016 10:36:29 +0000 (11:36 +0100)]
[runtime] AOTID is now properly stored.

7 years ago[mono-symbolicate] Fixes last stacktrace issue.
Marcos Henrich [Tue, 21 Jun 2016 10:32:16 +0000 (11:32 +0100)]
[mono-symbolicate] Fixes last stacktrace issue.

Extracted Symbolicate.Process stacktrace dump logic into DumpStackTrace
method. Which can also be used to dump the last stack trace after the
process loop.

7 years ago[mono-symbolicate] Fixes symbolication of AOTed
Marcos Henrich [Tue, 21 Jun 2016 10:26:57 +0000 (11:26 +0100)]
[mono-symbolicate] Fixes symbolication of AOTed

Sequence points are only required if native offsets are on the
stacktrace.

fix -- seq point info aot

7 years ago[mono-symbolicate] Adds store-symbols
Marcos Henrich [Tue, 21 Jun 2016 10:20:26 +0000 (11:20 +0100)]
[mono-symbolicate] Adds store-symbols

mono-symbolicate can now be called:
   symbolicate store-symbols <msym dir> [<dir>]+

This will store in <msym dir> all the managed symbols found in the
provided directories.

7 years ago[mono-symbolicate] Implemented metadata parsing.
Marcos Henrich [Thu, 9 Jun 2016 14:10:18 +0000 (15:10 +0100)]
[mono-symbolicate] Implemented metadata parsing.

mono-symbolicate now parses stack traces with metadata at their end.

All the stack trace and metada are read, so that symbolicate can use
MVID and AOTID to retrieve the symbols from the msym directory..

7 years ago[runtime] Added aot=msym-dir=<DIR>
Marcos Henrich [Tue, 31 May 2016 16:37:42 +0000 (17:37 +0100)]
[runtime] Added aot=msym-dir=<DIR>

Removed gen-seq-points-file.
.msym files are now stored into a a subfolder of the provided msym-dir.
The subfolder of each .msym are named as AOTID.

7 years ago[runtime] aot-compiler.c now stores AOTID in image
Marcos Henrich [Tue, 31 May 2016 16:34:45 +0000 (17:34 +0100)]
[runtime] aot-compiler.c now stores AOTID in image

AOTID is now also displayed during compilation.

7 years agoMoved ensure_directory_exists to eglib.
Marcos Henrich [Tue, 31 May 2016 16:28:28 +0000 (17:28 +0100)]
Moved ensure_directory_exists to eglib.

Moved ensure_directory_exists in apdomain.c to g_ensure_directory_exists
in eglib/src/gpath.c so it can be reused.

7 years ago[corlib] Added MVID metadata to StackTrace
Marcos Henrich [Fri, 20 May 2016 11:14:27 +0000 (12:14 +0100)]
[corlib] Added MVID metadata to StackTrace

The MVID metadata handler displays multiple MVID(s) followed by the
 comma separated list of StackFrame lines whose method belongs to the
module with the displayed MVID.

7 years ago[corlib] Added metadata handlers to StackTrace
Marcos Henrich [Fri, 20 May 2016 11:03:46 +0000 (12:03 +0100)]
[corlib] Added metadata handlers to StackTrace

Added a reflectable static method that can be used to customize data
displayed after a stack trace.

Added metadata handler that display the AOTID of the executing assembly.

7 years ago[corlib] Added icall Assembly.GetAotId
Marcos Henrich [Fri, 20 May 2016 10:54:59 +0000 (11:54 +0100)]
[corlib] Added icall Assembly.GetAotId