platform/upstream/dotnet/runtime.git
8 years agoMerge pull request dotnet/coreclr#3401 from mikem8361/sosdocs
Mike McLaughlin [Sat, 27 Feb 2016 03:29:35 +0000 (19:29 -0800)]
Merge pull request dotnet/coreclr#3401 from mikem8361/sosdocs

Add the "sosdocsunix.txt" sos help file to the nuget packages.

Commit migrated from https://github.com/dotnet/coreclr/commit/2916207efaae0dd7800aa69ee4c4f112b72d7fae

8 years agoMerge pull request dotnet/coreclr#3398 from mikem8361/fixstrike
Matt Ellis [Sat, 27 Feb 2016 02:22:11 +0000 (18:22 -0800)]
Merge pull request dotnet/coreclr#3398 from mikem8361/fixstrike

Fix sos/strike build.

Commit migrated from https://github.com/dotnet/coreclr/commit/2effea2c48268a3203e07b035a39ab20fa13fb8f

8 years agoMerge pull request dotnet/coreclr#3390 from briansull/mod-fixes
Brian Sullivan [Sat, 27 Feb 2016 01:59:44 +0000 (17:59 -0800)]
Merge pull request dotnet/coreclr#3390 from briansull/mod-fixes

Fixes GT_MOD codegen and three other issues for ARM64

Commit migrated from https://github.com/dotnet/coreclr/commit/420d6fa5171df70f38ae44e4920ae9be25668106

8 years agoFixes GT_MOD codegen and three other issues for ARM64
Brian Sullivan [Fri, 26 Feb 2016 22:21:51 +0000 (14:21 -0800)]
Fixes GT_MOD codegen and three other issues for ARM64

Fix Issue 3263 - Incorrect codegen for rem.un - Unisgned Remainder
Fix Issue 3317 - Improve the codegen for divide so that we omit checks when we have a constant divisor
Fix Issue 3326 - assert EA_4BYTE or EA_8BYTE
Fix an assert when using alloca with allocation between 65 and 4095 bytes

Also fixed the name for GT_UDIV and GT_UDIV to contain a "un-" prefix.
Added 10 additional passing tests with tag REL_PASS

Commit migrated from https://github.com/dotnet/coreclr/commit/57fcdf4b6982322dd1fe76dd41bd07a545f74985

8 years agoAdd the "sosdocsunix.txt" sos help file to the nuget packages.
Mike McLaughlin [Sat, 27 Feb 2016 01:15:13 +0000 (17:15 -0800)]
Add the "sosdocsunix.txt" sos help file to the nuget packages.

This allows the sos help command to work when installed from our packages.

Commit migrated from https://github.com/dotnet/coreclr/commit/e5678e05128ac84347109cb1528452ee3628ab4b

8 years agoMerge pull request dotnet/coreclr#3393 from janvorli/make-hw-exception-test-pri-0
Jan Vorlicek [Sat, 27 Feb 2016 01:06:01 +0000 (02:06 +0100)]
Merge pull request dotnet/coreclr#3393 from janvorli/make-hw-exception-test-pri-0

Change avtest priority to 0

Commit migrated from https://github.com/dotnet/coreclr/commit/3f7014ce953e60083f4f4412ae4a7b8faefe8243

8 years agoFix sos/strike build.
Mike McLaughlin [Sat, 27 Feb 2016 00:35:19 +0000 (16:35 -0800)]
Fix sos/strike build.

The previous sos commit added some xplat specific files in a "inc" directory that already exists on the tfs side containing the actual dbgeng version of the files.  Renamed the directory to "xplat".

Commit migrated from https://github.com/dotnet/coreclr/commit/a3ebfb74af90dbde9a05d708591b64eb33c5a191

8 years agoMerge pull request dotnet/coreclr#3383 from BruceForstall/FixJitSystemIOFilesystemBinding
Bruce Forstall [Sat, 27 Feb 2016 00:23:38 +0000 (16:23 -0800)]
Merge pull request dotnet/coreclr#3383 from BruceForstall/FixJitSystemIOFilesystemBinding

Change binding of System.IO.FileSystem

Commit migrated from https://github.com/dotnet/coreclr/commit/894d162e62a6028a26f6bd129a299c7694b1bf42

8 years agoChange avtest priority to 0
Jan Vorlicek [Fri, 26 Feb 2016 23:39:00 +0000 (00:39 +0100)]
Change avtest priority to 0

This change modifies the priority of the coreclr regression test avtest
to 0 so that it is run in the lab as part of the CI. This fulfills the

Commit migrated from https://github.com/dotnet/coreclr/commit/c066fb30535f02080629f0500a128cf743070970

8 years agoMerge pull request dotnet/coreclr#3381 from cmckinsey/DevDiv_168744
Chris McKinsey [Fri, 26 Feb 2016 20:37:32 +0000 (12:37 -0800)]
Merge pull request dotnet/coreclr#3381 from cmckinsey/DevDiv_168744

Fix bug in optOptimizeBools for equality of 0/1.

Commit migrated from https://github.com/dotnet/coreclr/commit/9ab9bcb2ffba27b8b5b75d23cc14095bd3e6d5b1

8 years agoMerge pull request dotnet/coreclr#3376 from kyulee1/fixcast
Kyungwoo Lee [Fri, 26 Feb 2016 19:52:22 +0000 (11:52 -0800)]
Merge pull request dotnet/coreclr#3376 from kyulee1/fixcast

ARM64: Fix for casting long to ulong

Commit migrated from https://github.com/dotnet/coreclr/commit/e457eebfa1326b944daa024feb4aee3d26b27b45

8 years agoMerge pull request dotnet/coreclr#3365 from mikem8361/osxexception
Mike McLaughlin [Fri, 26 Feb 2016 19:43:57 +0000 (11:43 -0800)]
Merge pull request dotnet/coreclr#3365 from mikem8361/osxexception

Fix the osx exception port forwarding limitations.

Commit migrated from https://github.com/dotnet/coreclr/commit/057d197dbc5063d9053607784fee68fc1f5dac73

8 years agoFix the osx exception port forwarding limitations.
Mike McLaughlin [Wed, 27 Jan 2016 00:37:14 +0000 (16:37 -0800)]
Fix the osx exception port forwarding limitations.

Cleanup CThreadMachExceptionHandlerNode/CThreadMachExceptionHandlers.

Send forward exception, save thread info, restore thread back to faulting context and restart faulting instruction and forward.

Add MachExceptionInfo struct used to pass all the exception state around. Bump the IP back one when restarting breakpoint exceptions.

Match lldb exception port options.  Found and fix bug with MACH_EXCEPTION_CODES behavior. Needed pack(4) around the exception message structs.

Cleaned up the _ASSERT, CHECK_MACH, FATAL_ERROR macros.

Dump the task level exception ports.

Add more checks to PAL SXS tests. Validate that the fault addr (ExceptionRecord.ExceptionInformation[1]) is correct.  Check that a third party signal handler will be properly chained to.

Commit migrated from https://github.com/dotnet/coreclr/commit/9f6654b6faec5730f71d6c547ea497e406ae4d47

