Commit Graph
98472 Commits
Author SHA1 Message Date
Zoltan Varga 7138ab117f [runtime] Add a wrapper around atexit () since it is missing on some android versions. 2014-11-22 00:08:18 -05:00
Zoltan Varga 09d18d4f47 [android] Avoid referencing SYS_fork which is not defined in some ndk versions. 2014-11-21 23:17:13 -05:00
Zoltan Varga 75b30d0fd9 [android] Add a workaround for ndk r10c defining RTLD_DEFAULT as 0 on 64 bit platforms. 2014-11-21 23:17:08 -05:00
Zoltan Varga b813e56737 [android] Disable the usage of tkill () on android/arm64, the tkill () function is no longer there. 2014-11-21 23:17:03 -05:00
Zoltan Varga 117302400a [runtime] Remove another getdtablesize () reference. 2014-11-21 20:40:16 -05:00
Zoltan Varga 399facb8ca [jit] Fix the AOT part of #24577, the epilog beginning was calculated using the code size, which can be different in AOT mode due to alignment padding between methods. 2014-11-21 20:32:27 -05:00
Zoltan Varga 2311da7b9a [runtime] Remove a getdtablesize () reference from eglib too. 2014-11-21 20:32:07 -05:00
Marek Safar 5b3813b1d2 [system.data] Fixes DbEnumerator current property to clone read data. Fixes #24452 2014-11-21 10:28:04 +01:00
Rodrigo Kumpera 2e5167402b [profiler] Use the new hidden API to attach the helper thread as a tools thread. This makes JI lookup work more reliably. 2014-11-20 18:35:21 -05:00
Rodrigo Kumpera bf54221823 [jit] Don't sample threads that are not fully attached. 2014-11-20 18:35:21 -05:00
Rodrigo Kumpera f9afcf06b9 [runtime] Introduce the notion of a tools thread.
A tools thread is one that can access core runtime structures but not touch anything managed (code or heap).

It's intended to enable the profiler to resolve missing backtraces from its helper thread.

THIS IS A HACK.

The right solution would be to not perform this on the profiler at all and simply log IPs and let the decoder
resolve them. But then there's reality and we can't simply break the current format without consequences.

We're taking this hack for now until we can fix the profiler to do something sensible.
2014-11-20 18:35:20 -05:00
Rodrigo Kumpera d955217874 [utils] Add foreach variant that supports filtering the list as you go. 2014-11-20 18:35:20 -05:00
Zoltan Varga d457bae593 Merge pull request #1411 from jbevain/sdb-frame-domain
[sdb] Expose the domain of the stack frames
2014-11-20 04:49:30 -05:00
Zoltan Varga 6e152a16a1 Fix #24577 correctly, cfg->code_len is the size of the code, while cfg->code_size is the size of the memory area allocated for code. 2014-11-20 04:46:24 -05:00
Rolf Bjarne Kvinge a824dad5f6 Fix typo, there is no profile called 'xammaci'. 2014-11-19 10:50:07 +01:00
Zoltan Varga 55fcfb81be [sdb] Avoid asserts on shutdown when the appdomain unload callbacks are called on the debugger thread during shutdown. Fixes #24342. 2014-11-18 20:55:20 -05:00
Zoltan Varga f8691c441b [jit] Remove an assert from mono_arch_find_jit_info () on x86 which can be hit when a profiler stack walk is done while in a jump trampoline. 2014-11-18 16:55:25 -05:00
Zoltan Varga 2f569721a7 [jit] Fix the calculation of the epilog size for EH info. Fixes #24577. 2014-11-18 16:54:48 -05:00
Zoltan Varga f07e7d0850 [jit] Fix a class initialization race which happens if a class initializer initializes a got slot before it finishes running. Fixes #23242. 2014-11-17 21:45:28 -05:00
Rolf Bjarne Kvinge a9a6e86072 [System] Ignore two tests which are failing due to external factors changing.
See https://bugzilla.xamarin.com/show_bug.cgi?id=24340
2014-11-14 00:30:50 +01:00
Jonathan Pryor 219bd64946 [mono-api-html] Allow ignoring addition of property setters.
As mentioned in commit 789517f8, I'm trying to compare inter-API level
differences in Mono.Android.dll, and want to reduce as much
"meaningless noise" as possible -- changes which don't meaningfully
break API or ABI.

