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
AgeCommit message (Collapse)Author
2020-02-04Add RunSample target to mono.proj (#18635)monojenkins
1) Delete `src/mono/netcore/corerun/` folder, we can build/use coreclr's corerun (it has `--clr-path`) 2) Add `RunSample` to build & run HelloWorld with mono runtime. Co-authored-by: Egor Bogatov <egorbo@gmail.com>
2020-02-04[wasm] Add linker substitutions for fields. (#18700)Zoltan Varga
2020-02-04Bump bockbuildAlexander Köplinger
2020-02-04Bump xsp to get correct version numberAlexander Köplinger
2020-02-04Bump version to 6.13 (#18699)Jo Shields
2020-02-04Add --profiling-funcs to release wasm build. (#18663)Jay Krell
[wasm] Put function names in call stacks. Add --profiling-funcs to release wasm build. This is a weaker for of -g2 or -g3 or -g4 or --profiling. It sounds like the weakest form that preserves names. Documentation is around here: https://emscripten.org/docs/tools_reference/emcc.html#emcc-g1 Now when reproducing for example https://github.com/mono/mono/issues/18646, you get: ``` e.stack <?>.wasm-function[generate_code]@[wasm code] <?>.wasm-function[interp_inline_method]@[wasm code] <?>.wasm-function[interp_transform_call]@[wasm code] <?>.wasm-function[generate_code]@[wasm code] <?>.wasm-function[interp_inline_method]@[wasm code] <?>.wasm-function[interp_transform_call]@[wasm code] <?>.wasm-function[generate_code]@[wasm code] <?>.wasm-function[interp_inline_method]@[wasm code] <?>.wasm-function[generate_code]@[wasm code] <?>.wasm-function[generate]@[wasm code] <?>.wasm-function[mono_interp_transform_method]@[wasm code] <?>.wasm-function[do_transform_method]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_runtime_invoke]@[wasm code] <?>.wasm-function[mono_jit_runtime_invoke]@[wasm code] <?>.wasm-function[do_runtime_invoke]@[wasm code] <?>.wasm-function[mono_runtime_try_invoke]@[wasm code] <?>.wasm-function[mono_runtime_class_init_full]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_runtime_invoke]@[wasm code] <?>.wasm-function[mono_jit_runtime_invoke]@[wasm code] <?>.wasm-function[do_runtime_invoke]@[wasm code] <?>.wasm-function[mono_runtime_try_invoke]@[wasm code] <?>.wasm-function[mono_runtime_class_init_full]@[wasm code] <?>.wasm-function[mono_interp_transform_method]@[wasm code] <?>.wasm-function[do_transform_method]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_runtime_invoke]@[wasm code] <?>.wasm-function[mono_jit_runtime_invoke]@[wasm code] <?>.wasm-function[do_runtime_invoke]@[wasm code] <?>.wasm-function[mono_runtime_invoke_checked]@[wasm code] <?>.wasm-function[mono_runtime_try_invoke_array]@[wasm code] <?>.wasm-function[ves_icall_InternalInvoke]@[wasm code] <?>.wasm-function[ves_icall_InternalInvoke_raw]@[wasm code] <?>.wasm-function[do_icall]@[wasm code] <?>.wasm-function[do_icall_wrapper]@[wasm code] <?>.wasm-function[interp_exec_method_full]@[wasm code] <?>.wasm-function[interp_runtime_invoke]@[wasm code] <?>.wasm-function[mono_jit_runtime_invoke]@[wasm code] <?>.wasm-function[do_runtime_invoke]@[wasm code] <?>.wasm-function[mono_runtime_try_invoke]@[wasm code] <?>.wasm-function[mono_runtime_invoke]@[wasm code] <?>.wasm-function[mono_wasm_invoke_method]@[wasm code] wasm-stub@[wasm code] Db@[native code] http://192.168.0.20:8000/_framework/wasm/dotnet.js:1:189579 call_method@http://192.168.0.20:8000/_framework/wasm/dotnet.js:1:153837 http://192.168.0.20:8000/_framework/wasm/dotnet.js:1:156177 callEntryPoint@http://192.168.0.20:8000/_framework/blazor.webassembly.js:1:37229 http://192.168.0.20:8000/_framework/blazor.webassembly.js:1:33889 http://192.168.0.20:8000/_framework/blazor.webassembly.js:1:32396 i@http://192.168.0.20:8000/_framework/blazor.webassembly.js:1:31247 promiseReactionJob@[native code] ```
2020-02-04[interp] Remove goto related to code_type being unknown | interp | compiled. ↵Jay Krell
(#18678) [interp] Remove goto for code_type unknown | interp | compiled. [interp] Remove goto for code_type unknown | interp | compiled. The goto kinda implies a loop, but it is really just handling one case before the other, but the source misorders the checks, perhaps for perf, which maybe, can be done equivalently with G_UNLIKELY, and also remove some possible extra memory reads.
2020-02-04When the interpreter does recurse, use a different function (#18664)Jay Krell
[interp][wasm]Use per-call recursive functions in interpreter to aid debugging. When the interpreter does recurse, use a different function for each call site, so you can tell from a WebAssembly stack which case it is. i.e. with function names but no line numbers. With this, we can see that call_varargs contributes to the problem here: https://github.com/mono/mono/issues/18646 Also, do not inline the interpreter, it probably/hopefully never was.
2020-02-04[runtime] Fix the --enable-minimal=aot build. (#18688)monojenkins
Fixes https://github.com/mono/mono/issues/18675. Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2020-02-04Bump linker. (#18691)Zoltan Varga
* Bump linker. * [csproj] Update project files Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-02-04[interp]Fix the type of clause_args. (#18671)Jay Krell
[interp]Fix the type of clause_args.
2020-02-04[Wasm] Update to emscripten 1.39.7 (#18687)Jérôme Laban
2020-02-04[aot] Avoid inflating gparams with byreflike types during generic sharing. ↵monojenkins
(#18680) Fixes https://github.com/mono/mono/issues/18676. Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2020-02-04[wasm] Set the 'top-runtime-invoke-unhandled' option so unhandled exceptions ↵Zoltan Varga
calls AppDomain.UnhandledException. (#18642)
2020-02-04[mini] Add method-triggered printing for runtime stats (#18621)Ryan Lucia
* [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>
2020-02-03[tests] Reenable enum equals test on interpreter (#18673)Vlad Brezae
Fixed by https://github.com/mono/mono/commit/9ea350ed3c963c77f0f4f77ec590cc3c84773424
2020-02-03[build] Check for Python 3 in configure.ac (#18625)Ryan Lucia
I fear this causing packaging problems, but as-is we require Python 3 for most of our Python files but don't actually check for that in configure. We should be consistent about this. Some projects (notably wasm) also use the Python version detected here, so bumping this will also bump the version used in those cases (a good thing, since there are some known bugs when using the scripts with Python 2).
2020-02-03[interp] Fix enum constrained calls on netcore (#18659)monojenkins
We were failing to dereference a managed pointer to the enum, due to incorrect checks, when doing a constrained call. Fixes https://github.com/mono/mono/issues/18530 Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
2020-02-03Fix ppc64 build by fixing -mminimal-toc more correctly. (#18665)Phil Jaenke
The original fix back at #18554 did not work quite right, which was missed for lack of CI. Reworked this check to instead test for `-mminimal-toc` on all powerpc hosts, and to only do the ELF version check on FreeBSD. Fixes #18554 #18578 current CI build failures on AIX
2020-02-02Adjust mono_class_init_internal to no longer bypass cleanup when a failure ↵Alex Thibodeau
is detected. (#18649) This fixes: https://issuetracker.unity3d.com/issues/unity-physics-collisions-do-not-work-and-errors-are-thrown-when-entering-play-mode
2020-02-02[llvm] Enable jump threading with LLVM JIT. (#18655)imhameed
See https://github.com/mono/mono/issues/16243. This will allow elision of redundant bounds checks. This pass is already used during AOT (as part of opt -O2).
2020-02-01Abort cmov optimization, when one of the out blocks is try block (#18626)Fan Yang
2020-02-01[wam] Rename other .stamp-build-debug-sample to debug_sample/dotnet.js (#18653)mdh1418
2020-01-31[wasm] Bump emscripten to 1.39.6. (#18641)Zoltan Varga
2020-01-31[aot] Add support for making direct cross-assembly calls in llvm mode. (#18505)Zoltan Varga
* [aot] Handle '|' during symbol mangling. * [aot] Clean up the construction of the linker command line. * [aot] Pass -Wl,-install_name to the linker on osx, otherwise the shared object will be named based on the output file name i.e. <assembly>.dylib.tmp. * [llvm] Pass the MonoAotFileInfo pointer to the init functions, not used yet. * [jit] Add support for direct calls between methods in different AOT images in LLVM mode. * Add a 'direct-extern-calls' AOT option. * Initialize the PLT/GOT during method initialization, this normally happens in load_method () but that is not called when a method is directly called. * Add self initialization support for JITted methods, they can be called directly since they are fallbacks if LLVM fails. * Fix the build. * Avoid calling BeginInvoke etc. directly, its implemented by the runtime. * Unify some cases. * Init PLT at image load time since directly called methods without initializers might make calls through it. * Fix a startup problem. * Make the mono_is_corlib_image () check for during startup. * Check for is_inited in the init icall wrappers, since they might be called from JITted code which doesn't check it. * Address review comments.
2020-01-31[jit] Avoid generating wbarriers for vtype stores to the stack. (#18556)Zoltan Varga
The existing heuristic doesn't work with llvm.
2020-01-31[wasm] Remove .stamp-build-debug-sample, use the output file instead. (#18644)Zoltan Varga
2020-01-31[wasm] Avoid overwriting emcc flags when SIMD is enabled. (#18643)Zoltan Varga
2020-01-31Move generic_class_init out of line to assist branch prediction. (#18497)Johan Lorensson
When calling a generic class we need to make sure it has been inited. This is done by calling generic_class_init. Since this call happens frequently, but will only run once, it should be put out of line, assisting branch predictor, preventing misspredictions (in all places but the first). Currently this is not the case, since we will generate code like this: 0000000000000484: cmp byte ptr [rcx+2Dh],0 0000000000000488: jne 000000000000048F 000000000000048A: call p_3_plt_EmptyGame__jit_icall_mono_generic_class_init_llvm 000000000000048F: mov rax,qword ptr [mono_aot_EmptyGame_llvm_got+0C8h] Where we will always (except for first call) take the forward branch. Instead we should mark the call to the method as out of line, at least giving the code generator the information so it can move it out of line and preventing a jmp, unless when it needs to init, the slow path. Doing that will generate the following code: 0000000000000484: cmp byte ptr [rcx+2Dh],0 0000000000000488: je 00000000000004C1 000000000000048A: mov rax,qword ptr [mono_aot_EmptyGame_llvm_got+0C8h] ... 00000000000004C1: call p_3_plt_EmptyGame__jit_icall_mono_generic_class_init_llvm 00000000000004C6: jmp 000000000000048A
2020-01-31[aot] Fix some races if GOT entries are already set. (#18636)monojenkins
decode_patch_info () would not decode patches if their corresponding GOT entry was already set, causing half initialized MonoJumpInfo entries to be returned to callers. Set the type of the MonoJumpInfo entry to MONO_PATCH_INFO_NONE in these cases, and have the callers handle it. Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2020-01-30[jit] Add a 'top-runtime-invoke-unhandled' option to treat exceptions which ↵monojenkins
reach the top invoke frame as unhandled when embedding. (#18610) This is not really a MONO_DEBUG option, but easier to implement it this way. Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2020-01-30[mono] Prevent direct MonoClass field access (#18634)mdh1418
* [wasm] Add --enable-checked-build=private_types configure option to disable direct access of MonoClass fields. * [mono] Indirectly access MonoClass fields
2020-01-30[wasm] Fix mono_vfree (). (#18632)monojenkins
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2020-01-30[wasm][debugger] Cancel Existing Single Step Request When Creating New (#18608)Steve Pfister
When stepping out of a c# breakpoint into the runtime (or JS... Not sure if that's accurate), multiple single step requests can be created when the breakpoint is hit again. In order to handle this scenario for wasm, we just cancel the existing one. NOTE: The debugger args addition seemed a better way to handle this than outright canceling in debugger-engine. If there are implications to doing this, I can take it out.
2020-01-30[wasm] Finish renaming mono.js to dotnet.js (#18623)Ryan Lucia
This work mostly happened a while back, but this commit finishes the job.
2020-01-30[wasm] README updates (#18624)Ryan Lucia
Use -j with all example make invocations, mention Ninja dependency, mention raising ulimit, recommend py3 for running the server (when using py2, the port isn't properly released).
2020-01-30Merge pull request #18602 from lewing/wasm-debug-inspectLarry Ewing
[wasm][debugger] Initial support for proxying flat sessions
2020-01-29[corlib] Split corlib xunit tests even more for iOS (#18619)Alexander Köplinger
Follow-up to https://github.com/mono/mono/pull/18228 since two parts wasn't enough to fix the size issue on 32bits devices. We now use three parts. Fixes https://github.com/mono/mono/issues/18614
2020-01-29[merp] MONO_DEBUG=no-gdb-stacktrace shouldn't disable MERP (#18567)Aleksey Kliger (λgeek)
* [merp] MONO_DEBUG=no-gdb-stacktrace shouldn't disable MERP Only prevent `gdb` or `lldb` from being invoked. MERP is controlled by separate mechanisms --- configure flags for crash reporting and an explicit opt-in icall. The existing code collects crashed process data in-process, but it writes the data out (using mono_merp_invoke) in the forked child process. This is a bit surprising, but in the interest of not disturbing the code too much, this PR doesn't change that. We should revisit `dump_native_stacktrace` again in the future and rationalize these decisions. Addresses https://github.com/mono/mono/issues/18565
2020-01-29[interp] Fix virtual calls in mixed mode (#18526)Vlad Brezae
* [interp] Enable virtual calls to compiled code If we have an aot-ed version of a method we should always go through it, because the IL for that method could be stripped. * [interp] Disable jit call for wrappers Some generic wrappers don't seem to work in mixed mode, probably due to the fact that the transition already reuses a gshared wrapper.
2020-01-29[wasm][debugger] use PdbReaderProvider helper to try to load more pdb formsLarry Ewing
2020-01-29Merge remote-tracking branch 'upstream/master' into checkpointLarry Ewing
2020-01-29[wasm][debugger] start reworking logging logicLarry Ewing
2020-01-29[wasm] simplify EndOfMessage caseLarry Ewing
2020-01-29Rename Ws* to something more reasonableLarry Ewing
2020-01-28Use memmove in Buffer.MemoryCopy (#18547)Egor Bogatov
* Use memmove in Buffer.MemoryCopy * add test case
2020-01-28[wasm][debugger-proxy]: If we cannot load a PDB file, send a log entry. (#18601)Martin Baulig
2020-01-28[WinForms] Incorrect Tree Nodes drawing at the `OwnerDrawText` mode (#18605)Nikita Voronchev
Assume we have the following form `MyForm`: ``` using System; using System.Drawing; using System.Windows.Forms; namespace test_TreeView { public class MyForm : Form { TreeView treeView = new TreeView() public MyForm() { treeView.Nodes.Add("root node"); treeView.Nodes[0].Nodes.Add("first child node"); treeView.BackColor = Color.Gray; treeView.LineColor = Color.Yellow; treeView.DrawMode = TreeViewDrawMode.OwnerDrawText; treeView.DrawNode += treeView_DrawNode; Controls.Add(treeView); } private void treeView_DrawNode(object sender, DrawTreeNodeEventArgs e) { var brush = new SolidBrush(Color.FromArgb(100, 255, 0, 0)); e.Graphics.FillRectangle(brush, e.Bounds); } } } ``` The displayed result is ![image](https://user-images.githubusercontent.com/12382656/73263417-92872980-41e1-11ea-8f7c-7cecbb376b60.png) One can see couple drawing issues: * White rectangles under each `TreeNode`. * The area of custom drawing (red rectangles) is shifted with respect to this white rectangles. Current PR proposes the fix of this issues. Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-01-28[Winforms] Form fixes (#18427)Karl
* Fix Return handling. Ensure correct ClientSize. When pressing Return / Enter, ensure any target button is both visible and enabled. In CreateHandle(), ensure the ClientSize is correct if set. If not, update it to make it right. Suspend layout while changing it so that child controls with anchors other than Top Left are not moved. * Select active control. PerformLayout after updating for client size. Select the active control with SendControlFocus to avoid upsetting what is currently selected. * Improve Form window decoration adjustment handling Reverts the incorrect attempted fix contained in previous commits. Basically, when a property is changed that affects window decorations, ensure the client size stays the same. * Use UpdateFormStyles on FormBorderStyle too.
2020-01-28Don't select ListBox item if SelectionMode == None (#18492)Karl
When the user types a letter or digit, KeySearch looks for and selects an item starting with that character. However, it should not if SelectionMode is None.