Age | Commit message (Collapse) | Author |
|
* Update password
* Revert change for one file
* Update password round 2
* Update more password
|
|
Context: https://github.com/android/ndk/wiki/Changelog-r22#announcements
Context: https://github.com/xamarin/xamarin-android/pull/5475
This commit fixes a problem where the AOT compiler hard-codes the native
linker executable name to a platform-specific value but such an
executable does not exist in the toolchain being used, thus making the
AOT compiler fail to link the final binary.
The specific use case here is the new Android NDK r22 which not only
deprecates GNU binutils, but also removes architecture-prefixed `ld`
binary (e.g. `aarch64-linux-android-ld` no longer exists). Instead, the
NDK provides a non-prefixed `ld` binary and two prefixed ones:
`$arch-ld.gold` and `$arch-ld.bfd`. However, since the AOT compiler
hardcodes `ld` as the linker name on Linux systems, the AOT compilation
fails when attempting to link the final executable. Which, in turn,
breaks some Xamarin.Android AOT tests.
This commit fixes the issue by adding a new `ld-name` option to the AOT
compiler allowing one to specify just the name of the linker binary to
use. The rest of the toolchain mechanics doesn't change.
|
|
|
|
|
|
|
|
|
|
The managed allocator included in a full aot image does not support canaries, leading to inconsistent object layout.
Fixes https://github.com/mono/mono/issues/18925
|
|
* [mini] Add optional method name to --stats (#18387)
* Implement parsing for optional method name to --stats command line argument.
* Implement parsing for optional method name to --stats command line argument.
Co-authored-by: Kyle Markland <v-kymark@microsoft.com>
Co-authored-by: Rene Garcia <v-regarc@microsoft.com>
* Respond to PR feedback.
* Refactored away helper functions.
* Refactored counter setup into separate function. Moved stats optional method into its own condition.
Co-authored-by: Kyle Markland <v-kymark@microsoft.com>
Co-authored-by: Rene Garcia <v-regarc@microsoft.com>
* Renamed mono_setup_counters->mono_enable_counters. Restore whitespace to 0a51d89c4238c46f07f8b5405383547c1530809b
Co-authored-by: Kyle Markland <v-kymark@microsoft.com>
Co-authored-by: Rene Garcia <v-regarc@microsoft.com>
* [mini] Print header for stats. (#18442)
* Add an enum for dumping stats at points in time. Print header before dumping stats in mini_cleanup.
* Make print_stats_header private.
* Remove unused variable.
* Refactored print_stats_header to better accomodate optional methods for stats
* Change printf calls to g_printf in response to feedback.
* Undo changes in response to @CoffeeFlux 's feedback. Add g_printf calls to mini_cleanup
* Avoid always printing stats at shutdown.
* Condition on `mono_stats` instead of `mono_jit_stats`.
* [mini] Global JIT Stats Printing (#18483)
* Make print_jit_stats global to enable interp and JIT-triggered stat dumps.
* Rename some functions for consistency.
* Add a comment to clarify the necessary locking in different contexts.
* Rename mono_print_jit_stats to mono_runtime_print_stats and make it more generic.
* Rename runtime_cleanup_stats back to jit_stats_cleanup.
* Fix a line that was indented with spaces.
* [mini] parse fully qualified method name using mono_method_desc_new (#18499)
* Make print_jit_stats global to enable interp and JIT-triggered stat dumps.
* Rename some functions for consistency.
* Add a comment to clarify the necessary locking in different contexts.
* Use MonoMethodDesc struct and associated helpers to parse from command
line args. Remove unused stats_method_name and setter function.
Squashed commit of the following:
commit de7410696dab10723c76f545076522daa17e85d1
Author: Rene Garcia <rgarc@mit.edu>
Date: Thu Jan 16 23:01:23 2020 -0500
Utilize new stats printing function.
commit 1e5038adfec06c670dbaced771a8ff9344502d17
Author: Rene Garcia <rgarc@mit.edu>
Date: Thu Jan 16 22:37:53 2020 -0500
Remove unused stats_method_name and setter function. Use mono_method_desc_full_match instead of mono_method_desc_match.
commit 04f86c66c139e064bc35738f955f960232eb6cbb
Author: Rene Garcia <rgarc@mit.edu>
Date: Thu Jan 16 18:11:37 2020 -0500
Modify mono_method_desc_match to actually match namespace and class. Add global MonoMethodDesc, and parse it from command line args. Leave TODO print statement in mono_jit_compile_method_inner.
* Move mono_method_desc to mini-runtime header. Fix whitespace.
* Cherry pick @KyleMarkland 's changes, and resolve merge conflicts.
* Fix leak. Give better error message when parsing empty method name.
* Move freeing of mono_stats_method_desc.
Co-authored-by: KyleMarkland <59579632+KyleMarkland@users.noreply.github.com>
* Add a conditional to transform.c to enable stat dumping from the interpreter. (#18540)
* [mini] Use g_printerr instead of g_printf before exiting (#18574)
* Rename g_printf -> g_print
* Use g_printerr on errors instead of g_printf.
* Pass NULL to mono_counters_dump. Revert g_printf to g_print.
* Update manpage
* Feedback
Co-authored-by: rgarc <rgarc@users.noreply.github.com>
Co-authored-by: KyleMarkland <59579632+KyleMarkland@users.noreply.github.com>
|
|
* [llvm] Use explicit null checks with LLVM.
When the LLVM backend is used for a method, explicit null checks will
unconditionally be used at the mini IR level. We had previously used
implicit null checks at the mini IR level combined with llvm-volatile
loads and stores to avoid mis-optimization of the generated code.
During AOT compilation, LLVM's `ImplicitNullChecks` pass is enabled.
This conservatively elides these explicit null checks. This pass only
modifies branches tagged with `make.implicit` metadata.
Null check branches are now tagged with `make.implicit` metadata, with
three exceptions:
1. For platforms with backends that do not support zero page fault
handling, null check branches are not tagged with `make.implicit`.
2. This commit also adds a `MONO_DEBUG` option:
`llvm-disable-implicit-null-checks`. When it is enabled, null check
branches are not tagged with `make.implicit`.
3. This commit alters the behavior of the `explicit-null-checks`
`MONO_DEBUG` option. Enabling `explicit-null-checks` also implies
`llvm-disable-implicit-null-checks`, because this option is documented
(e.g. in https://www.mono-project.com/docs/debug+profile/debug/) to
completely disable signal/seh-based null checks.
* Add llvm-disable-implicit-null-checks to the MONO_DEBUG help string.
* Add llvm-disable-implicit-null-checks to mono.1.
* Don't tag null checks in EH regions with `make.implicit`.
This relocates the logic formerly used to guard individual LLVM-level
loads and stores with explicit null checks inside EH regions.
* Use atomic/volatile loads and stores for the terimation flag in thread-suspend-suspended.
LLVM was hoisting the load of and branch against `finished` out of
thread t1's loop, resulting in an infinite spin.
* Use ImplicitNullChecks with LLVM JIT.
* Suppress emission of the .llvm_faultmaps section.
Bump external/llvm to release_60
(7a8dc89adbe7e123220e070a527e096ee91e66d5).
* [ci] use LLVM built from repository
|
|
(#17231)
Fixes https://github.com/mono/mono/issues/15845
|
|
* [mini] Use clr memory model by default
Otherwise we can have potential crashes in the bcl on arm targets, since a lot of code that assumes this memory model is now shared with mono.
Keep the old clr-memory-model option alive for now, to avoid potential build problems, if building older mono with newer mono.
* [build] Remove clr-memory-model option
It is default now
* [man] Add entry for weak-memory-model
|
|
* Introduce -mattr flag
* fix build on arm targets
* remove mono_memory_barrier
* Address feedback
* Address feedback
* cleanup
* fix crash
* fix "bmi" (it's not "bmi1")
* cleanup
* ignore System.Drawing.Tests.IconTests.CorrectColorDepthExtracted test
* fix build on arm
* fix build
* fix build
|
|
* Add Math Intrinsics, introduce --cpu flag
* cpu -> mcpu
|
|
|
|
|
|
|
|
It needed a few tweaks to be usable when Mono is installed to the prefix.
|
|
* [aotprof-tool] Initial import
Imported https://github.com/radekdoulik/aotprofile-tool and updated it
to use Mono.Profiler.Log
* [aotprof-tool] Added man page
* [aotprof-tool] Use the shortened name in README.md
|
|
* [sgen] Remove dead unpin_queue argument
* [sgen] Fix check-nursery-pinned debug option
And rename it to better reflect what is is doing now (which is to check that we don't leave any vtables tagged at the end of a collection). It used to also check that nursery objects are pinned, back when we were doing a nursery collection as part of the finishing pause of a concurrent collection.
|
|
* [driver] add --version-number
Useful for third parties consuming the version number of mono.
* s/--version-number/--version=number/g
* add man page entry
|
|
gcc style dep file listing the dependencies between the output file and all referenced assemblies. (#14124)
* [aot] Add a depfile= argument which causes the AOT compiler to write out a gcc style dep file listing the dependencies between the output file and all referenced assemblies.
* Add a manpage entry.
* Update after comments.
|
|
by Xamarin.Mac which needs it
|
|
[AOT] remove confusing llcopts flag
Introduced by
https://github.com/mono/mono/commit/2eeaf888c1d0a681c8705bd609f76196d8fb82ed
|
|
* [profiler] Add duration=NUM parameter to AOT profiler
It instructs the AOT profiler to write the data after NUM seconds
measured from runtime initialization.
* [profilers] Added aot:duration=NUM parameter description
|
|
toggled by Xamarin.Mac which needs it"
This reverts commit a4c860676794af9ad95c090b03bf1cf617fba464.
|
|
by Xamarin.Mac which needs it
|
|
* [AOT] add option to control arguments to llc and add fallback for x86
Fixes https://github.com/mono/mono/issues/12182
* rename
|
|
|
|
|
|
Enable SHA256, SHA384 and SHA512 hash algorithms to be used for
Authenticode signatures. This enables producing digital signatures that
are trustworthy using the `mono` tooling.
Fixes #7517
|
|
Typo fix
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
|
|
llvmllc-add commands (#11556)
Don't override default LLVM's opt & llc args via llvmopts-add and llvmllc-add commands
Currently we can pass custom arguments to LLVM's `opt` and `llc` via:
```
mono --aot=llvm,llvmopts="...",llvmllc="..."
```
but those completely override the default arguments mono uses (some of them are required).
E.g. lets say I need to add `-foo` to both opt and llc, I should do:
```
mono --aot=llvm,llvmllc="**-foo** -march=x86-64 -mattr=sse4.1 -asm-verbose=false
-disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=_mono_aot_p_eh_frame
-disable-tail-calls -no-x86-call-frame-opt -relocation-model=pic
-filetype=obj,llvmopts="**-foo** -O2 -disable-tail-calls"
```
So this PR introduces new commands `llvmopts-add` and `llvmllc-add` to be able to simply do:
`mono --aot=llvm,llvmopts-add="-foo",llvmllc-add="-foo"`
PS: let me know if you don't like the `-add` suffix
/cc: @migueldeicaza
|
|
|
|
|
|
|
|
|
|
* [wasm] Add no-opt aot compiler option to skip running opt.
* [wasm] Add initial scafold to support AOT'ing wasm modules.
* [wasm/llvm] Fix some wasm+llvm issues.
* [aot] Disable trampoline initialization if AOT compiling.
* [docs] Update manpage for new aot option.
* [wasm] Make mono_arch_emit_inst_for_method not assert.
|
|
* Fix up behaviour of verbose method with arguments
Given a method spec which looks like:
`MainClass:Do(int,int,int)`
Via f024e820a025aacc1cf80eb82a8aee4552c3ac11 the code would match 3 methods:
`MainClass:Do(int`, `int`, `int)`, crashing the runtime.
Accept the multiple method matches via `;`, rather than `,`.
Now, the behaviour is changed so:
`MainClass:Do(int,int,int);MainClass:Do(int,int)`
Get parsed as:
`MainClass:Do(int,int,int)`
`MainClass:Do(int,int)`
* Add tests
* add test file and make tests actually output something
* Smarter unit test around disassembling methods
* Try single quoting environment variable value
* Try using non-throwing setter
|
|
Set to one of "preemptive", "coop" or "hybrid".
Unlike the old MONO_ENABLE_COOP, MONO_ENABLE_COOP_SUSPEND,
MONO_ENABLE_HYBRID_SUSPEND, the value of MONO_THREADS_SUSPEND will take
priority over the configure flags default.
For compatability the old environment variables will be respected if neither
MONO_THREADS_SUSPEND nor a configure flag was set. A warning will be emitted
if MONO_THREADS_SUSPEND isn't set. (Rationale: maybe the environment set both
because they're not sure which version of Mono they will be running - so don't
nag them).
|
|
* [jit] Move the handling of special methods like pinvoke etc. into mini-runtime.c, since they are not handled by the JIT.
* [jit] Add a --full-aot-interp command line argument which is the same as --full-aot with a fallback to the interpreter.
* [jit] Implement fallback to the interpreter in full-aot+interp mode.
* [jit] Add a 'methods using the interpreter' stat.
|
|
(#8844)
|
|
mkbundle works by generating a small C source file which, in addition to
embedded assemblies/configs/etc, contains a certain amount of code to initialize
the bundle, uncompress the assemblies and set runtime options (e.g. AOT mode).
This source code is generated based on a number of templates shipped as
resources inside `mkbundle.exe` and is not part of any public, maintained API.
The generated code contains calls to Mono runtime which work just fine when
mkbundle is used to generate a desktop application bundle with the default
template code. However, it breaks when a third party (like Xamarin.Android)
embeds Mono runtime and loads it dynamically **after** the application is
initialized. Such third parties must ensure that the bundle's startup code is
able to access the Mono runtime functions it needs by providing pointers to
them, loaded using e.g. the `dlsym` function.
However, as the Mono calls are hard-coded into the generated source code, the
third party needs to resort to search-and-replace methods (e.g. Xamarin.Android
https://github.com/xamarin/xamarin-android/blob/62e7792ca52949f2fa213330d292865ad78d2bfa/src/Xamarin.Android.Build.Tasks/Tasks/MakeBundleNativeCodeExternal.cs#L159-L166)
which are very fragile and prone to undetected breakage.
One example of such breakage which slipped under the radar is
https://github.com/xamarin/xamarin-android/issues/1651 which was caused by
addition of the `mono_jit_set_aot_mode` call to the generated code. The change
slipped under the radar and was discovered only after release.
This commit attempts to make the situation better by establishing a sort of a
code contract between "upstream" mkbundle and the third party. Since the
template code is not "public" (nor should it be), the third party cannot simply
include a header file with the API definitions. Instead, the idea here is to
ensure that all and any Mono runtime calls needed by the template code are
placed in a dispatch structure as pointers to functions and that the structure
needs to be initialized by the embedding party before calling the
`mono_mkbundle_init()` function. The third party is responsible for maintenance
of its own version of the dispatch structure as well as for its initialization
via the `initialize_mono_api` function in the template code. The generated code
must include the third party's version of the structure, in place of the default
one as shipped with `mkbundle`, and to make it possible this commit adds the
`--mono-api-struct-path` mkbundle parameter which points to a file that's
injected into the generated code, replacing the default structure definition.
Following that, the `mono_mkbundle_init()` code calls the `validate_api_struct`
function which checks each and every pointer in the structure for `null`,
exiting the application with error if any `null` pointer is encountered.
This (along with the `initialize_mono_api` function in the template) has the
additional effect that if the third party's structure is incompatible with the
default one a build error will happen, thus allowing early detection of obvious
incompatibilities/omissions.
As long as all the new Mono runtime calls are added to the structure, the above
should make it possible for issues like the one linked to above to not happen in
the future.
|
|
|
|
|
|
I added an option to allow storing a "thread dump" of the running program into a file in the specified directory. It is useful when you need to understand what is going on in your application and you cannot capture stdout or attach a debugger.
|
|
(#8261)
* [threads] Have Hybrid Suspend not depend on Coop Suspend
* [threads] Enable CI
|
|
* Allow the LLVM opt flags to be provided in the command line
* Avoid leaking small string
|
|
|
|
target architecture. (#7281)
* Use VSCMD_ARG_TGT_ARCH env in mkbundle on Windows when trying to autodetect target architecture.
Using mkbundle on Windows with VS toolchain, mkbundle will detect target
architecture (x86/x64) by looking at the architecture of executing .NET runtime.
This could lead to some surprises when run from a VS development command propmt setup
to target x86 or x64 but running a mono binary using opposite architecture.
To mitigate this issue mkbundle will look now at the VSCMD_ARG_TGT_ARCH
set in VS development command prompts and use target architecture based
on this env variable. If not defined, current behavior will be used, picking the target
architecture based on executed .NET runtime architecture.
* Updated mkbundle documentation.
|
|
FSEvent CoreFX watcher becomes the new default for MacOS.""
This reverts commit 2174a521a3e45f6ce4db967a53edcc1ee2dd0433.
|