Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libgc
AgeCommit message (Collapse)Author
2019-07-31Fix some compiler warnings for Win32/mingw64 build (#15903)Nikolay Sivov
* [mono] Fix unused variable warning in mono_config_parse(). * [ligc] Fix strict prototype warning for Win32 build. * Add some casts.
2019-07-08Remove some unused third party code. (#15475)Jay Krell
i.e. C++ helpers for Boehm GC.
2018-12-05Fix more warnings. (#11853)Jay Krell
This isn't correct for Win64 but that should be ok. It is correct for all other platforms. /s/mono/mono/sgen/sgen-memory-governor.c:309:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->promoted_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:310:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->major_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:311:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->major_size_in_use / 1024, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:312:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:313:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size_in_use / 1024); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:321:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:322:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size_in_use / 1024); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:332:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:333:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->los_size_in_use / 1024); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:337:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->major_size / 1024, ^~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/sgen/sgen-memory-governor.c:338:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat] entry->major_size_in_use / 1024); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /s/mono/mono/metadata/w32file-unix.c:4688:1: warning: no previous prototype for function 'ves_icall_System_IO_DriveInfo_GetDriveType' [-Wmissing-prototypes] ves_icall_System_IO_DriveInfo_GetDriveType (const gunichar2 *root_path_name, gint32 root_path_name_length, MonoError *error) ^ /s/mono/mono/metadata/remoting.c:2143:1: warning: no previous prototype for function 'mono_context_set_icall' [-Wmissing-prototypes] mono_context_set_icall (MonoAppContext *new_context_raw) ^ /s/mono/mono/mini/mini-posix.c:229:2: warning: unused variable 'ctx' [-Wunused-variable] MONO_SIG_HANDLER_GET_CONTEXT; And beware icall-decl.h + Boehm producing: w32file-unix.c:4905:16: error: implicit declaration of function 'GC_dlopen' is invalid in C99 [-Werror,-Wimplicit-function-declaration] libc_handle = dlopen ("/usr/lib/libc.dylib", 0); ^ or, if you fix that, unreferenced symbol _GC_dlopen.
2018-11-13[ci] Add targets to bundle tests and add a script to run them in HelixAlexander Köplinger
The test-bundle target copies all assets needed for test execution to a specified directory. We upload this directory to Helix and use it to run our mainline tests.
2018-11-12Add common "test" target for precompiling test assemblies (#11622)Alexander Köplinger
So we can precompile all tests across the repo using a simple "make test" in the root.
2018-08-10[cxx] [boehm] extern "C" and interface void* instead of char* for use by ↵Jay Krell
C++ (#9953) * [cxx] Add extern "C" to libgc so that it can be C, and used from C++. This tracks mainline https://github.com/ivmai/bdwgc, barely. See https://github.com/ivmai/bdwgc/commit/f4fbef0f7f0e3446856d2177535080158e16e403#diff-74e77959a62b8a560274f69789f50a94 * [cxx] [boehm] favor void* over char* interface for easier use from C++. This tracks, barely. See https://github.com/ivmai/bdwgc/blob/ae3d724f3645af119e1b2c2cefbb71c97d467546/mark.c#L1337 Mainline and Unity Boehm are valid C++, which is not the case here.
2018-05-01 Have automake copy instead of symlink, for more git checkout sharability ↵Jay Krell
(#8534) * Make autogen.sh output accurate -- print actual commands run. * Have automake copy instead of symlink. - This sounds analogous to libtool --copy that we do. - It enables sharing a source tree more broadly. For real example, Cygwin symlinks are not portable to Windows Subsystem For Linux, and probably vice versa. For real example, Homebrew symlinks are not portable to Linux in Docker. Downside I notice is that ls -l is less informative as to what is from git vs. a symlink to outside. git clean -xxddff works just as well either way. Hypothetical downside is that updating automake/autoconf doesn't upgrade the copies. This has never mattered to me, but it might matter. It might be viewed as an advantage.
2018-03-29add some OpenBSD patches (#7699)thfrwn
add some OpenBSD patches Hi, A few trivial additions of OpenBSD to ifdefs, plus the change of the abort signal to SIGUSR1 which fixes the SIGABRT problem (other compilation problems remain). SIGTTIN is broadcast to the process group which leads to the SIGABRT (at least on OpenBSD).
2018-02-27 [runtime] Implement thread info flags and get rid of tools threads. (#7226)Alex Rønne Petersen
* [acceptance-tests] Revert part of 1216780e830e521b8a4f61a8ca3c505ab63b9e2f. This didn't work as well as I'd hoped. * [libgc] Export GC_start_blocking () and GC_end_blocking (). * [libgc] Allow GC_start_blocking ()/GC_end_blocking () to be called unbalanced. This makes things a bit easier in Mono. * [libgc] Implement GC_start_blocking ()/GC_end_blocking () for Windows. * [utils/event] Export the MonoOSEvent APIs for use in the profiler. * [runtime] Implement thread info flags and get rid of tools threads. The concept of a tools thread was originally a good solution to the problem of some internal threads needing to be exempt from stop-the-world. Since they were introduced, however, we've added more code in the profiler's internal threads which require certain properties that don't hold true for tools threads. In particular, we call into some APIs in the metadata layer that, while not needing the managed heap, do need a domain to be set under certain conditions (see #6188). To avoid further complicating the semantics of tools thread by trying to set a domain for them in a way that doesn't break things horribly, we'll instead do away with the concept entirely. We already had mono_gc_set_skip_thread () to flag a thread as being exempt from stop-the-world, which we used in thread pool threads. This means we already have the infrastructure that is necessary for a thread to be fully attached to the runtime as a managed thread while still being exempt from stop-the-world. So, we do the following: 1. Introduce a set of flags that can be set on a MonoThreadInfo at arbitrary points (although not in async context). These can indicate that the thread doesn't want to participate in stop-the-world, doesn't want to receive sampling signals, etc. 2. Change the thread iteration macros to allow skipping threads with specific flags set and use this where appropriate (e.g. SGen stop-the-world code). 3. Get rid of mono_gc_set_skip_thread () and make runtime code use the new mono_thread_info_set_flags () instead. 4. Switch all internal profiler threads to using mono_thread_attach () and mono_thread_detach (). Use mono_thread_info_set_flags () to disable stop-the-world and sampling signals for these threads immediately after they start. With these changes, internal profiler threads are now fully attached threads and can call any APIs in the runtime as long as they don't touch the managed heap. * [libgc] Add a note about how GC_start_blocking ()/GC_end_blocking () differ from upstream.
2018-01-08openbsd related patches (#6358)Robert Nagy
* include netinet/in.h for in_addr_t * there is no need for an openbsd specific implementation anymore so you use the generic pthread one * signal.h is required for sigaltstack * add missing mono/utils/mono-threads.h include * there is no malloc.h on OpenBSD either * sys/socket.h is required for struct sockaddr * add support for btls on openbsd and default to with_tls=pthread as there is only emultls support which is not enough for mono * there is no need for pthread_attr_init/destroy anymore * add -Wl,-zwxneeded to LDFLAGS on OpenBSD W^X is strictly enforced by default on OpenBSD; a program can only violate it if it is located on a filesystem mounted with the wxallowed mount(8) option and has been linked with the above flag
2017-12-06Compile on amd64 Haiku (#4473)Calvin
* Compile on amd64 Haiku Use sigcontext (somewhat like win32, or x86) on Haiku amd64. On amd64, Haiku doesn't have issues with marshalling 64-bit values, but it currently does have issues with SGen either causing a stall or a core dump. As such, while it can compile the stdlib (further than x86 got), it's still a work in progress. * Use set_real_time_clock for sys-time.c on Haiku * Get mono-boehm compiling on Haiku again It still doesn't work. Initialization will call GC_mark_from, which will cause a segmentation fault as it decrements pointers. (Mono will enter an infinite loop in mono_get_hazardous_pointer as a result.) For now, mono-sgen will continue to be used by default.
2017-08-15[runtime] Use HOST_ defines instead of PLATFORM_ defines. (#5362)Zoltan Varga
2017-07-15[profiler] Clean up MonoProfilerGCEvent enum.Alex Rønne Petersen
* 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.
2017-02-21correct spelling mistakes (#4405)Edward Betts
2017-01-27A few more LF .gitattributes fixesAlexander Köplinger
2016-12-14[runtime] Refactor and unify tls accessVlad Brezae
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.
2016-08-30[profiler] Acquire the exclusive buffer lock after the suspend lock.Alex Rønne Petersen
This prevents possible STW deadlocks.
2016-07-28[libgc] fix musl incorrect sigcontext includeAngelo Compagnucci
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.
2016-05-27[win32_threads] Mark an inline function as static.Vincent Povirk
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.
2016-04-07[libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.Alex Rønne Petersen
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=40144 Tested on PowerPC by Mathieu Malaterre <malat@debian.org>.
2016-02-08libgc: use __builtin_frame_address in GC_approx_spJames Laird-Wah
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.
2016-02-03Merge pull request #2542 from akoeplinger/remove-changelogAlexander Köplinger
Remove ChangeLog files from the repo
2016-02-02[Makefile] fix make dist on libgcMiguel de Icaza
2016-01-30Check for libtoolize rather than libtoolNeil Mayhew
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.
2016-01-29Remove ChangeLog files from the repoAlexander Köplinger
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-25Remove libgc/depcomp and libgc/missing, newer automake versions seem to ↵Zoltan Varga
overwrite them.
2015-11-18[boehm] Put *_freelists into thread_local_freelists (as in BDWGC v7)Ivan Maidanski
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.
2015-11-18[boehm] Match BDWGC v7 APIIvan Maidanski
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
2015-05-15[runtime] Drop support for external libgc.Alex Rønne Petersen
This has not been supported for a while, so remove it.
2014-10-29[libgc] Eliminate warning about redefinition of GC_WIN32_THREADSAlex J Lennon
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>
2014-10-26[build] Enable dolt on mingw32Kornel Pal
2014-07-31Support for GNU/kFreeBSD.Jo Shields
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
2014-06-15[runtime] Enable support for arm64-darwin in dolt.Zoltan Varga
2014-06-10Add build system plumbing for building with -Werror.Alex Rønne Petersen
2014-06-08Fix typo in bf703c4a8f95db4859452474499038c7539ea3c7.Alex Rønne Petersen
2014-06-07Disable -Wreturn-local-addr in libgc/mark_rts.c!GC_approx_sp with GCC 4.8.0+.Alex Rønne Petersen
2014-05-30[boehm] Implement the finalization extension API.Rodrigo Kumpera
2014-05-25Rename configure.in -> configure.ac. Based on PR #976.Alex Rønne Petersen
2014-05-14[boehm] Implement mono_gc_get_restart_signal.Rodrigo Kumpera
2014-04-18Fix my last commit to match our libgc's declaration style.Alex Rønne Petersen
2014-04-18Hopefully fix a build error in libgc on some compilers.Alex Rønne Petersen
../../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();
2014-03-14[boehm] Fix memory management for toggleref.Rodrigo Kumpera
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.
2014-02-27[boehm] Add toggleref support for boehm. This is line by line port of the ↵Rodrigo Kumpera
sgen code, so keep them in sync.
2013-12-04Unbreak libgc.Alex Rønne Petersen
2013-12-04Remove some more mdb bits.Alex Rønne Petersen
2013-08-13Fixed some compiler warnings in libgcJeffrey Stedfast
2013-07-29Fix a missing return statement in 16d2bcaa379be0c38f84492a5528c5ab6dcd7e7d.Alex Rønne Petersen
2013-07-21libgc: Use GCC atomics on ARM.Alex Rønne Petersen
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.
2013-07-15Avoid using dmb/dsb/dib instructions on ARM v6.Alex Rønne Petersen
This only worked by accident before the HAVE_ARMV<N> changes because __ARM_ARCH_6__ is never defined by any compiler.
2013-07-12Add ARM version detection to configure and use the resulting macros.Alex Rønne Petersen
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).