Among those "meaningless" changes are the addition of property setters
to properties. Adding a setter doesn't break API or ABI.

Add a `mono-api-html --ignore-changes-property-setters` option.

  --ignore-changes-property-setters:
      Ignore the addition of property setters.

      If a source property contains a getter and the target property
      contains both a getter and a setter, do not flag this as a
      change.
2014-11-13 14:15:52 -05:00
Jonathan Pryor 255a8971e5 [mono-api-html] Make --ignore-changes-virtual less lenient.
As mentioned in commit 789517f8, the intentino of
`mono-api-html --ignore-changes-virtual` is so that when a method is
changed from non-virtual to virtual or override, or from virtual to
override, a "Removed member" message isn't triggered.

However, the previous implementation was too lenient. While *adding*
virtual to the method is fine, *removing* is NOT fine, as that would
be an API breaking change (e.g. all classes which attempt to override
a previously virtual method could no longer do so).

Make the virtual check stricter so that virtual/override to
non-virtual changes are not ignored.
2014-11-13 14:15:52 -05:00
Zoltan Varga 91a4a3d504 Fix the build. 2014-11-13 03:58:22 -05:00
Zoltan Varga 6d5c45d559 [jit] Fix gshared and aot support for --debug=casts. 2014-11-12 20:15:30 -05:00
Zoltan Varga 5e1afc4533 [jit] Fix --debug=casts support for casts in gshared methods. 2014-11-12 20:15:23 -05:00
Jonathan Pryor e7da99bb17 [mono-api-html] Allow ignoring parameter names, virtual.
I've been trying to review API diffs in Xamarin.Android between API
levels, but the diffs are "noisy" because Google will change parameter
names at-will, or will change a non-virtual method into a virtual
method, or a virtual method into an override, all of which are
acceptable changes but individually generate a Removed line in
mono-api-html output, and manually removing the *hundreds* of changes
is error-prone.

Add two new option flags to mono-api-html:

  --ignore-changes-parameter-names:
      Ignore changes in constructor and method parameter names.

      If parameter names change between <reference.xml> and
      <assembly.xml>, don't report a change for the constructor or
      method.

  --ignore-changes-virtual:
      Ignore changes in "virtual-ness".

      If a method or property changes from non-virtual to virtual,
      non-virtual to override, or virtual to override, don't report a
      change for the member.
2014-11-12 17:45:37 -05:00
Rodrigo Kumpera e9e611d501 [runtime] Remove the second signal used by profiling and now multiplex distribution and sampling with the same signal. 2014-11-10 18:40:00 -05:00
Rodrigo Kumpera cefe30a5cc [runtime] Introduce new MonoThread API for signal multiplexing. It's a provisional API until we figure out more of how it's suposed to work. 2014-11-10 18:39:59 -05:00
Rodrigo Kumpera 928436efc6 [profiler] Guard against null sbuff when serializing statistical data. 2014-11-10 18:39:58 -05:00
Rodrigo Kumpera 838ec2fb6f [profiler] Fix statistical backtraces to work and collect as many frames as possible.
This is a jumbo commit that addresses multiple issues with statistical backtrace collection:

1) It's not possible to reliably collect MonoMethod* so we check that they exist before
serializing to the .mlpd file and retrieve in sync context.

2) It was reporting the generic instance MonoMethod* under gsharing. Those methods are
not reported to the profiler since they are never compiled. They would turn out as unknowns.

3) Collecting IL offsets from async context is currently impossible to be done safely, so it's
now disabled. The way we'll do it in the future is by serializing the sequence point table when
JIT'ing.

