Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono Bleeding Edge for Trunk #776

Merged
merged 131 commits into from
Jan 2, 2018
Merged

Mono Bleeding Edge for Trunk #776

merged 131 commits into from
Jan 2, 2018

Conversation

joncham
Copy link
Member

@joncham joncham commented Jan 2, 2018

No description provided.

Etienne CHAMPETIER and others added 30 commits December 22, 2014 09:20
When using "fat" session (~2MB) and multiple (~20) simultaneous calls
the retrieval sometimes fails and lock the session.
The original code blocks on the calling thread (AutoResetEvent.WaitOne())
and uses another thread with the timer to do the polling.
If the polling succeeds, the TimerCallback AutoResetEvent.Set(),
with no guarantes that it will wake up the thread.
(see Remarks in http://msdn.microsoft.com/en-us/system.threading.eventwaithandle.set%28v=vs.110%29)

In this patch we simply replace all this code with an equivalent
loop + sleep, which give us the same behaviour
(we still block the calling thread with the sleep, but we didn't use another one)

Signed-off-by: Frederic Mestayer <[email protected]>
Signed-off-by: Etienne CHAMPETIER <[email protected]>
Jemalloc is known to have much better performance than system memory
allocators, and is safe in concurrent/re-entrant situations.

To use, provide the following options to configure:

--with-jemalloc to enable optionally. To use at runtime,
export MONO_USE_JEMALLOC to the environment.

--with-jemalloc-always to enable and make the default

--with-jemalloc-assert to enable with assertions to catch memory
unsafety. It adds overhead, but an overhead that's much less than
valgrind or asan.

If you export
MONO_JEMALLOC_CONF="stats_print:true"

You will see detailed memory statistics for mono at exit.

Now note that jemalloc is used through an explicit registration, so
C libraries called through pinvoke calls will not use jemalloc unless
they configure themselves to do so separately.

To understand the build work, I'm statically linking jemalloc.a into
the compilation unit for mono/utils/mono-jemalloc.c, which is
responsible for registering it with mono at startup. No further
copying out of the submodule is necessary at installation time.
They are not generated by a ruby script.
The commit includes the generated file and the generation script for now to ease development.
We can later discuss generating it at build time.
Also make it so on-demand heapshots can be done regardless of the heapshot
mode in use. There really wasn't a good reason to not allow it before.
If nodefaults is passed as the first argument, we would print `Could not parse argument: nodefaults` due to how it's parsed differently.
If nodefaults is passed after the first argument we would not print a warning that this was wrong.

This commit fixes both usability issues.
vargaz and others added 25 commits December 13, 2017 01:38
[threads] Fix leak of gchandle to MonoInternalThread
[aot] Fix aot+llvm after the weak field changes.
* [jit] Remove unused mono_arch_instrument_mem_needs () function.

* [jit] Remove unused mono_arch_instrument_epilog_full () function, only the non-full version is used.

* [jit] Remove some unused arch specific functions previously used by the global regalloc prototype.
CreateLocal works by checking the platform. If it is windows, it uses the windows API or registry depending on api version, UWP, etc. otherwise it checks for the $TZ environment variable. If thats not found. it looks for /etc/localtime.....more obscure platforms like WebGL have no means of obtaining tzdata this way. This means that CreateLocal falls back to setting the TimeZoneInfo.Local time to UTC....this causes functions like DateTime.Now and DateTime.ToLocalTime to convert to UTC, instead of the user's local time.  By using Mono's old icall, we won't be able to convert between arbitrary timezones, but basic time conversion, such as UTC to Local will work.
… traces to be incorrect for exported mono symbols. Also, move warning as error for 4716 from additional command line args to explicit setting in vcxproj.
* IL2CPP debugger fixes for working with Unity players

* Ignoring setp_out sequence points when searching for sequence points that don't correspond to step_out requests.
* Not returning step_out sequence points when retrieving method debug  info.  The step out sequence points have the same offset as other sequence points, but different line numbers.
* Hardened the il2cpp_mono_free_method_signatures() function against multiple calls by setting the method_signatures hash table to null after it is cleared.
* The isActive field in Il2CppSequencePoint should be a uint8_t, not a bool, as it gets incremented.  I think this change was made in the previous C-only type for this struct but not propagated to the C++ version, which is the only version we use now.

* Fixed missed issue with duplicate inner loop variable
@joncham joncham merged commit 29cbfa1 into unity-master Jan 2, 2018
@joncham joncham deleted the unity-master-staging branch January 3, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.