8 years agoChange binding of System.IO.FileSystem
Bruce Forstall [Fri, 26 Feb 2016 19:18:07 +0000 (11:18 -0800)]
Change binding of System.IO.FileSystem

Change the binding from 4.0.1-beta-* to 4.0.0-beta-23302 to match all other
JIT configs. This allows a not-yet-committed test to successfully run, and
doesn't seem to negatively affect existing tests.

Commit migrated from https://github.com/dotnet/coreclr/commit/0dca5017762264f09d26b6150b2e13c005ede5d6

8 years agoMerge pull request dotnet/coreclr#3329 from joperezr/CleanToolRuntime
Jose Perez Rodriguez [Fri, 26 Feb 2016 18:36:08 +0000 (10:36 -0800)]
Merge pull request dotnet/coreclr#3329 from joperezr/CleanToolRuntime

Correctly cleaning up the ToolRuntime folder once a new version is required

Commit migrated from https://github.com/dotnet/coreclr/commit/492d298077b6220c29d3f80c4006ca1820d4efbc

8 years agoFix bug in optOptimizeBools for equality of 0/1.
Chris McKinsey [Fri, 26 Feb 2016 18:04:18 +0000 (10:04 -0800)]
Fix bug in optOptimizeBools for equality of 0/1.

The method optIsBoolCond had a clever way to test for a constant
of value 0/1 by casting the resulting gtIconVal to (unsigned) and
comparing for <= 1. Unfortunately, for 64-bit targets gtIconVal as
ssize_t holds 64-bits and the cast to (unsigned) results in truncating
significant bits and results in the optimization falsely recognizing
legal patterns of bit-tests comparing against 0/1. Because 32-bit
targets represent 64-bit long constants as GT_CNS_LNG they do not
suffer from this problem as the code already had exclusions for them.

Commit migrated from https://github.com/dotnet/coreclr/commit/fbdd95218427aa9be25aaa7730f10e4707404c71

8 years agoMerge pull request dotnet/coreclr#3362 from AndyAyersMS/InlineRefactor5a2
Andy Ayers [Fri, 26 Feb 2016 16:10:41 +0000 (08:10 -0800)]
Merge pull request dotnet/coreclr#3362 from AndyAyersMS/InlineRefactor5a2

InlineRefactoring: capturing bits of legacy policy

Commit migrated from https://github.com/dotnet/coreclr/commit/3e8d97edfef3e8492cf9f0b2e52dfa9570d2a33e

8 years agoMerge pull request dotnet/coreclr#3374 from dotnet-bot/from-tfs
Jan Kotas [Fri, 26 Feb 2016 15:28:42 +0000 (07:28 -0800)]
Merge pull request dotnet/coreclr#3374 from dotnet-bot/from-tfs

Merge changes from TFS

Commit migrated from https://github.com/dotnet/coreclr/commit/839a58d517bfecf7e424679cb950a788daef54c4

8 years agoMerge pull request dotnet/coreclr#3375 from BruceForstall/FixAltJitLoading
Jan Kotas [Fri, 26 Feb 2016 14:55:55 +0000 (06:55 -0800)]
Merge pull request dotnet/coreclr#3375 from BruceForstall/FixAltJitLoading

Fix CoreCLR altjit loading that was broken by LongFile work

Commit migrated from https://github.com/dotnet/coreclr/commit/c5b0444280ba0add2ca8880d240a592642e04f25

8 years agoMerge pull request dotnet/coreclr#3357 from janvorli/fix-stackwalk
Jan Vorlicek [Fri, 26 Feb 2016 10:21:47 +0000 (11:21 +0100)]
Merge pull request dotnet/coreclr#3357 from janvorli/fix-stackwalk

Fix stack walker on Unix

Commit migrated from https://github.com/dotnet/coreclr/commit/ebc23989bd97ba2c59ecc60f308c880d93530312

8 years agoARM64: Fix for casting long to ulong
Kyungwoo Lee [Fri, 26 Feb 2016 07:28:35 +0000 (23:28 -0800)]
ARM64: Fix for casting long to ulong

When converting long (i8) to ulong (u8) with overflow check,
JIT inadvertently inserts 4 byte mov which clears the upper bits.
This explicit conversion is only needed when converting from i4 to u8.

Before
IN0002: 000024      cmp     x0, dotnet/coreclr#0
IN0003: 000028      bge     G_M62889_IG03
IN0004: 00002C      bl      CORINFO_HELP_OVERFLOW
IN0005: 000030      mov     w0, w0   --> Incorrect conversion clearing the
upper 32 bits of x0.

After
IN0005: 000028      cmp     x0, dotnet/coreclr#0
IN0006: 00002C      bge     G_M62889_IG03
IN0007: 000030      bl      CORINFO_HELP_OVERFLOW

Commit migrated from https://github.com/dotnet/coreclr/commit/4ab7237cf21fe4b06d284b8998fb6ddb5d05b7bd

8 years agoFix CoreCLR altjit loading that was broken by LongFile work
Bruce Forstall [Fri, 26 Feb 2016 07:39:39 +0000 (23:39 -0800)]
Fix CoreCLR altjit loading that was broken by LongFile work

Commit migrated from https://github.com/dotnet/coreclr/commit/4b00f647bce012999f1c76313014ee15a13c925f

8 years agoRemove need for mono resgen
Matt Ellis [Fri, 26 Feb 2016 06:40:34 +0000 (22:40 -0800)]
Remove need for mono resgen

The last remaining dependency on mono was to use the resgen
implementation since cross platform we don't have a version of
ResGen.exe. While MSBuild and dotnet-resgen can both convert txt files
into resources, neither of them understand the #if syntax we use in
mscorlib.txt to allow us to remove resources if features of the runtime
are not enabled.

Since we already have a dependency on Python, I've added a dead simple
script that understands the limited preprocessor features we support
and pre-processes the text file. We can then pass that preprocessed file
to MSBuild which will handle converting it to a .resources file.

[tfs-changeset: 1579180]

Commit migrated from https://github.com/dotnet/coreclr/commit/29f52c442a08240b3df1c5893901f9dfcae6751f

8 years agoMerge pull request dotnet/coreclr#3350 from arnmac/patch-1
Jan Kotas [Fri, 26 Feb 2016 04:09:25 +0000 (20:09 -0800)]
Merge pull request dotnet/coreclr#3350 from arnmac/patch-1

Update to freebsd-instructions.md

Commit migrated from https://github.com/dotnet/coreclr/commit/597fb487b5391c0c57a2cef0d51e57c840e34422

8 years agoMerge pull request dotnet/coreclr#3361 from dotnet-bot/from-tfs
Jan Kotas [Fri, 26 Feb 2016 04:07:28 +0000 (20:07 -0800)]
Merge pull request dotnet/coreclr#3361 from dotnet-bot/from-tfs

Merge changes from TFS

Commit migrated from https://github.com/dotnet/coreclr/commit/fb288b1bbc4a83d98ca500c16c51d0734a39db48

