Permalink
Commits on Apr 9, 2018
  1. [profiler] Mark some code buffer types that are no longer produced as…

    alexrp committed Mar 11, 2018
    … deprecated.
    
    Also remove them from the log format.
  2. [profiler] Flush log buffers of internal threads after attaching.

    alexrp committed Mar 9, 2018
    Otherwise some events would arrive too late, e.g. heap root register events
    would arrive after heapshots that reference them.
Commits on Apr 8, 2018
  1. Fix mono/tests/test-inline-call-stack.cs under FullAOT+LLVM (#8097)

    jaykrell committed Apr 8, 2018
    by not inlining callers to GetCallingAssembly.
    
    Attempts to do this only for cross-assembly failed.
    Other codegen models might need more work here.
  2. [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Mak…

    vargaz committed Apr 8, 2018
    …e.config var is set. (#8017)
    
    * [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Make.config var is set.
    
    * [sdks] Use prebuilt llvm binaries on ios CI.
    
    * [sdks] Use the IGNORE_PACKAGE_LLVM variable to enable the building of llvm.
  3. [profiler] Fix exception clause reporting. (#7940)

    alexrp authored and vargaz committed Apr 8, 2018
    * [runtime] Handle interpreter-related frames in async stack walks.
    
    * [profiler] Fix exception clause reporting.
    
    This Fixes three separate issues:
    
    * Finally clauses in the non-exceptional case were not reported because we
      implement these by simply calling them from managed code, as opposed to the
      exceptional case where we call them from runtime C code.
    * The catch portion of a try-filter-catch clause was being incorrectly reported
      as a filter.
    * Actual exception filters were not being reported at all.
    
    Because we have to instrument JIT'd code to report non-exceptional finally
    clauses, a new mono_profiler_enable_clauses () function has been introduced
    which profiler API users must call in order to get exception clause events, in
    a similar fashion to mono_profiler_enable_allocations (). Since this is a
    breaking change, the profiler API version has been bumped.
    
    Fixes #7525.
    
    * [profiler] Remove the iomap_report event and associated code.
    
    The IOMap profiler no longer exists, so we no longer need to expose this
    somewhat hacky event.
    
    * [profiler] Replace the old gc_event with gc_event2.
  4. Fix new warnings. (#8066)

    jaykrell authored and vargaz committed Apr 8, 2018
  5. [coop] Thread state machine state cleanups (#8069)

    lambdageek authored and luhenry committed Apr 8, 2018
    * [coop] Squash the thread state machine state numbering
    
    In
    mono@9767b8a
    we removed STATE_SELF_SUSPEND_REQUESTED
    but left a hole in the state numbering, as a result, `state_name()` was off by
    one (and falling off the end of the array).
    
    * [coop] Renamed STATE_BLOCKING_AND_SUSPENDED -> STATE_BLOCKING_SELF_SUSPENDED
  6. [arm64] Fix llvm jit support. (#8092)

    vargaz authored and luhenry committed Apr 8, 2018
Commits on Apr 7, 2018
  1. [w32file] Fix memory leak (#8090)

    luhenry committed Apr 7, 2018
    Fixes mono#7655
  2. [msvc] Update csproj files

    monojenkins authored and marek-safar committed Apr 7, 2018
  3. [s390x] Float32 (#8084)

    nealef authored and vargaz committed Apr 7, 2018
    * Enable float32 support and correct FP register saving
    
    * Fix float register saving; Complete float32 support; Add tailcall_membase
Commits on Apr 6, 2018
  1. [metadata] Fix wrong icall signature for ModF (#8080)

    akoeplinger committed Apr 6, 2018
    Noticed this while looking at Jenkins logs today:
    
    ```
    15:00:56 /mnt/jenkins/workspace/test-mono-pull-request-amd64/mcs/class/lib/net_4_x/mscorlib.dll
    15:00:56 cant resolve internal call to "System.MathF::ModF(single,single*)" (tested without signature also)
    ```
    
    We need to use `single` in the icall def instead of `float`.
    
    It was introduced by mono#7941
  2. [System] Disables compiled regex

    marek-safar committed Apr 3, 2018
    Fixes #7828
  3. [System]: Fix memory leak in the web stack related to `Task.Delay` (p…

    baulig authored and marek-safar committed Apr 4, 2018
    …artial fix of #7356).
    
    Using `Task.Delay (timeout)` has the potential of possibly allocating and holding large
    chunks of memory throughout the timeout period.  While this is not strictly speaking a
    memory leak because those objects will eventually be disposed and garbage collected, it
    can cause memory usage of apps to grow quite significantly in the short run.
    
    The default timeout values are as follows:
    
    * `HttpWebRequest.ReadWriteTimeout`: 5 minutes.
    
    * `HttpWebRequest.Timeout`: 100 seconds.
    
    * `ServicePointManager.MaxServicePointIdleTime`: 100 seconds.
    
    And these values can be increased by the user.  This means that we're potentially holding
    hundreds, maybe even thousands of timeout objects in memory for 5+ minutes.
    
    This has now been fixed by using the `Task.Delay(int,CancellationToken)` constructor.
    
    Note that disposing a `CancellationTokenSource` will not cancel it, so the following code
    will still leak:
    
    	using (var cts = new CancellationTokenSource ()) {
    		Task.Delay (TimeSpan.FromDays (3), cts.Token);
    		// Work
    	}
    
    To actually make the `Task.Delay` instance go away when we're done with it, we need to
    use this pattern:
    
    	var cts = new CancellationTokenSource ();
    	try {
    		Task.Delay (TimeSpan.FromDays (3), cts.Token);
    		// Work
    	} finally {
    		cts.Cancel ();
    		cts.Dispose ();
    	}
    
    We also cannot use `CancellationToken.CancelAfter()` for timeouts because unfortunately
    some of the underlying framework code that we're using does not honor cancellation
    requests - like for instance `NetworkStream`.
    
    This is a partial fix for #7356.  While this commit significantly improves the problem,
    there may be other unrelated issues left that needs to be investigated.
  4. [mcs] Fixes codegen when probing reference type expression is known t…

    marek-safar committed Apr 5, 2018
    …o pass and pattern variable has to be created
  5. [mono-api-html] Update tool to optionally output markdown

    spouliot authored and marek-safar committed Apr 5, 2018
    Output formatting is now delegate to a `Formatter` subclass. The default
    one remains HTML with `HtmlFormatter` so any script should not see any
    difference.
    
    The output file is largely identical, except a few whitespace changes
    that could not easily be avoided and how modified base types were
    reported, since that was different from the rest.
    
    The big change is the `--md` option which can output markdown, which
    is the format to use from docs.microsoft.com. There are less options
    available, e.g. colors, so additions are rendered using the `csharp`
    blocks, while modification are rendered as a `diff` block.
    
    Each assembly output is made to be easy to re-assemble into a single
    document if needed, e.g. xamarin/xamarin-macios#3814
  6. [coop] Include function names in coop state change assertions (#7923)

    jaykrell committed Apr 6, 2018
    * [coop] Include function names in coop state change assertions
    
    i.e. better reporting here:
    
    https://jenkins.mono-project.com/job/test-mono-pull-request-coop/2298/parsed_console/log.html
    
    ***** MonoTests.System.Runtime.Remoting.RemotingServicesTest
    ***** MonoTests.System.Runtime.Remoting.RemotingServicesTest.Bug46473
    Assertion failure in thread 0x7f21a504b740 due to: Cannot transition thread 0x7f21a504b740 from STATE_BLOCKING with DO_BLOCKING
    Last 3 state transitions: (most recent first)
    [DO_BLOCKING] RUNNING -> STATE_BLOCKING (0) 0 at:
    	at /mnt/jenkins/workspace/test-mono-pull-request-coop/mono/mini/mono(+0x2ef31a) [0x560336a6f31a]
    	at /mnt/jenkins/workspace/test-mono-pull-request-coop/mono/mini/mono(+0x2eb477) [0x560336a6b477]
    	at /mnt/jenkins/workspace/test-mono-pull-request-coop/mono/mini/mono(+0x2ec7a2) [0x560336a6c7a2]
    	at /mnt/jenkins/workspace/test-mono-pull-request-coop/mono/mini/mono(+0x2ec7e6) [0x560336a6c7e6]
    
    This will provide one function instead of 0 or n, and could be expanded to include more.
    
    This bloats shipping binary some (under condfigure only) which can be addressed with
    an #if that conditionally turns the strings to null or empty. And slight code bloat.
    
    Note that JIT and products and test use all this stuff and are left compatible and unchanged.
    
    Previously:
    foo(gpointer *stackdata)
    { ...
    }
    
    stackdata pointing to uninitialized, and not even size-specified
    
    is now:
    
    foo_internal(MonoStackData *stackdata)
    {
    ...
    }
    
    foo(gpointer* stackpointer)
    {
     MonoStackData stackData = { &stackdata, __func__ }; // define MONO_STACKDATA
     stackdata.stackpointer = stackpointer; // replacing &stackdata
     foo_internal(&stackdata);
    }
    
    with __func__ being a known-inaccurate standin for the caller.
    
    If products/JIT/test evolve, flags to indicate which fields are present are likely in order.
    
    Currently only the top function is printed, but we can likely store them longer.
    
    As well running the debugger will help.
    
    backtrace library could also be expanded. Currently it finds symbols on Mac but not Linux.
Commits on Apr 5, 2018