platform/upstream/coreclr.git
8 years agoMerge pull request #4566 from kyulee1/nativecallable
Kyungwoo Lee [Tue, 26 Apr 2016 18:26:28 +0000 (11:26 -0700)]
Merge pull request #4566 from kyulee1/nativecallable

ARM64: Fix NativeCallable

8 years agoMerge pull request #4528 from gkhanna79/DynamicJITLoad
Gaurav Khanna [Tue, 26 Apr 2016 18:22:49 +0000 (11:22 -0700)]
Merge pull request #4528 from gkhanna79/DynamicJITLoad

Refactor FEATURE_MERGE_JIT_AND_ENGINE to allow consuming JIT as a dynamic library

8 years agoMerge pull request #4448 from rahku/arm64toolsetupdate
Rahul Kumar [Tue, 26 Apr 2016 17:17:22 +0000 (10:17 -0700)]
Merge pull request #4448 from rahku/arm64toolsetupdate

Update arm64 toolset. Link against ucrt.
This has following changes:
 1. Update arm64 toolset to latest.
 2. Link against ucrt.
 3. Fix tls offsets which have changed due to updated toolset
 4. Fix source code in decimal.cpp to avoid integer overflow. Result of signed integer overlfow is undefined in C++.
 5. Enable build of sos which can be loaded in arm64 windbg
 6. Add nop to empty assembly marker methods as new toolset generates invalid .pdata for them.

I have verified that arm64 runs are clean

8 years agoThis has following changes:
Rahul Kumar [Tue, 19 Apr 2016 21:22:23 +0000 (14:22 -0700)]
This has following changes:
1. Update arm64 toolset to latest.
2. Link against ucrt.
3. Fix tls offsets which have changed due to updated toolset
4. Fix source code in decimal.cpp to avoid integer overflow. Result of signed integer overlfow is undefined in C++.
5. Enable build of sos which can be loaded in arm64 windbg
6. Add nop to empty assembly marker methods as new toolset generates invalid .pdata for them.

8 years agoKeep FEATURE_MERGE_JIT_AND_ENGINE with refactored approach
Gaurav Khanna [Fri, 22 Apr 2016 19:24:51 +0000 (12:24 -0700)]
Keep FEATURE_MERGE_JIT_AND_ENGINE with refactored approach

8 years agoMerge pull request #4588 from dotnet-bot/from-tfs
Jan Kotas [Tue, 26 Apr 2016 13:38:58 +0000 (06:38 -0700)]
Merge pull request #4588 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoFix razzle build break
Jan Kotas [Tue, 26 Apr 2016 06:55:13 +0000 (23:55 -0700)]
Fix razzle build break

[tfs-changeset: 1599244]