8 years agoMerge pull request dotnet/coreclr#3370 from stephentoub/upgrade_buildtools
Stephen Toub [Fri, 26 Feb 2016 04:04:14 +0000 (23:04 -0500)]
Merge pull request dotnet/coreclr#3370 from stephentoub/upgrade_buildtools

Upgrade buildtools to 177

Commit migrated from https://github.com/dotnet/coreclr/commit/ff8cc4486863b19250ae8ba0eabaec2689d5184a

8 years agoMerge pull request dotnet/coreclr#3363 from pallavit/UpdateReflectionSA
Jan Kotas [Fri, 26 Feb 2016 03:24:36 +0000 (19:24 -0800)]
Merge pull request dotnet/coreclr#3363 from pallavit/UpdateReflectionSA

Remove Assembly.EscapeCodeBase property from CoreCLR

Commit migrated from https://github.com/dotnet/coreclr/commit/c7528fe8e59a857dd55592543c5c077c602a62dd

8 years agoInlineRefactoring: capturing bits of legacy policy
Andy Ayers [Thu, 25 Feb 2016 00:14:32 +0000 (16:14 -0800)]
InlineRefactoring: capturing bits of legacy policy

Rework the logic for force inline, basic block count, il size,
and maxstack so that the policy decides when these values
should inhibit inlining.

Commit migrated from https://github.com/dotnet/coreclr/commit/14120d399fa46844bd60c66b5b4bdb4c5ed6435d

8 years agoMerge remote-tracking branch 'upstream/master' into from-tfs
Pat Gavlin [Fri, 26 Feb 2016 02:39:03 +0000 (18:39 -0800)]
Merge remote-tracking branch 'upstream/master' into from-tfs

Conflicts:
src/jit/CMakeLists.txt
src/jit/alloc.cpp
src/jit/alloc.h
src/jit/jit.settings.targets

Commit migrated from https://github.com/dotnet/coreclr/commit/8e7b58bb20f8d03b098d1b6ba1098983979dd3d2

8 years agoUpgrade buildtools to 177
stephentoub [Fri, 26 Feb 2016 02:19:17 +0000 (21:19 -0500)]
Upgrade buildtools to 177

Commit migrated from https://github.com/dotnet/coreclr/commit/8fa544ae96e1656af1224a119a737534f9064ea3

8 years agoMerge pull request dotnet/coreclr#3359 from pgavlin/AllocatorCleanup2
Pat Gavlin [Fri, 26 Feb 2016 02:07:05 +0000 (18:07 -0800)]
Merge pull request dotnet/coreclr#3359 from pgavlin/AllocatorCleanup2

Clean up norls_allocator.

Commit migrated from https://github.com/dotnet/coreclr/commit/795f1e3d0dabc42c4dd06a2129635f31b2866230

8 years agoMerge pull request dotnet/coreclr#3319 from LLITCHEV/implicit-RetBuf-return-type
Lubomir Litchev [Fri, 26 Feb 2016 01:37:18 +0000 (17:37 -0800)]
Merge pull request dotnet/coreclr#3319 from LLITCHEV/implicit-RetBuf-return-type

Explicitly change the type of a method with implicit RetBuf to BYREF for System V OSs.

Commit migrated from https://github.com/dotnet/coreclr/commit/d5e103809a060948e3bdac52c78a99bb5b54d118

8 years agoUpdate norls_allocator to conform to the JIT CC.
Pat Gavlin [Wed, 24 Feb 2016 18:36:00 +0000 (10:36 -0800)]
Update norls_allocator to conform to the JIT CC.

There are no functional changes aside from the removal of a couple
of fields from norls_allocator and norls_pagdesc. As part of this
change, norls_allocator has been renamed to ArenaAllocator to better
reflect its behavior.

Commit migrated from https://github.com/dotnet/coreclr/commit/62ce0e505571896f3a63023c0074c79be1c26a60

8 years agoFix stack walker on Unix
Jan Vorlicek [Wed, 24 Feb 2016 10:51:43 +0000 (11:51 +0100)]
Fix stack walker on Unix

This change fixes the stack walker on Unix to properly account for the cases
when funclet frames were reclaimed due to native frames unwinding and so
they are not on the stack anymore. The stack walker needs to know that to
properly skip reporting GC references for the parent frame of the funclet.
While there was already code attempting to do that, it was incorrectly
skipping some exception trackers and not skipping the current tracker
in case the catch handler was not called yet.
This problem was discovered while running stress tests with GCStress 3.

Commit migrated from https://github.com/dotnet/coreclr/commit/12f1fcdbec8cdc862953f90b4b420d3e4e74657b

8 years agoMerge pull request dotnet/coreclr#3364 from adityamandaleeka/semaphore_name_length
Aditya Mandaleeka [Fri, 26 Feb 2016 00:41:41 +0000 (16:41 -0800)]
Merge pull request dotnet/coreclr#3364 from adityamandaleeka/semaphore_name_length

Reduce length of debugger semaphore names.

Commit migrated from https://github.com/dotnet/coreclr/commit/30df86262f9f1d7fa9f21862a0807c24b5ffe5b1

8 years agoMerge pull request dotnet/coreclr#3336 from mikem8361/sosstack
Mike McLaughlin [Thu, 25 Feb 2016 23:57:03 +0000 (15:57 -0800)]
Merge pull request dotnet/coreclr#3336 from mikem8361/sosstack

Enabled more SOS commands and fixed various issues.

Commit migrated from https://github.com/dotnet/coreclr/commit/28f0e30e4e04a817c8f1e31cf9d2d0b34e5f62dd

8 years agoCreate a version resilient interface between sos (libsos.so) and the lldb plugin
Mike McLaughlin [Sat, 20 Feb 2016 08:27:33 +0000 (00:27 -0800)]
Create a version resilient interface between sos (libsos.so) and the lldb plugin
(libsosplugin.so). There is a ILLDBServices interface between the two with a proper
QI/Addref/Release interface so we can add new interfaces later and still be backwards
and forward compatible. Internally in sos there is a DebugClient wrapper around this
interface that makes it look like all the individual dbgeng interfaces (IDebugControl4,
IDebugSymbols, IDebugDataSpaces, etc) even with QI, etc.

Enable the sos the u (clru), DumpStack (dumpstack), EEStack (eestack), DumpIL (dumpil), DumpSig and
DumpSigElem commands (aliases in parans).

Add the clrstack -f option that displays the intermixed native and managed frames
when managed assembly and offsets.

Implement GetContextFromFrame. Enable the _EFN_* exported functions.

Add source file/line number support (native only) via GetLineByOffset.

Fix bug when executed just "sos". Displays help now.

Disable the U -gcinfo option since it isn't implemented on xplat because it uses Windows fibers.

Fixed a problem where some HelperMethodFrames were not unwinding; clrstack would stop without displaying
managed functions on the stack. The HelperMethodFrames were not sometimes unwinding because the lldb
VirtualUnwind used by the DAC was using (via the data target) to do the out of context unwind has some
limitations.  lldb doesn't have a way to unwind an arbitrary register context so the VirtualUnwind
implementation searches through the thread's frames until it finds a match and returns the next one. The
match was an exact match and in some cases it didn't find a frame. Changed it to check if the incoming
context's SP is in between frames and return the next one if so.