4) The way we used to collect frames in statistical ignored all frames until the first LMF, which
discards a lot of them under statistical mode. We now properly pass sigcontext and have it been consumed.
In the future we should simply use the callchain mode.
2014-11-10 18:39:58 -05:00
Rodrigo Kumpera 45d8971caa [runtime] Changes mono_stack_walk_async_safe API to be truly async safe.
This is a very very tricky API, so we restrict the returned data to be what's really
possible under sig context.
2014-11-10 18:39:51 -05:00
Rodrigo Kumpera cf53f2aab3 [runtime] Harden the profiler signal handlers against not fully attached threads and HP reentrancy. 2014-11-10 16:46:03 -05:00
Zoltan Varga f2c520372f [jit] Use xmm5 as an fp scratch register on winx64. 2014-11-10 15:31:30 -05:00
Zoltan Varga 3bc58c925b Fix a problem introduced by e19f539121. 2014-11-10 15:31:23 -05:00
Zoltan Varga 3790413f38 [amd64] Make xmm6:xmm15 callee saved on winx64 as required by the ABI. 2014-11-10 15:31:17 -05:00
Rodrigo Kumpera ef4965a6dd [profiler] Expose new profiling modes and allow sampling rate to be set when using signal-based sampling. 2014-11-05 14:01:56 -05:00
Rodrigo Kumpera 7cb75c8355 [profiler] Add new profiler API mono_profiler_set_statistical_mode that gives control to statistical mode and sampling rate. 2014-11-05 14:01:53 -05:00
Rodrigo Kumpera 90a83b65df [profiler] Fix signal based profiling to sample all registered threads.
The current signal profiling code depended on invalid linux behavior of setitimer
allowing multiple threads to register for the same timer. Linux kernel 2.6.12 fixed
this and only the main thread gets the signal. Always.

The correct POSIX behavior happens on OSX/iOS.

On Linux we could use timer_create and SIGEV_THREAD_ID but that would not work on iOS/OSX
since it's specific to it. Given that little detail, I'll leave implementing it as an
exercise to the reader.

The solution, which aims to be as portable as possible, is to use a pair of signals and
have the first one fire the second one against all other threads.

We use a pair of signals since it's not well defined which thread will receive the signal
so detecting this from the signal is non-trivial.
2014-11-05 14:01:49 -05:00
Rodrigo Kumpera 96a5c1247e Make mono_threads_pthread_kill available to mach targets. 2014-11-05 14:01:44 -05:00
Zoltan Varga b5a5402beb [arm] Fix OP_LOCALLOC on arm so it correctly adjusts sp with the param area size even if the size is large. Fixes #24221. 2014-11-04 22:56:38 -05:00
Zoltan Varga 9d2eec1131 [runtime] Fix the android build with ndk r10c. 2014-10-30 18:44:19 -04:00
Zoltan Varga a825298e9d [Mono.Data.Tds] Allow sending of text data longer than 4000 characters by using a different column type. Fixes #21172. 2014-10-30 14:40:26 -04:00
Alexis Christoforides e11a0b175d Revert "[runtime] Fix allocation size calculation for strings in 64-bit builds."
The change has been implicated in https://bugzilla.xamarin.com/show_bug.cgi?id=12842.

This reverts commit b0cff959e4.
2014-10-29 14:58:30 -04:00
Alexis Christoforides 2f5ddd0210 Bump Mono version -> 3.12.0 2014-10-29 13:14:44 -04:00
Zoltan Varga dcdc8414df [llvm] Disable the extension of i8/i16 arguments to i32 on arm64, since the ios calling convention passes them differently than i32. Fixes #22800. 2014-10-29 12:55:31 -04:00
Zoltan Varga 2e8f21d4f2 [llvm] Fix a regression caused by 6ec1ebf990. Do the direct call rewrite only if the caller and callee signature matches. 2014-10-28 23:30:44 -04:00
Zoltan Varga 7e8a11f888 [runtime] Disable the check for overlapping reference and non-reference fields, too much code depends on this to work. 2014-10-28 17:08:09 -04:00
Neale Ferguson 872e97cb30 Add OP_LREM_IMM support;Add implementation of mono_arch_get_delegate_virtual_invoke_impl 2014-10-28 14:48:45 -04:00
Marcos Henrich 36c9c006bc Merge pull request #1298 from esdrubal/uploadfileasync
Fixes missing ContentType on WebClient.UploadFileTaskAsync
2014-10-28 18:21:22 +00:00
Marcos Henrich 137718d9b4 Merge pull request #1321 from esdrubal/currentsystemtimezone
CurrentSystemTimeZone.GetUtcOffset now supports multiple DST periods.
2014-10-28 18:18:54 +00:00