Age | Commit message (Collapse) | Author |
|
|
|
* Remove the mark/reclaim events as they've been broken for a long time and
aren't particularly useful.
* Reorder the enum member declarations to the order they actually arrive in.
|
|
|
|
|
|
The purpose of this commit is to unify tls access across all platforms. We had tls information spread out throughout the entire code which was guarded with many defines/capabilities which made very hard to follow what was going on. Also this made switching between pthread and __thread very unstable since there were a lot of dependencies between different pieces of the tls infrastructure. Also it was not very clear what happens if one of the tls pieces failed.
Now we are moving all the tls variables to a single module that provides getters/setters and initialization API. Runtime code now knows that we can always access a tls variable (from managed code, we just do a nowrapper icall into the same global geters/setters). Even though we used to these type of calls all around before, it is worth mentioning that runtime should account for a thread to be in this type of unregistered code without m2n wrapper and no register jinfo.
On average this makes common tls intensive methods (m2n wrappers and managed allocator) 20% slower, with potential for more regression if we use tls getters/setters recklessly. As a consequence we will re-enable the most important pieces of fast tls code in the future.
|
|
This prevents possible STW deadlocks.
|
|
On musl __GLIBC__ is not defined, so the conditional logic will
not produce correct result. Add a specific case to handle when
__GLIBC__ is not defined.
|
|
If the C compiler decides not to inline the function, and it's not declared
static, it'll look for an extern version, and linking will fail.
|
|
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=40144
Tested on PowerPC by Mathieu Malaterre <malat@debian.org>.
|
|
With GCC 5.x, the compiler optimises away the dummy load used to
estimate the stack pointer address in GC_approx_sp; it returns
zero. This leads to segfaults when embedding Mono.
Instead, use __builtin_frame_address, which GCC's libgc uses for
the same purpose.
|
|
Remove ChangeLog files from the repo
|
|
|
|
Current Debian packaging puts libtool in its own package (libtool-bin)
leaving only libtoolize in the main package. The mono build process
uses libtoolize not libtool, so during autogen check for libtoolize
not libtool.
|
|
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
|
|
overwrite them.
|
|
Mono create_allocator accesses libgc private *_freelists directly.
These fields have been grouped together into struct
thread_local_freelists in BDWGC v7.
This commit does code refactoring to match the structure of external
GC regarding *_freelists.
* Move GRANULARITY, NFREELISTS (used by *_freelists) out of
GC_Thread_Rep.
* Move ptrfree_freelists, normal_freelists, gcj_freelists from
GC_Thread_Rep to struct thread_local_freelists.
* Add tlfs field (of type struct thread_local_freelists) to
GC_Thread_Rep.
* Update pthread_support.c and boehm-gc.c code accordingly.
|
|
Mono-specific libgc functionality has been recently added to BDWGC.
This commit changes API of included Boehm GC to match that of the
external GC.
* Renaming:
- GCEventType -> GC_EventType
- GC_get_restart_signal -> GC_get_thr_restart_signal
- GC_toggleref_register_callback -> GC_set_toggleref_func
- GC_set_finalizer_notify_proc -> GC_set_await_finalize_proc
* Replace global variable with a setter:
- GC_notify_event -> GC_set_on_collection_event() (acquires GC lock)
* Foreign threads registration:
- add GC_allow_register_threads() (no-op for GC v6, called by
mono_gc_base_init)
- add GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY, GC_UNIMPLEMENTED macros
- add struct GC_stack_base
- replace GC_thread_register_foreign(void*) with
GC_register_my_thread(struct GC_stack_base)
- define GC_register_my_thread also for Solaris and Win32
- GC_register_my_thread returns GC_DUPLICATE if already registered
* Toggle-ref callback declaration change:
- add GC_ToggleRefStatus (enum type)
- callback returns GC_ToggleRefStatus instead of int
* Toggle-ref addition status checked:
- GC_toggleref_add return type changed from void to int
- GC_toggleref_add returns GC_SUCCESS or GC_NO_MEMORY
- static ensure_toggleref_capacity() returns FALSE if GC MALLOC failed
- call g_error() if GC_toggleref_add failed
* Conditional public function declaration:
- wrap GC_DllMain declaration into ifdef GC_INSIDE_DLL
- define GC_INSIDE_DLL prior to include gc.h
|
|
This has not been supported for a while, so remove it.
|
|
Makefile defines GC_WIN32_THREADS as 1 but gc_config_macros was
redefining as defined but with no value.
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
|
|
|
|
GNU/kFreeBSD is an experimental OS provided by the Debian project, consisting
of a FreeBSD kernel and GNU userland/libc. For a small number of cases, this
offers advantages over a more common GNU/Linux combination, such as fast
in-kernel support for ZFS storage.
This patch changes various ifdefs, either using __FreeBSD_kernel__ where a
trait from the kernel is what matters, or __GLIBC__ where a trait from the
C library matters.
This patch set has been carried downstream, in one form or another, since
1.2.3.1-1.
https://bugzilla.novell.com/show_bug.cgi?id=321634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
../../libgc/alloc.c: In function ‘GC_stopped_mark’:
../../libgc/alloc.c:501:9: error: implicit declaration of function ‘GC_cond_register_dynamic_libraries’ [-Werror=implicit-function-declaration]
GC_cond_register_dynamic_libraries();
|
|
Replace GC_free with GC_INTERNAL_FREE. The former might take the GC lock
and deadlock us.
Replace GC_INTERNAL_MALLOC with GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE as
we don't need the rest of the GC messing around with the toggleref array.
|
|
sgen code, so keep them in sync.
|
|
|
|
|
|
|
|
|
|
This is to ensure that if the runtime is compiled for e.g.
ARM v4 or v5, it will use the correct atomics on v6 and v7.
|
|
This only worked by accident before the HAVE_ARMV<N>
changes because __ARM_ARCH_6__ is never defined by
any compiler.
|
|
This defines ARM_VERSION_{5,6,7}. Several of these can be
defined at once. For example ARM_VERSION_5 and ARM_VERSION_6
will both be defined if the target is an ARM v6 CPU.
Previously, we defined HAVE_ARMV6 based on running a program.
This obviously didn't work for cross-compilation. This new
approach does, and detects more cases (v5, v6, v7) than the
previous check (v6).
|
|
|
|
https://github.com/igotti-google/mono/commit/65d8d68e8c81cf6adb1076de7a9425c84cab86a3.
|
|
dlopen
mini-s390x.c - Add profiling support to prolog/epilog instrumentation
|
|
|
|
- fix compile/runtime issues caused by upstream changes
- add NaCl glibc support
- various changes to support running tests in NaCl glibc
from 'make check'
|
|
- inline managed code implementation
(add x86 test mem imm8 codegen macro for this as well)
- clean up libgc NaCl code
- centralize mono_nacl_gc into mini.c
|
|
PPC build fixes
|
|
Cross-compiling mono on an OS X host for a Windows target using
mingw-w64 fails because of undefined __int64 types in a couple of places.
Including <stdint.h> fixes this and allows the OS X host to cross-compile
a Windows mono.
It probably sounds like an obscure use-case, but the wine-mono
project does just this, so ability to cross-compile for Windows on OS X
is crucial to being able to build wine-mono on a Mac.
|
|
Debian's GCC 4.4 in particular does not compile the PPC assembly.
|
|
* gc.h: Added parts of boehm 7.3a long link API.
* finalize.c (GC_finalize): Implemented long link support by adapting
code from boehm 7.3a.
The idea is to have two table of links, one for regular and another
for the long links. Regular links are processed before finalization
and the long ones right after. The bulk of the changes are abstracting
the disappearing link hashtable into a data structure so we can have
two of them.
Boehm code came from github.com/ivmai/bdwgc.git. Authors of the
relevant changes are Zach Saw and Ivan Maidanski.
|
|
|