Only add the special internal "corerun" lldb plugin command in debug builds.

Commit migrated from https://github.com/dotnet/coreclr/commit/266ee6dc6d688ec973acfee2e30d61877cd288be

8 years agoExplicitly change the type of a method with implicit RetBuf to BYREF for
Lubomir Litchev [Tue, 23 Feb 2016 18:24:21 +0000 (10:24 -0800)]
Explicitly change the type of a method with implicit RetBuf to BYREF for
System V.

The System V ABI requires the address implicit RetBuf to be returned in
RAX.
Instead of moving the address of the buffer to RAX in codegenxarch.cpp,
change such methods return type to TYP_BYREF and generate the necessary
code to put the address in RAX.

Added/cleaned some comments.

Fixes issue dotnet/coreclr#3299.

Commit migrated from https://github.com/dotnet/coreclr/commit/9f6baf04de71fd6fb795786181dd872c2e5edbb8

8 years agoReduce debugger semaphore name length.
Aditya Mandaleeka [Thu, 25 Feb 2016 21:51:32 +0000 (13:51 -0800)]
Reduce debugger semaphore name length.

Commit migrated from https://github.com/dotnet/coreclr/commit/6275f358331cc079f84ea9ae67dbeef74edf6faf

8 years agoRemove Assembly.EscapeCodeBase property from CoreCLR
Pallavi Taneja [Thu, 25 Feb 2016 21:33:35 +0000 (13:33 -0800)]
Remove Assembly.EscapeCodeBase property from CoreCLR

Commit migrated from https://github.com/dotnet/coreclr/commit/d398442ca43f47284c7b37ff6d7fc6b3e6c1b53c

8 years agoMerge pull request dotnet/coreclr#3346 from AndyAyersMS/InlineRefactor5a1
Andy Ayers [Thu, 25 Feb 2016 21:07:43 +0000 (13:07 -0800)]
Merge pull request dotnet/coreclr#3346 from AndyAyersMS/InlineRefactor5a1

Inline Refactoring: set up policy for bad inlinees

Commit migrated from https://github.com/dotnet/coreclr/commit/d7f2265ca022f780a632918ae642fb4d3986064e

8 years agoMerge pull request dotnet/coreclr#3314 from tijoytom/master
tijoytom [Thu, 25 Feb 2016 20:04:10 +0000 (12:04 -0800)]
Merge pull request dotnet/coreclr#3314 from tijoytom/master

Adding more interop tests.

Commit migrated from https://github.com/dotnet/coreclr/commit/306a27c807b34593aa3f77bfd729c594e65a8845

8 years agoRoll back change 1578859 on behalf of pagavlin. Change broke SuperPMI.
dotnet-bot [Thu, 25 Feb 2016 19:41:31 +0000 (11:41 -0800)]
Roll back change 1578859 on behalf of pagavlin.  Change broke SuperPMI.

[tfs-changeset: 1578925]

Commit migrated from https://github.com/dotnet/coreclr/commit/8ce6630f106425cf6064cfbb7f633af39b3c7973

8 years agoInline Refactoring: set up policy for bad inlinees
Andy Ayers [Tue, 23 Feb 2016 23:21:22 +0000 (15:21 -0800)]
Inline Refactoring: set up policy for bad inlinees

Move inline policies to their own header and cpp file.

Add a method to the policy class to indicate if the policy wants newly
discovered `Never` inline cases to change the callee method attributes
to Noinline. This is an existing optimization that saves time when the
jit sees calls to this callee elsewhere as a possible inline candidates.

For example, in the trace below, at for the call at offset 31, the jit
determines that `ToInt32` is too large to be inlined and so marks it as
noinline. Then when it sees another call to `ToInt31` at offset 44 it
immediately fails the inline attempt.

```
Inlines into RegistryTimeZoneInformation:.ctor(ref):this
  ...
  [IL=0031 TR=000040] [FAILED: too many il bytes] System.BitConverter:ToInt32(ref,int):int
  [IL=0044 TR=000049] [FAILED: noinline per IL/cached result] System.BitConverter:ToInt32(ref,int):int
  [IL=0057 TR=000058] [FAILED: noinline per IL/cached result] System.BitConverter:ToInt32(ref,int):int
```

Diagnostic and experimental policies may choose to disable this
optimization to make it easier to locally reason about failed inlines.

There were 5 calls to `setMethodAttribs` passing `CORINFO_FLG_BAD_INLINEE`.
This change consolidates 4 of them into the inlining code. The remaining
call is for a method with verification errors. I've left it as is.

Commit migrated from https://github.com/dotnet/coreclr/commit/99927794a53ed68b1a55ddba238eff809be79fdc

8 years agoMerge pull request dotnet/coreclr#3356 from bendono/PowerShell
Jan Kotas [Thu, 25 Feb 2016 17:40:59 +0000 (09:40 -0800)]
Merge pull request dotnet/coreclr#3356 from bendono/PowerShell

Validate PowerShell prerequisite. Update documentation. -- Issue dotnet/coreclr#3355

Commit migrated from https://github.com/dotnet/coreclr/commit/97545d6f772546e4737c112007d687c6fbc640b4

8 years agoMerge pull request dotnet/coreclr#3358 from dotnet-bot/from-tfs
Jan Kotas [Thu, 25 Feb 2016 17:09:09 +0000 (09:09 -0800)]
Merge pull request dotnet/coreclr#3358 from dotnet-bot/from-tfs

Merge changes from TFS

Commit migrated from https://github.com/dotnet/coreclr/commit/7a6d8a44c0a2f8d3f431c58aa77b95f15f212756

8 years agoValidate PowerShell prerequisite. Update documentation.
Ben Monroe [Thu, 25 Feb 2016 12:51:35 +0000 (21:51 +0900)]
Validate PowerShell prerequisite. Update documentation.

Commit migrated from https://github.com/dotnet/coreclr/commit/70749779abb4994ef4087f305c41ee14ca495e0b

8 years agoAdd a new set of APIs for JIT configuration.
Pat Gavlin [Thu, 25 Feb 2016 15:19:33 +0000 (07:19 -0800)]
Add a new set of APIs for JIT configuration.

These APIs accommodate the retrieval of config values using the JIT
interface rather than the utilcode library. All configuration options
are now initialized upon the first call to compileMethod. The values
of configuration options are available off of an ambient JitConfig
object.

This also changed `JitHost::get*ConfigValue` to use the
`EEConfig_default` policy instead of `REGUTIL_default` in order to
avoid breaking a small set of JIT config options available in release
builds that were using the former. This change is exceedingly
unlikely to adversely affect the behavior of other JIT config options
that were originally fetched using `REGUTIL_default`, since values
for these options should not be present any locations searched
by `EEConfig_default` that are not searched by
`REGUTIL_default` (namely config files).

[tfs-changeset: 1578859]