8 years agoAvoid defensive copy in String.Concat(string[]) (#4559)
Stephen Toub [Tue, 26 Apr 2016 01:09:05 +0000 (21:09 -0400)]
Avoid defensive copy in String.Concat(string[]) (#4559)

* Avoid defensive copy in String.Concat(string[])

Today the String.Concat(params string[]) implementation makes a defensive copy of the input string[] in order to avoid issues where another thread mutates the array concurrently with the concatenation.  Such a situation is possible but exceedingly rare, so we can redo the implementation to make it cheaper when there isn't concurrent mutation and more expensive when there is, rather than always having it be more expensive.

This commit changes string.Concat to optimistically assume there won't be such concurrent mutation.  It avoids allocating the defensive string[] array copy, and instead just proceeds to allocate a string of the right length and copy the input strings into it.  If along the way it discovers that something has changed such that the string lengths no longer add up to exactly what was precomputed, then it falls back to the original implementation.

Example microbenchmark:
```C#
using System;
using System.Diagnostics;

public class Program
{
    public static void Main()
    {
        string result;
        string[] inputs = new[] { "abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx", "yz" };
        var sw = new Stopwatch();
        while (true)
        {
            int gen0 = GC.CollectionCount(0);
            sw.Restart();
            for (int i = 0; i < 20000000; i++) result = string.Concat(inputs);
            sw.Stop();
            Console.WriteLine($"{GC.CollectionCount(0) - gen0}: {sw.Elapsed.TotalSeconds}");
        }
    }
}
```
Before the change:
```
> corerun test.exe
1525: 2.0733829
1526: 2.0599474
1526: 2.0717786
1526: 2.0318797
^C
```
After the change:
```
> corerun test.exe
763: 1.4700695
762: 1.446919
763: 1.4581139
763: 1.4568889
^C
```

8 years agoMerge pull request #4574 from wtgodbe/affinity
Matt Mitchell [Mon, 25 Apr 2016 23:32:26 +0000 (16:32 -0700)]
Merge pull request #4574 from wtgodbe/affinity

Set machine affinity for flow jobs in CI

8 years agoARM64: Fix NativeCallable
Kyungwoo Lee [Mon, 25 Apr 2016 18:11:14 +0000 (11:11 -0700)]
ARM64: Fix NativeCallable

Fixes https://github.com/dotnet/coreclr/issues/4422
The issue is that JIT didn't pass UMEntryThunk for the managed function
entry point which is invoked from the native function.
The fix is to enable NativeCallable attribute check to get the right entry point.

8 years agoMerge pull request #4577 from kyulee1/qfix
Kyungwoo Lee [Mon, 25 Apr 2016 22:23:46 +0000 (15:23 -0700)]
Merge pull request #4577 from kyulee1/qfix

ARM64: Quick Fix

8 years agoARM64: Quick Fix
Kyungwoo Lee [Mon, 25 Apr 2016 22:21:09 +0000 (15:21 -0700)]
ARM64: Quick Fix

I accidently made a wrong copy and paste.

8 years agoSet machine affinity for flow jobs in CI
wtgodbe [Mon, 25 Apr 2016 22:12:09 +0000 (15:12 -0700)]
Set machine affinity for flow jobs in CI

8 years agoMerge pull request #4561 from dotnet-bot/from-tfs
Jan Kotas [Mon, 25 Apr 2016 21:11:56 +0000 (14:11 -0700)]
Merge pull request #4561 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #4560 from kyulee1/fixvarargpinvoke
Kyungwoo Lee [Mon, 25 Apr 2016 21:00:20 +0000 (14:00 -0700)]
Merge pull request #4560 from kyulee1/fixvarargpinvoke

ARM64: Fix Vararg for PInvoke

8 years agoARM64: Fix Vararg for PInvoke
Kyungwoo Lee [Fri, 22 Apr 2016 18:27:07 +0000 (11:27 -0700)]
ARM64: Fix Vararg for PInvoke

Fixes https://github.com/dotnet/coreclr/issues/4474
1. Fix entry point to `VarargPInvokeStub_RetBuffArg` instead of
`VarargPInvokeStub` to pass `VASigCookieReg` via `x1` when hasRetBuffArg is
true.
2. The previous fix for varargs SP offset is not correct when both varargs
and callee save regs exist. Fix the SP offset computation from caller's SP.
3. Fix epilog which didn't take varargs into account.

8 years agoMerge pull request #4553 from janvorli/fix-pslog-path
Rahul Kumar [Mon, 25 Apr 2016 18:51:56 +0000 (11:51 -0700)]
Merge pull request #4553 from janvorli/fix-pslog-path

Fix PS version log path

8 years agoMerge pull request #4564 from wtgodbe/coverageFix
William Godbe [Mon, 25 Apr 2016 18:42:58 +0000 (11:42 -0700)]
Merge pull request #4564 from wtgodbe/coverageFix

fix calls to runtest.sh in code coverage build

8 years agoMerge pull request #4542 from kyulee1/nobld
Kyungwoo Lee [Mon, 25 Apr 2016 18:08:50 +0000 (11:08 -0700)]
Merge pull request #4542 from kyulee1/nobld

No BuildOnly job for ARM64

8 years agoMerge pull request #4565 from swgillespie/playlists-2
Sean Gillespie [Mon, 25 Apr 2016 18:03:39 +0000 (11:03 -0700)]
Merge pull request #4565 from swgillespie/playlists-2

Fix error in invocation of runtests.sh for long GC tests

8 years agofix calls to runtest.sh in code coverage build
wtgodbe [Mon, 25 Apr 2016 17:08:04 +0000 (10:08 -0700)]
fix calls to runtest.sh in code coverage build

8 years agoFix error in invocation of runtests.sh for long GC tests
Sean Gillespie [Mon, 25 Apr 2016 17:11:09 +0000 (10:11 -0700)]
Fix error in invocation of runtests.sh for long GC tests

8 years agoMerge pull request #4141 from prajwal-aithal/devel/native-arm-ci
Matt Mitchell [Mon, 25 Apr 2016 16:58:48 +0000 (09:58 -0700)]
Merge pull request #4141 from prajwal-aithal/devel/native-arm-ci

Add CI support for Linux ARM emulator

8 years agoAdd back internal FromCancellation methods
Jan Kotas [Mon, 25 Apr 2016 14:29:52 +0000 (07:29 -0700)]
Add back internal FromCancellation methods

System.Runtime.WindowsRuntime implementation depends on them

[tfs-changeset: 1598965]

8 years agoMerge pull request #4460 from parjong/fix/issue_4404
Jan Vorlicek [Mon, 25 Apr 2016 14:27:02 +0000 (07:27 -0700)]
Merge pull request #4460 from parjong/fix/issue_4404

Uses initialized unw_context_t instead of uninitialized one

8 years agoMerge pull request #4456 from seanshpark/no-inline-asm
Jan Vorlicek [Mon, 25 Apr 2016 04:16:51 +0000 (21:16 -0700)]
Merge pull request #4456 from seanshpark/no-inline-asm

ARM: Fix compile error for unw usage with clang-3.8

8 years agoFix PS version log path
Jan Vorlicek [Mon, 25 Apr 2016 03:46:25 +0000 (20:46 -0700)]
Fix PS version log path

The PS version log path is incorrectly set to the root of the current drive when
building for ARM64 with toolset_dir set. In that case, the `%~dp0` doesn't hold
the current drive and directory anymore.
I have fixed it by using `__LogsDir` instead. It it a good practice to put generated
files somewhere under the bin folder and the logs directory seems appropriate.

8 years agoARM: Fix compile error for unw usage with clang-3.8
SaeHie Park [Thu, 21 Apr 2016 02:27:52 +0000 (11:27 +0900)]
ARM: Fix compile error for unw usage with clang-3.8

This fix is also needed when using clang-3.8
Previous related patch is #4260

8 years agoRenames UpdateUnwindContextWithWinContext
Jonghyun Park [Sun, 24 Apr 2016 23:12:43 +0000 (08:12 +0900)]
Renames UpdateUnwindContextWithWinContext

Ranames UpdateUnwindContextWithWinContext as WinContextToUnwindContext,
and revises to invoke WinContextToUnwindContext always.

8 years agoMerge pull request #4524 from AndyAyersMS/InlineTreeXML
Andy Ayers [Sun, 24 Apr 2016 19:20:27 +0000 (12:20 -0700)]
Merge pull request #4524 from AndyAyersMS/InlineTreeXML

Inliner: enable xml format dump for inlines

8 years agoMerge pull request #4491 from BruceForstall/Fix3561
Bruce Forstall [Sun, 24 Apr 2016 17:07:54 +0000 (10:07 -0700)]
Merge pull request #4491 from BruceForstall/Fix3561

Fix #3561: assert on RyuJIT x86 when generating shl by 1

8 years agoMerge pull request #4544 from janvorli/move-test-wrappers-to-bin
Jan Vorlicek [Sun, 24 Apr 2016 05:10:58 +0000 (22:10 -0700)]
Merge pull request #4544 from janvorli/move-test-wrappers-to-bin

Move generated xunit test wrappers to bin folder

8 years agoReplace uses of FromCancellation -> FromCanceled in mscorlib (#4537)
James Ko [Sun, 24 Apr 2016 01:44:33 +0000 (21:44 -0400)]
Replace uses of FromCancellation -> FromCanceled in mscorlib (#4537)

Replace uses of FromCancellation -> FromCanceled in mscorlib

8 years agoMove generated xunit test wrappers to bin folder
Jan Vorlicek [Sun, 24 Apr 2016 01:10:50 +0000 (18:10 -0700)]
Move generated xunit test wrappers to bin folder

This change modifies the build so that the generated xunit test
wrappers are no longer placed into the source tree, but rather to
the bin folder where all files generated by the build should go.

8 years agoMerge pull request #4533 from ramarag/GC_Stress
Rama krishnan Raghupathy [Sun, 24 Apr 2016 00:50:50 +0000 (17:50 -0700)]
Merge pull request #4533 from ramarag/GC_Stress

Fixing GC stress test layout and Creating a Sanity Run for it

8 years agoNo BuildOnly job for ARM64
Kyungwoo Lee [Sun, 24 Apr 2016 00:06:00 +0000 (17:06 -0700)]
No BuildOnly job for ARM64

bld jobs are not interesting. So delete them from the history.

8 years agoMerge pull request #4541 from janvorli/fix-pe-sections-protection-3
Jan Vorlicek [Sat, 23 Apr 2016 23:18:53 +0000 (16:18 -0700)]
Merge pull request #4541 from janvorli/fix-pe-sections-protection-3

Fix loading of NI images on SELinux

8 years agoFix loading of NI images on SELinux
Jan Vorlicek [Sat, 23 Apr 2016 19:15:29 +0000 (12:15 -0700)]
Fix loading of NI images on SELinux

This change fixes a problem that prevents us to load crossgen-ed managed
assemblies on SELinux when running in confined mode.
The problem was that when we load these images, we also apply relocations
to their sections and so we temporarily switch section protection from
RX to RW and then back. And the switching back (RW -> RX) is something
that SELinux doesn't allow.
The fix is to switch to RWX before applying to relocations for sections
that are RX, since it is allowed then to switch them back to RX.
One more change was needed to get the original protection of the section
before relocation so that we can set it back later. The PE files are
not mapped using VirtualXXXX functions in the PAL and so VirtualProtect
doesn't return the proper original protection, but a fixed value instead.
So for PAL, we derive the original protection from the section attributes.

8 years agoMerge pull request #4429 from swgillespie/fixup-perf-tests
Sean Gillespie [Sat, 23 Apr 2016 20:12:20 +0000 (13:12 -0700)]
Merge pull request #4429 from swgillespie/fixup-perf-tests

Update the GC Performance test framework since the deprecation of DNX

8 years agoMerge pull request #4525 from swgillespie/unix-concurrent-gc-fix
Sean Gillespie [Sat, 23 Apr 2016 19:56:36 +0000 (12:56 -0700)]
Merge pull request #4525 from swgillespie/unix-concurrent-gc-fix

Restore concurrent GC for non-Windows AMD64 platforms

8 years agoMerge pull request #4520 from CarolEidt/BlkOpsRefactor
Carol Eidt [Sat, 23 Apr 2016 14:20:57 +0000 (07:20 -0700)]
Merge pull request #4520 from CarolEidt/BlkOpsRefactor

Block Ops Refactor

8 years agoMerge pull request #4389 from jkotas/gc-update
Jan Kotas [Sat, 23 Apr 2016 12:46:00 +0000 (05:46 -0700)]
Merge pull request #4389 from jkotas/gc-update

Integrate GC changes from CoreRT

8 years agoFixing GC stress test layout and Creating a Sanity Run for it
Rama Krishnan Raghupathy [Sat, 23 Apr 2016 00:43:02 +0000 (17:43 -0700)]
Fixing GC stress test layout and Creating a Sanity Run for it

8 years agoMerge pull request #4532 from mikem8361/sosfixes
Mike McLaughlin [Sat, 23 Apr 2016 06:28:39 +0000 (23:28 -0700)]
Merge pull request #4532 from mikem8361/sosfixes

Fixes various SOS problems and issues.

8 years agoFix #3561: assert on RyuJIT x86 when generating shl by 1
Bruce Forstall [Thu, 21 Apr 2016 22:37:06 +0000 (15:37 -0700)]
Fix #3561: assert on RyuJIT x86 when generating shl by 1

This assert hit in the encoder when we were trying to generate an
INS_shl_N with a constant of 1, instead of using the special xarch
INS_shl_1 encoding, which saves a byte. It turns out, the assert was
and in fact amd64 does generate the suboptimal encoding currently.

The bad code occurs in the RMW case of genCodeForShift(). It turns out
that function is unnecessarily complex, unique (it doesn't use the
common RMW code paths), and has a number of other latent bugs.

To fix this, I split genCodeForShift() by leaving the non-RMW case
there, and adding a genCodeForShiftRMW() function just for the RMW case.
I rewrote the RMW case to use the existing emitInsRMW functions.

Other related cleanups along the way:
1. I changed emitHandleMemOp to consistently set the idInsFmt field,
and changed all callers to stop pre-setting or post-setting this field.
This makes the API much easier to understand. I added a big header
comment for the function. Now, it takes a "basic" insFmt (using ARD,
AWR, or ARW forms), which might be munged to a MRD/MWR/MRW form
if necessary.
2. I changed some places to always use the most derived GenTree type
for all uses. For instance, if the code has
"GenTreeIndir* mem = node->AsIndir()", then always use "mem" from then
on, and don't use "node". I changed some functions to take more derived
GenTree node types.
3. I rewrote the emitInsRMW() functions to be much simpler, and rewrote
their header comments.
4. I added GenTree predicates OperIsShift(), OperIsRotate(), and
OperIsShiftOrRotate().
5. I added function genMapShiftInsToShiftByConstantIns() to encapsulate
mapping from INS_shl to INS_shl_N or INS_shl_1 based on a constant.
This code was in 3 different places already.
6. The change in assertionprop.cpp is simply to make JitDumps readable.

In addition to fixing the bug for RyuJIT/x86, there are a small number
of x64 diffs where we now generate smaller encodings for shift by 1.

8 years agoRemove NEW_EXPERIMENTAL_ASYNC_IO define from mscorlib (#4530)
James Ko [Sat, 23 Apr 2016 03:10:46 +0000 (23:10 -0400)]
Remove NEW_EXPERIMENTAL_ASYNC_IO define from mscorlib (#4530)

8 years agoFixes various SOS problems and issues.
Mike McLaughlin [Sat, 23 Apr 2016 00:18:03 +0000 (17:18 -0700)]
Fixes various SOS problems and issues.

Fixes not printing the method names in various sos commands (clrstack, ip2md, etc).  This was because a NetBSD build change
caused the sos output formatting to use the linux C++ runtime _vsnprintf instead of the PAL's version which supports the %S
format option for WCHAR strings.

The above also fixes issue #4430 "SOS dumplog fails to print out full log content from coredump".

Fixes issue #4402 "Callstack is trashed after an exception" by executing " .settings set EngineInitialization.VerifyFunctionTableCallbacks=false"
during SOS initialization.

Fixes issue #4432 "Missing endline when final frame is HelperMethodFrame". Worked around a bug in WinDbg DML output when
displaying the IP address for a special frame by not using DML.  It doesn't mean anything for special frames anyway and it is usually
is a native code address so the DML !U disassemble doesn't work. I didn't leave it blank like in "clrstack -f" for compatibility with
tests and it is what people are use to.

8 years agoMerge pull request #4526 from wtgodbe/groovyFix
William Godbe [Fri, 22 Apr 2016 22:29:58 +0000 (15:29 -0700)]
Merge pull request #4526 from wtgodbe/groovyFix

Fix unpacking of clr tests in netci.groovy

8 years agoFix unpacking of clr tests in netci.groovy
wtgodbe [Fri, 22 Apr 2016 22:20:42 +0000 (15:20 -0700)]
Fix unpacking of clr tests in netci.groovy

8 years agoRestore the software write watch feature
Sean Gillespie [Fri, 22 Apr 2016 21:51:38 +0000 (14:51 -0700)]
Restore the software write watch feature

8 years agoInliner: enable xml format dump for inlines
Andy Ayers [Fri, 22 Apr 2016 19:20:15 +0000 (12:20 -0700)]
Inliner: enable xml format dump for inlines

Add new config option to dump inline trees as XML, and implement
dumping support.

8 years agoFix build issue on archs where msbuild is not supported (#4517)
Jose Perez Rodriguez [Fri, 22 Apr 2016 21:09:15 +0000 (14:09 -0700)]
Fix build issue on archs where msbuild is not supported (#4517)

Fix build issue on archs where msbuild is not supported

8 years agoUpdate the GC Performance test framework since the deprecation of DNX
Sean Gillespie [Wed, 20 Apr 2016 00:00:41 +0000 (17:00 -0700)]
Update the GC Performance test framework since the deprecation of DNX

8 years agoMerge pull request #4467 from krytarowski/netbsd-support-71
Aditya Mandaleeka [Fri, 22 Apr 2016 20:39:56 +0000 (13:39 -0700)]
Merge pull request #4467 from krytarowski/netbsd-support-71

Add NetBSD support in tests/runtest.sh

8 years agoMerge pull request #4522 from wtgodbe/coverage
William Godbe [Fri, 22 Apr 2016 20:22:08 +0000 (13:22 -0700)]
Merge pull request #4522 from wtgodbe/coverage

Testing prints in netci.groovy

8 years agoFixes for GC update
Jan Kotas [Mon, 18 Apr 2016 17:27:56 +0000 (10:27 -0700)]
Fixes for GC update

8 years agoUpdate GC from CoreRT
Jan Kotas [Mon, 18 Apr 2016 09:31:55 +0000 (02:31 -0700)]
Update GC from CoreRT

https://github.com/dotnet/corert/tree/master/src/Native/gc 102af78f9169082478165e7c676bbee6ae194940

8 years agoTesting prints in netci.groovy
wtgodbe [Fri, 22 Apr 2016 20:13:35 +0000 (13:13 -0700)]
Testing prints in netci.groovy

8 years agoMerge pull request #4493 from swgillespie/playlist
Sean Gillespie [Fri, 22 Apr 2016 20:05:58 +0000 (13:05 -0700)]
Merge pull request #4493 from swgillespie/playlist

Add a "playlists" flag to runtests.sh that will run a list of tests

8 years agoMerge pull request #4498 from BruceForstall/Fix3570
Bruce Forstall [Fri, 22 Apr 2016 20:01:25 +0000 (13:01 -0700)]
Merge pull request #4498 from BruceForstall/Fix3570

Fix #3570: RyuJIT x86: Float/Double mismatch in CodeGen::genStoreInd()

8 years agoFix #3570: RyuJIT x86: Float/Double mismatch in CodeGen::genStoreInd()
Bruce Forstall [Fri, 22 Apr 2016 01:14:39 +0000 (18:14 -0700)]
Fix #3570: RyuJIT x86: Float/Double mismatch in CodeGen::genStoreInd()

There is code in the importer to insert explicit converts between float and double
but it was only running for _TARGET_64BIT_. I changed this to a more appropriate
!_LEGACY_BACKEND_.

8 years agoBlock Ops Refactor
Carol Eidt [Fri, 22 Apr 2016 18:40:46 +0000 (11:40 -0700)]
Block Ops Refactor

Refactor the legacy code dealing with block ops to minimize diffs when they are replaced with assignments.
Also a couple of comment edits and a small cleanup in rationalizer.

8 years agoMerge pull request #4512 from kyulee1/vararg
Kyungwoo Lee [Fri, 22 Apr 2016 18:31:46 +0000 (11:31 -0700)]
Merge pull request #4512 from kyulee1/vararg

ARM64: Fix Frame with VarArg

8 years agoARM64: Fix Frame with VarArg
Kyungwoo Lee [Fri, 22 Apr 2016 13:49:35 +0000 (06:49 -0700)]
ARM64: Fix Frame with VarArg

Fixes https://github.com/dotnet/coreclr/issues/4424
JIT homes incoming vararg (8) registers to the top of the stack.
When stack location is computed for local vars, JIT didn't
take it into consideration causing the overlapped stack
offsets for local vars and varargs. The stack offsets of local vars
corresponding to varargs should point to this home area instead of
the newly alloacted slot.

8 years agoMerge pull request #4515 from wtgodbe/covr
William Godbe [Fri, 22 Apr 2016 17:13:12 +0000 (10:13 -0700)]
Merge pull request #4515 from wtgodbe/covr

Fix running corefx tests for coverage job

8 years agoAdd a "playlists" flag to runtests.sh that will run a list of tests
Sean Gillespie [Thu, 21 Apr 2016 21:12:50 +0000 (14:12 -0700)]
Add a "playlists" flag to runtests.sh that will run a list of tests

8 years agoFix running corefx tests for coverage job
wtgodbe [Fri, 22 Apr 2016 17:07:02 +0000 (10:07 -0700)]
Fix running corefx tests for coverage job

8 years agoUpdating build tools to resolve duplicate perf test discovery (#4492)
Deepak Shankargouda [Fri, 22 Apr 2016 16:13:52 +0000 (09:13 -0700)]
Updating build tools to resolve duplicate perf test discovery (#4492)

8 years agoMerge pull request #4466 from krytarowski/netbsd-support-70
Jan Vorlicek [Fri, 22 Apr 2016 15:31:35 +0000 (08:31 -0700)]
Merge pull request #4466 from krytarowski/netbsd-support-70

Implement CorUnix::GetThreadTimesInternal() for NetBSD-7.0

8 years agoPartly fix the build issue when path to git repository has spaces (for example "d...
Mikhail Pilin [Fri, 22 Apr 2016 09:52:07 +0000 (11:52 +0200)]
Partly fix the build issue when path to git repository has spaces (for example "d:\z z\coreclr"). (#4388)

The same issue in "d:\z z\coreclr\Tools\versioning.targets"(288): $(IntermediateOutputPath) should be "$(IntermediateOutputPath.TrimEnd('\'))" and all other path should be quoted with &quot; in this line.

8 years agoUpdate ParamArrayAttribute.cs (#4442)
Mark Hurd [Fri, 22 Apr 2016 09:49:10 +0000 (19:19 +0930)]
Update ParamArrayAttribute.cs (#4442)

A minor doc error (presumably some copy'n'paste issue).

8 years agoFixes https://github.com/dotnet/coreclr/issues/4252 (#4384)
Bruce Bowyer-Smyth [Fri, 22 Apr 2016 09:47:45 +0000 (19:47 +1000)]
Fixes https://github.com/dotnet/coreclr/issues/4252 (#4384)

Change Join and Concat to access iterator.Current value once. Delegate null checking to StringBuilder.Append

8 years agoMerge pull request #4501 from dotnet-bot/from-tfs
Jan Kotas [Fri, 22 Apr 2016 09:12:59 +0000 (02:12 -0700)]
Merge pull request #4501 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoAdd NetBSD support in tests/runtest.sh
Kamil Rytarowski [Thu, 21 Apr 2016 09:04:05 +0000 (11:04 +0200)]
Add NetBSD support in tests/runtest.sh

8 years agoImplement CorUnix::GetThreadTimesInternal() for NetBSD-7.0
Kamil Rytarowski [Thu, 21 Apr 2016 07:19:54 +0000 (09:19 +0200)]
Implement CorUnix::GetThreadTimesInternal() for NetBSD-7.0

Extract manually time used for a thread (LWP). NetBSD doesn't track
time used separately in user/kernel for threads, it's only done for
processes.

/*
 * KERN_LWP structure. See notes on KERN_PROC2 about adding elements.
 */
struct kinfo_lwp {
// ...
        uint32_t l_rtime_sec;           /* STRUCT TIMEVAL: Real time. */
        uint32_t l_rtime_usec;          /* STRUCT TIMEVAL: Real time. */
// ...
};

  -- /usr/include/sys/sysctl.h

Use the kvm(3) interface for this task.

The current limitation is returning time used for the current thread, not
the one selected at will - as there is no clean conversion (or rather
extraction of "lwpid_t pt_lid" from the private pthread_t structure).

8 years agoMerge pull request #4398 from sejongoh/vector3_testcase
Sejong Oh [Fri, 22 Apr 2016 07:24:25 +0000 (00:24 -0700)]
Merge pull request #4398 from sejongoh/vector3_testcase

Vector3 Interop tests

8 years agoRemove __ConsoleStream from CoreCLR
Jan Kotas [Fri, 22 Apr 2016 04:03:29 +0000 (21:03 -0700)]
Remove __ConsoleStream from CoreCLR

[tfs-changeset: 1598441]

8 years agoFix heap corruption in CPalSynchronizationManager::DoMonitorProcesses (#4454)
Gregg Miskelly [Fri, 22 Apr 2016 03:38:51 +0000 (20:38 -0700)]
Fix heap corruption in CPalSynchronizationManager::DoMonitorProcesses (#4454)

The PAL's WaitFor*Object support had a bug where if one waited on a process,
stopped, waiting and closed the process handle before the process exitted, then
later on when the process exitted it would corrupt the heap here:

   LONG CPalSynchronizationManager::DoMonitorProcesses(
       CPalThread * pthrCurrent)
    {
...
        if (lRemovingCount > 0)
        {
...
                // Set process status to PS_DONE
                pNode->pProcLocalData->ps = PS_DONE;

The issue is that the local process data would be delete when the process
handle was closed. But the synchronization manager would still have a reference
to it.

To fix this, I changed the synchronization manager to hold onto the PAL object in
addition to the local process data.

8 years agoRemove GOLDEN macro. (#4484)
Aditya Mandaleeka [Fri, 22 Apr 2016 03:35:46 +0000 (20:35 -0700)]
Remove GOLDEN macro. (#4484)

8 years agoAdd CI support for Linux ARM emulator
Prajwal A N [Thu, 7 Apr 2016 05:06:06 +0000 (14:06 +0900)]
Add CI support for Linux ARM emulator

Added CI code to support building coreclr inside the
user emulated Linux ARM emulator. It uses chroot jail
to accomplish the build.

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge pull request #4481 from swaroop-sridhar/aagc2
Swaroop Sridhar [Fri, 22 Apr 2016 00:54:48 +0000 (17:54 -0700)]
Merge pull request #4481 from swaroop-sridhar/aagc2

GCInfo: Fix code-offset normalization on ARM

8 years agoDon't allocate in NullStream.CopyToAsync (#4383)
James Ko [Fri, 22 Apr 2016 00:14:21 +0000 (20:14 -0400)]
Don't allocate in NullStream.CopyToAsync (#4383)

8 years agoVector3 Interop tests
Sejong OH [Mon, 18 Apr 2016 10:31:33 +0000 (03:31 -0700)]
Vector3 Interop tests

The native type of Vector3 is struct {float x,y,z} whose size is 12 bytes. RyuJit uses 16-byte register or stack location to store a Vector3 variable with the assumptions below. New testcases are added to check whether RyuJit properly handle interop cases.

RyuJIt back-end makes two assumptions about Vector3 types.

Assumption1: Vector3 type args passed in registers or on stack is rounded to POINTER_SIZE and hence on 64-bit targets it can be read/written as if it were TYP_SIMD16.

Assumption2: Vector3 args passed in registers (e.g. unix) or on stack have their upper 4-bytes being zero. Similarly Vector3 return type value returned from a method will have its upper 4-bytes zeroed out.

8 years agoMerge pull request #4450 from mikem8361/shiminit
Mike McLaughlin [Thu, 21 Apr 2016 22:59:46 +0000 (15:59 -0700)]
Merge pull request #4450 from mikem8361/shiminit

Fix dbgshim race conditions

8 years agoStyle fix: Merges two #ifdef blocks
Jonghyun Park [Thu, 21 Apr 2016 22:53:34 +0000 (07:53 +0900)]
Style fix: Merges two #ifdef blocks

There was an unnecessary break between two #ifdef blocks.

This commit merges these blocks into one block.

8 years agoMerge pull request #4486 from wtgodbe/coverage
William Godbe [Thu, 21 Apr 2016 22:35:41 +0000 (15:35 -0700)]
Merge pull request #4486 from wtgodbe/coverage

Move deletion of PAL tests to after they need to be run

8 years agoMove deletion of PAL tests to after they need to be run
wtgodbe [Thu, 21 Apr 2016 22:23:29 +0000 (15:23 -0700)]
Move deletion of PAL tests to after they need to be run

8 years agoMerge pull request #4444 from wtgodbe/covrTest
William Godbe [Thu, 21 Apr 2016 21:49:13 +0000 (14:49 -0700)]
Merge pull request #4444 from wtgodbe/covrTest

Add coverage test to CI that will run once a week

8 years agoMerge pull request #4480 from Maoni0/enable_vh
Maoni Stephens [Thu, 21 Apr 2016 21:47:28 +0000 (14:47 -0700)]
Merge pull request #4480 from Maoni0/enable_vh

enable heap verification for coreclr on all builds

8 years agoenable heap verification for coreclr on all builds
Maoni0 [Thu, 21 Apr 2016 21:45:04 +0000 (14:45 -0700)]
enable heap verification for coreclr on all builds

8 years agoMerge pull request #4455 from adityamandaleeka/configKnobDoc
Aditya Mandaleeka [Thu, 21 Apr 2016 21:38:38 +0000 (14:38 -0700)]
Merge pull request #4455 from adityamandaleeka/configKnobDoc

Update configuration knob documentation to reflect host configuration options

8 years agoGCInfo: Fix code-offset normalization on ARM
Swaroop Sridhar [Thu, 21 Apr 2016 21:00:26 +0000 (14:00 -0700)]
GCInfo: Fix code-offset normalization on ARM

Fix NORMALIZE_CODE_OFFSET() on ARM to be a loss-less encoding
because safepoint code-offsets are encoded with a -1 adjustment.

8 years agoMerge pull request #4458 from ramarag/CrossDefinitions
Rama krishnan Raghupathy [Thu, 21 Apr 2016 20:27:21 +0000 (13:27 -0700)]
Merge pull request #4458 from ramarag/CrossDefinitions

Correcting the definition for crosscomponents

8 years agoMerge pull request #4399 from erozenfeld/HandleConstantProp
Eugene Rozenfeld [Thu, 21 Apr 2016 20:22:46 +0000 (13:22 -0700)]
Merge pull request #4399 from erozenfeld/HandleConstantProp

Don't perform constant propagation when relocatable handles are involved

8 years agoMerge pull request #4451 from sivarv/stopforgc
Sivarv [Thu, 21 Apr 2016 18:48:52 +0000 (11:48 -0700)]
Merge pull request #4451 from sivarv/stopforgc

Model kill set of CORINFO_HELP_STOP_FOR_GC correctly on unix.

8 years agoFix dbgshim race conditions
Mike McLaughlin [Wed, 13 Apr 2016 20:42:51 +0000 (13:42 -0700)]
Fix dbgshim race conditions

There are two race conditions in the register runtime startup logic: 1) in
CreateProcess (or CreateProcessForLaunch) between the fork() and the execv()
where for VS and mdbg we "see" the coreclr module loaded because the debugger
process and newly created child have the same modules loaded. 2) in attach
between when the child/debuggee loads the coreclr module and when coreclr
finishes initializes the global dac table. In both causes DebugActiveProcess
returns an error when one of the race conditions is hit.

The fix is to create the "continue" named semaphore on the coreclr/debuggee
process side and dbgshim uses that to determine if the coreclr process is
ready and initialized. Fixes issue #4244.

Open the old continue semaphore name and if it doesn't exists create a the new
continue semaphore name for backwards compatibility (see issue 4410).

Do PAL initalization on entry to the public functions instead of the DLLMain handler
which will only be called if the PAL's LoadLibrary is used to load dbgshim. It will be
a lot easier on the debuggers like mdbg to just use dlopen/dlsym and not have to
also call DLLMain.

8 years agoAdd coverage test to CI that will run once a week
wtgodbe [Wed, 20 Apr 2016 17:14:30 +0000 (10:14 -0700)]
Add coverage test to CI that will run once a week

8 years agoMerge pull request #4453 from AndyAyersMS/InlineCleanup
Andy Ayers [Thu, 21 Apr 2016 17:24:12 +0000 (10:24 -0700)]
Merge pull request #4453 from AndyAyersMS/InlineCleanup

Inliner: restore ability to dump jit time, plus some cleanup

8 years agoMerge pull request #4472 from kyulee1/delarm64
Kyungwoo Lee [Thu, 21 Apr 2016 17:01:10 +0000 (10:01 -0700)]
Merge pull request #4472 from kyulee1/delarm64

Delete Non-Windows Arm64 Job

8 years agoDelete Non-Windows Arm64 Job
Kyungwoo Lee [Thu, 21 Apr 2016 16:21:09 +0000 (09:21 -0700)]
Delete Non-Windows Arm64 Job