Commit migrated from https://github.com/dotnet/coreclr/commit/d2b9a6e8bae487ae092fca2d3bccd109c7ef85f9

8 years agoUpdate freebsd-instructions.md
Aaron Havens [Thu, 25 Feb 2016 14:38:53 +0000 (08:38 -0600)]
Update freebsd-instructions.md

Corrected the typo.

Commit migrated from https://github.com/dotnet/coreclr/commit/a9d71c9594bd7a67639455a135853ec8063a6b96

8 years agoMerge pull request dotnet/coreclr#3354 from dotnet-bot/from-tfs
Jan Kotas [Thu, 25 Feb 2016 14:29:11 +0000 (06:29 -0800)]
Merge pull request dotnet/coreclr#3354 from dotnet-bot/from-tfs

Merge changes from TFS

Commit migrated from https://github.com/dotnet/coreclr/commit/c3b883ca33c1080ec65815684aabce462624b1b4

8 years agoMerge pull request dotnet/coreclr#3353 from jkotas/gc-update
Jan Kotas [Thu, 25 Feb 2016 14:28:59 +0000 (06:28 -0800)]
Merge pull request dotnet/coreclr#3353 from jkotas/gc-update

Update GC from CoreRT

Commit migrated from https://github.com/dotnet/coreclr/commit/743751d4569efb02749ae8304e1bd3f64f4899b3

8 years agoMerge pull request dotnet/coreclr#3335 from dotnet-bot/from-tfs
Jan Kotas [Thu, 25 Feb 2016 07:59:25 +0000 (23:59 -0800)]
Merge pull request dotnet/coreclr#3335 from dotnet-bot/from-tfs

Merge changes from TFS

Commit migrated from https://github.com/dotnet/coreclr/commit/41fcf5dc470e704243693b63ebf546fd7dcc614d

8 years agoFixes for GC update
Jan Kotas [Thu, 25 Feb 2016 07:53:11 +0000 (23:53 -0800)]
Fixes for GC update

Commit migrated from https://github.com/dotnet/coreclr/commit/a1775a988af161a8268d7269c432246aad486a93

8 years agoWorkaround missing UrlEscape
Jan Kotas [Thu, 25 Feb 2016 07:01:24 +0000 (23:01 -0800)]
Workaround missing UrlEscape

Commit migrated from https://github.com/dotnet/coreclr/commit/0870772cad98e2606136cf4a9d66874a1c613722

8 years agoUpdate GC from CoreRT
Jan Kotas [Thu, 25 Feb 2016 06:41:19 +0000 (22:41 -0800)]
Update GC from CoreRT

https://github.com/dotnet/corert/tree/master/src/Native/gc dotnet/coreclr@d18f7e5d9fea784b4531aa8988fdad9f3a9cffc3

Commit migrated from https://github.com/dotnet/coreclr/commit/e1fd6dc6d5adf7c4107e60fdb8a6bcb5fc57069f

8 years agoFix build break - add precompiled header
Jan Kotas [Thu, 25 Feb 2016 06:24:59 +0000 (22:24 -0800)]
Fix build break - add precompiled header

Commit migrated from https://github.com/dotnet/coreclr/commit/4ab569915e02a4c314a772a43732d58fa67ebeff

8 years agoMerge pull request dotnet/coreclr#3339 from RussKeldorph/msvcrt
Jan Kotas [Thu, 25 Feb 2016 06:07:57 +0000 (22:07 -0800)]
Merge pull request dotnet/coreclr#3339 from RussKeldorph/msvcrt

Replace reference to msvcr110.dll with msvcrt.dll in test b286991

Commit migrated from https://github.com/dotnet/coreclr/commit/81e977ce7be76c4bda86aeb952d13dc136998341

8 years agoMerge pull request dotnet/coreclr#3334 from brianrob/perfmap_crossgen_r2r
Jan Kotas [Thu, 25 Feb 2016 04:28:57 +0000 (20:28 -0800)]
Merge pull request dotnet/coreclr#3334 from brianrob/perfmap_crossgen_r2r

Fix PerfMap::GetNativeImageSignature to work for ready to run images

Commit migrated from https://github.com/dotnet/coreclr/commit/f89218fcb92c45b0fb045bf61253991b5cbd5883

8 years agoMerge pull request dotnet/coreclr#3296 from CarolEidt/NonLeafLongOpnd3292
Carol Eidt [Thu, 25 Feb 2016 04:18:43 +0000 (20:18 -0800)]
Merge pull request dotnet/coreclr#3296 from CarolEidt/NonLeafLongOpnd3292

Handle long operators with non-leaf operands

Commit migrated from https://github.com/dotnet/coreclr/commit/47489e02d035e207d89f54bf7714c33e24a04882

8 years agoUpdate to freebsd-instructions.md
Aaron Havens [Thu, 25 Feb 2016 03:34:49 +0000 (21:34 -0600)]
Update to freebsd-instructions.md

Added note specifically calling out the need to add the clang version to the build command.

Commit migrated from https://github.com/dotnet/coreclr/commit/6cdf20d6b2e781f16dc56c573d607fab6fa6ad4e

8 years agoMerge pull request dotnet/coreclr#3340 from stephentoub/debuggernotify_model
Jan Kotas [Thu, 25 Feb 2016 03:06:19 +0000 (19:06 -0800)]
Merge pull request dotnet/coreclr#3340 from stephentoub/debuggernotify_model

Ensure Debugger.NotifyOfCrossthreadDependency is exposed from mscorlib

Commit migrated from https://github.com/dotnet/coreclr/commit/b41c31be22c217c14a2d25ec9f9649bb5f28d6ea

8 years agoMerge pull request dotnet/coreclr#3341 from jkotas/tokenkind-newobj
Jan Kotas [Thu, 25 Feb 2016 03:06:04 +0000 (19:06 -0800)]
Merge pull request dotnet/coreclr#3341 from jkotas/tokenkind-newobj

Add CORINFO_TOKENKIND_NewObj

Commit migrated from https://github.com/dotnet/coreclr/commit/c707b0d874b671bd7316a1525f999708f5185901

8 years agoMerge pull request dotnet/coreclr#3331 from brianrob/crossgen_perfmap
Jan Kotas [Thu, 25 Feb 2016 02:15:11 +0000 (18:15 -0800)]
Merge pull request dotnet/coreclr#3331 from brianrob/crossgen_perfmap

Update Crossgen /CreatePerfMap to clear NGENWORKER_FLAGS_READYTORUN

Commit migrated from https://github.com/dotnet/coreclr/commit/68569db603a6a0ff3a1414648a0e2b4ea0f870ce

8 years agoMerge pull request dotnet/coreclr#3348 from JohnChen0/master
Jan Kotas [Thu, 25 Feb 2016 00:58:56 +0000 (16:58 -0800)]
Merge pull request dotnet/coreclr#3348 from JohnChen0/master

Fix .gitignore so src/tools is not ignored

Commit migrated from https://github.com/dotnet/coreclr/commit/fd3b7660e8374d4388d25edb507526c0b960d535

8 years agoMerge pull request dotnet/coreclr#3333 from pgavlin/JitAllocatorCleanup
Pat Gavlin [Thu, 25 Feb 2016 00:29:55 +0000 (16:29 -0800)]
Merge pull request dotnet/coreclr#3333 from pgavlin/JitAllocatorCleanup

Remove dead definitions in alloc.h.

Commit migrated from https://github.com/dotnet/coreclr/commit/b3492ccb912ea1e13c4f89e7ecc66b5023177733

8 years agoMerge pull request dotnet/coreclr#3345 from sivarv/vector3fix
Sivarv [Wed, 24 Feb 2016 23:56:25 +0000 (15:56 -0800)]
Merge pull request dotnet/coreclr#3345 from sivarv/vector3fix

Fix to second CoreFX SIMD test failure mentioned in issue dotnet/coreclr#2886.

Commit migrated from https://github.com/dotnet/coreclr/commit/5d85c07b48ec44975e16eb6a0c22d2ccc16f7f1f

8 years agoMerge pull request dotnet/coreclr#3343 from rahku/Helix
Rahul Kumar [Wed, 24 Feb 2016 21:30:48 +0000 (13:30 -0800)]
Merge pull request dotnet/coreclr#3343 from rahku/Helix

Helix testing : Add xunit.performance.core to core_root. required for few jit tests

Commit migrated from https://github.com/dotnet/coreclr/commit/0d88461f079c94cce1dbfc005b41d88cf0bc124c

8 years agoFix to second CoreFX SIMD test failure mentioned in issue dotnet/coreclr#2886.
sivarv [Wed, 24 Feb 2016 19:26:15 +0000 (11:26 -0800)]
Fix to second CoreFX SIMD test failure mentioned in issue dotnet/coreclr#2886.

Root Cause:
The following managed method is executed by the test

  Vector3 Vecor3.Normalize(Vector3)

Vector3 on Unix gets passed in two registers by caller of Normalize()
method.  Within prolog of Normalie(), RyuJIt homes Vector3 arg by
writing only 12 bytes of arg regs xmm0/xmm1. As a result the upper
4-bytes could end up garbage.  Further down test performs dot product
and the codegen of which makes the assumption that Vector3 types
when loaded in regs will have upper 4-bytes zero'ed out.  Since
that assumption is violated, incorrect results gets computed and
hence CoreFx test failure not fiding expected result.

Fix:  While homing Vector3 arg treat it as TYP_SIMD16 and home
16-bytes of arg regs xmm0/xmm1.

Also added a TODO comment on the assumptions RyuJIT is making on
Vector3 type.  Will be opening a Git issue for the same.

Commit migrated from https://github.com/dotnet/coreclr/commit/c12afaa189db63f67720c64e792e9846a58d7604

8 years agoMerge pull request dotnet/coreclr#3315 from AndyAyersMS/InlineRefactor5
Andy Ayers [Wed, 24 Feb 2016 18:41:21 +0000 (10:41 -0800)]
Merge pull request dotnet/coreclr#3315 from AndyAyersMS/InlineRefactor5

InlineRefactoring: introducing InlinePolicy

Commit migrated from https://github.com/dotnet/coreclr/commit/71106b6403a3497a3742d0e7b788b81098a9b007

8 years agoMerge pull request dotnet/coreclr#3233 from vancem/RemoveSecurityCheck
Jan Kotas [Wed, 24 Feb 2016 17:23:01 +0000 (09:23 -0800)]
Merge pull request dotnet/coreclr#3233 from vancem/RemoveSecurityCheck

Revert "Revert "Remove useless security checks""

Commit migrated from https://github.com/dotnet/coreclr/commit/dbff91b27458ee1472ea4ed3f68f49e40b3df5ed

8 years agoMerge pull request dotnet/coreclr#3316 from kyulee1/fixmustexpand
Kyungwoo Lee [Wed, 24 Feb 2016 17:14:48 +0000 (09:14 -0800)]
Merge pull request dotnet/coreclr#3316 from kyulee1/fixmustexpand

Fix for pMustExpand early fail.

Commit migrated from https://github.com/dotnet/coreclr/commit/4c3193cbda64ed2be1354a1ca739c9eed84cfeeb

8 years agoFix for Bug 192726:[amd64][ilGen] gtVNPair_GetLiberal assert
dotnet-bot [Wed, 24 Feb 2016 16:51:21 +0000 (08:51 -0800)]
Fix for Bug 192726:[amd64][ilGen] gtVNPair_GetLiberal assert

The previously added asserts in fgMorph about valid value numbers are not always true. In the failing case, it turned out a GT_COMMA came out of fgMorph after value numbering did have a NoVN value number. The fix here is to simply remove the asserts since the code there does not really care about what value numbers the child expressions have.

[tfs-changeset: 1578470]

Commit migrated from https://github.com/dotnet/coreclr/commit/5417290155cc3fd6e9f6fbf58d95da11e0d89179

8 years agoAdd CORINFO_TOKENKIND_NewObj
Jan Kotas [Wed, 24 Feb 2016 16:07:23 +0000 (08:07 -0800)]
Add CORINFO_TOKENKIND_NewObj

CoreRT implementation of the JIT-EE interface needs to know whether the token is coming from newobj instruction

Commit migrated from https://github.com/dotnet/coreclr/commit/0f48c5d718b66689bd269bb3d47239ea94562da3

8 years agoEnsure Debugger.NotifyOfCrossthreadDependency is exposed from mscorlib
stephentoub [Wed, 24 Feb 2016 16:03:50 +0000 (11:03 -0500)]
Ensure Debugger.NotifyOfCrossthreadDependency is exposed from mscorlib

Commit migrated from https://github.com/dotnet/coreclr/commit/893c951dd469fb4d96bbded5261651601493e2bf

8 years agoReplace reference to msvcr110.dll with msvcrt.dll in test b286991
Russ Keldorph [Wed, 24 Feb 2016 15:40:46 +0000 (07:40 -0800)]
Replace reference to msvcr110.dll with msvcrt.dll in test b286991

Removes unnecessary (and unsupported) dependency and makes the test
consistent with its peers.

Commit migrated from https://github.com/dotnet/coreclr/commit/6f55e88c29084c72dbc628f89e52b785e4534989

8 years ago[Fix build break] In the previous change I exposed some APIs in mscorlib.dll to unblo...
Pallavi Taneja [Tue, 23 Feb 2016 23:54:09 +0000 (15:54 -0800)]
[Fix build break] In the previous change I exposed some APIs in mscorlib.dll to unblock System.Reflection change. However, crossgen.exe trips on this mscorlib.dll since some of the methods it uses is not part of the FEATURE_CORECLR. This change simply exposes these APIs for now.

[tfs-changeset: 1578199]

Commit migrated from https://github.com/dotnet/coreclr/commit/89f7be2c96392febd6ac0327d8d4a6317201d8fc

8 years agoRemove dead definitions in alloc.h.
Pat Gavlin [Tue, 23 Feb 2016 23:46:23 +0000 (15:46 -0800)]
Remove dead definitions in alloc.h.

Just what it says on the tin.

Commit migrated from https://github.com/dotnet/coreclr/commit/6b50b538e0c91a46da9f266d1aa01435cda8a34f

8 years agoFix PerfMap::GetNativeImageSignature to work for ready to run images.
Brian Robbins [Tue, 23 Feb 2016 23:34:44 +0000 (15:34 -0800)]
Fix PerfMap::GetNativeImageSignature to work for ready to run images.

Commit migrated from https://github.com/dotnet/coreclr/commit/fcafa823027bfac03ef021c439962e8d574702cd

8 years agoUpdate crossgen /CreatePerfMap to clear NGENWORKER_FLAGS_READYTORUN.
Brian Robbins [Tue, 23 Feb 2016 22:01:12 +0000 (14:01 -0800)]
Update crossgen /CreatePerfMap to clear NGENWORKER_FLAGS_READYTORUN.

Commit migrated from https://github.com/dotnet/coreclr/commit/78f3320ae95430479fe375240989236587262415

8 years agoExpose a hosting interface for the JIT.
Pat Gavlin [Tue, 23 Feb 2016 21:53:32 +0000 (13:53 -0800)]
Expose a hosting interface for the JIT.

This is the first significant step towards removing the JIT's dependence on utilcode.
This change introduces a new interface, `ICorJitHost`, that allows functionality that
would usually be provided by the OS to be overridden by the program that is hosting
the JIT. At the moment, this is limited to memory allocation and configuration value
(e.g. environment variable) access. If the JIT exports a function named `jitStartup`,
an instance of the `ICorJitHost` must be provided via that function before the first
call to `getJit`.

The VM and other implementors of the JIT interface have been updated accordingly.
Most implementors should use the common implementation of `ICorJitHost` (cleverly
named `JitHost`) in utilcode which respects the CLR's hosting policy.

Note that this change does not update RyuJIT (or any other JITs) to use any of the
functionality exposed by `ICorJitHost`; that work is left for future changes.

[tfs-changeset: 1578176]

Commit migrated from https://github.com/dotnet/coreclr/commit/dfd6ab2348b4b151bb90d3bd7deb6a7304bbafac

8 years agoFix for pMustExpand early fail.
Kyungwoo Lee [Tue, 23 Feb 2016 16:34:59 +0000 (08:34 -0800)]
Fix for pMustExpand early fail.

When EE tells Jit to enforce intrinsic expansion, we also checked whether
the intrinsic will be turned into a user call by IsIntrinsicImplementedByUserCall.
In fact, this API is primarily for math intrinsic and thus somewhat ambiguous since
even for any arbitrary non-math intrinsic ID, it returns true.
There are some side-effects, so I didn't refactor this API in this change.
Instead, the fix for pMustExpand is to check whether gtFlags has GTF_CALL.

Commit migrated from https://github.com/dotnet/coreclr/commit/650a53b9d0778525cfec881e6ea88d58e15451cd

8 years agoCorrectly cleaning up the ToolRuntime folder once a new version is required
Jose Perez Rodriguez [Tue, 23 Feb 2016 20:50:19 +0000 (12:50 -0800)]
Correctly cleaning up the ToolRuntime folder once a new version is required

Commit migrated from https://github.com/dotnet/coreclr/commit/bd1025e4b603655a239b15bcc93d817cb1caec8d

8 years agoAdding more interop tests.
tijoytom [Tue, 23 Feb 2016 15:18:11 +0000 (15:18 +0000)]
Adding more interop tests.

Commit migrated from https://github.com/dotnet/coreclr/commit/ac71f8a8a4ed23bbcacb449537a8bce2053c9f29

8 years agoFix Guid.TryParse to not throw FormatException
stephentoub [Mon, 22 Feb 2016 19:58:49 +0000 (14:58 -0500)]
Fix Guid.TryParse to not throw FormatException

In certain situations, e.g.
```
Guid g;
Guid.TryParse("{0xdddddddd, 0xdddd, 0xdddd,{0xdd0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}", out g);
```
Guid.TryParse is throwing a FormatException rather than returning false.  This is due to a call to Convert.ToInt32 on one code path that's throwing.

Commit migrated from https://github.com/dotnet/coreclr/commit/73e596d0a44df010b6c66dc4f0a7342cb7955ee0

8 years agoHandle long operators with non-leaf operands on RyuJIT/x86
Carol Eidt [Mon, 22 Feb 2016 18:32:20 +0000 (10:32 -0800)]
Handle long operators with non-leaf operands on RyuJIT/x86

For non-leaf operands, we need to reorder more than just single nodes.
More complex handling is required if the two nodes being reordered
have side effects (that is NYI for now). Otherwise, we need to link
the first node in each sub-tree with the previous sub-tree.

Fixes dotnet/coreclr#3292

Commit migrated from https://github.com/dotnet/coreclr/commit/89945b63fb8984326f30f4014bcea596df40a191

8 years agoExpose necessary surface area required for API Convergence effort for System.Reflection
Pallavi Taneja [Tue, 23 Feb 2016 19:03:19 +0000 (11:03 -0800)]
Expose necessary surface area required for API Convergence effort for System.Reflection

[tfs-changeset: 1578145]

Commit migrated from https://github.com/dotnet/coreclr/commit/1ef30f932c1092ead58f7923f6dda999ae77780a

8 years agoInlineRefactoring: introducing InlinePolicy
Andy Ayers [Mon, 22 Feb 2016 21:51:52 +0000 (13:51 -0800)]
InlineRefactoring: introducing InlinePolicy

Split the policy aspect of the InlineResult into a separate
policy object, acessed from the InlineResult via a base class.

Implement a LegacyPolicy to capture today's behavior.

Create a factory method for determining what policy to use. Right
now it always creates a LegacyPolicy. This is newed up for each
Inline decision, but since the InlineResult has relatively short
lifetime, we should probably recycle policy objects (might be
more desirable once they start having a bit more state).

Split out a bunch of the InlineDecision helper methods that lived
on InlineResult into global methods since policies will want to refer
to them too. Shame that enum classes don't allow member functions.

Commit migrated from https://github.com/dotnet/coreclr/commit/d5d25db5934520997ef085bd5f973451fd15a947

8 years agoMerge pull request dotnet/coreclr#3300 from dotnet/InlineRefactor4f
Andy Ayers [Tue, 23 Feb 2016 16:21:51 +0000 (08:21 -0800)]
Merge pull request dotnet/coreclr#3300 from dotnet/InlineRefactor4f

InlineRefactoring: capture remaining failing cases in inline tree

Commit migrated from https://github.com/dotnet/coreclr/commit/e9fa953a295d16b7e00e9192b4973743398358e9

8 years agoMerge pull request dotnet/coreclr#3301 from stephentoub/fix_guid_tryparse
Jan Kotas [Tue, 23 Feb 2016 15:03:14 +0000 (07:03 -0800)]
Merge pull request dotnet/coreclr#3301 from stephentoub/fix_guid_tryparse

Fix Guid.TryParse to not throw FormatException

Commit migrated from https://github.com/dotnet/coreclr/commit/b8f49126e79e850382d8837241b0dd27566de91f

8 years agoMerge pull request dotnet/coreclr#3307 from krytarowski/netbsd-support-56
Jan Kotas [Tue, 23 Feb 2016 14:59:03 +0000 (06:59 -0800)]
Merge pull request dotnet/coreclr#3307 from krytarowski/netbsd-support-56

Fix build issue on NetBSD: Include <stdarg.h> for va_list

Commit migrated from https://github.com/dotnet/coreclr/commit/c9dc9eab848e88142329435348538feedf9af03f

8 years agoInlineRefactoring: capture remaining failing cases in inline tree
Andy Ayers [Mon, 22 Feb 2016 18:38:49 +0000 (10:38 -0800)]
InlineRefactoring: capture remaining failing cases in inline tree

The main ininling loop in `fgInline` currently only looks at calls
that are inline candidates and at top-level in their statements.
This is sensible since any call that is an inline candidate has been
hoisted to top-level during importing.

However, to find all the failed inline cases, the jit also needs to
look through the full tree to find calls that were not identified as
candidates.

For instance, in the Secant test, the jit decides to inline `TestBase`
into `Main`. While importing the code for `TestBase` for inlining, the
jit sees that the call to `Bench` is marked with
`[MethodImpl(MethodImplOptions.NoInlining)]` and so the call is not
considered to be an inline candidate. And because `Bench` returns a
value, the call expression is in a subtree under an assign expression.
Thus the failure to inline `Bench` is overlooked by the current code.

```
;; current code
Inlines into Secant:Main():int
  [IL=0000 TR=000001] [below ALWAYS_INLINE size] Secant:TestBase():bool
```

With this change, under DEBUG, the main inline control loop in `fgInline`
now also scans the tree for non-candidates, and adds their failures
to the InlineContext tree in appropriate locations.

`fgMorphInline` and `fgMorphInlineHelper` are now simpified since they
can assume any call they see must be a candidate.

The jit now also only notes failures for `CT_USER_FUNC` calls, since
otherwise the trees would be full of failed calls to helpers and the
like.

With this change, the jit can now report that `Bench` is a failed inline
into `Main`.

```
;; new code
Inlines into Secant:Main():int
  [IL=0000 TR=000001] [below ALWAYS_INLINE size] Secant:TestBase():bool
    [IL=0000 TR=000021] [FAILED: noinline per IL/cached result] Secant:Bench():bool
```

Commit migrated from https://github.com/dotnet/coreclr/commit/fff03183878a074539544f9b3c3d1cda8176fc85

8 years agoMerge pull request dotnet/coreclr#3303 from LLITCHEV/PutArgStk-GC-hole
Lubomir Litchev [Tue, 23 Feb 2016 03:25:46 +0000 (19:25 -0800)]
Merge pull request dotnet/coreclr#3303 from LLITCHEV/PutArgStk-GC-hole

Fix a hole in the GC generated for PutArgStructStk.
Thanks all!

Commit migrated from https://github.com/dotnet/coreclr/commit/bdd5be00414fc53d427a03f515e447f73f4fd5c5

8 years agoMerge pull request dotnet/coreclr#3304 from andschwa/sigchld
Jan Kotas [Tue, 23 Feb 2016 03:04:24 +0000 (19:04 -0800)]
Merge pull request dotnet/coreclr#3304 from andschwa/sigchld

Remove mask of SIGCHLD

Commit migrated from https://github.com/dotnet/coreclr/commit/0b1b9f4052de4019bb111f835771dfbba9c814c9

8 years agoAdd xunit.performance.core to core_root. required for few jit tests
Rahul Kumar [Tue, 23 Feb 2016 02:03:28 +0000 (18:03 -0800)]
Add xunit.performance.core to core_root. required for few jit tests

Commit migrated from https://github.com/dotnet/coreclr/commit/e1a873cc9215fe92831c4b8c665fc07d60746b43

8 years agoMerge pull request dotnet/coreclr#3248 from adityamandaleeka/twowaypipe_cleanup
Aditya Mandaleeka [Tue, 23 Feb 2016 02:03:20 +0000 (18:03 -0800)]
Merge pull request dotnet/coreclr#3248 from adityamandaleeka/twowaypipe_cleanup

Disambiguate debug pipe names with more than just PID

Commit migrated from https://github.com/dotnet/coreclr/commit/0a3fe0f45ae75f31db0b5d2518847ed51b4f13dd

8 years agoFix a hole in the GC generated for PutArgStructStk.
Lubomir Litchev [Mon, 22 Feb 2016 22:45:53 +0000 (14:45 -0800)]
Fix a hole in the GC generated for PutArgStructStk.

On System V there is a hole (tanks @CarolEidt for pointing it out) where
while copying struct to the stack in the OutgoingParamArea the GC-ness
for the register used to copy the struct is not  properly set.
This change fixes the issue.

This change also makes sure when copying to/from stack, an emitAttr of
EA_PTRSIZE is used - stack variables are never moved by GC, so using this
type in such case should is fine.

Commit migrated from https://github.com/dotnet/coreclr/commit/21db33e10cfee04f914fdaceefa1ed2fd2ad1f52

8 years agoFix build issue on NetBSD: Include <stdarg.h> for va_list
Kamil Rytarowski [Tue, 23 Feb 2016 00:17:42 +0000 (01:17 +0100)]
Fix build issue on NetBSD: Include <stdarg.h> for va_list

This has been triggered during llilc build.

Commit migrated from https://github.com/dotnet/coreclr/commit/5c8e36a432f78f6535121b3e271804d49e8e6814

8 years agoRemove mask of SIGCHLD
Andrew Schwartzmeyer [Mon, 22 Feb 2016 23:08:05 +0000 (15:08 -0800)]
Remove mask of SIGCHLD

When a .NET Core program invoked a process that invoked its own child,
the masking of SIGCHLD prevented the process from recognizing its child
had exited, which some processes require. This caused the .NET Core app
to hang in certain internal scenarios.

Commit migrated from https://github.com/dotnet/coreclr/commit/d0ede1557b29f833268845ba85fd27bb66fcb23b

8 years agoMerge pull request dotnet/coreclr#3293 from jkotas/r2r-default-callconv
Jan Kotas [Mon, 22 Feb 2016 21:47:27 +0000 (13:47 -0800)]
Merge pull request dotnet/coreclr#3293 from jkotas/r2r-default-callconv

Use default calling convention small type widening rules for R2R

Commit migrated from https://github.com/dotnet/coreclr/commit/50d84032861511d703125d80b9b4a6da11c2650a

8 years agoMerge pull request dotnet/coreclr#3298 from jkotas/ryujit-version
Jan Kotas [Mon, 22 Feb 2016 21:47:08 +0000 (13:47 -0800)]
Merge pull request dotnet/coreclr#3298 from jkotas/ryujit-version

Update RyuJIT package version

Commit migrated from https://github.com/dotnet/coreclr/commit/9a4dbc7fecf1dbafea614882c0c44ff22ee4ca8d