platform/upstream/coreclr.git
8 years agoMerge pull request #3241 from wtgodbe/cscbench
Sergiy Kuryata [Fri, 19 Feb 2016 19:43:26 +0000 (11:43 -0800)]
Merge pull request #3241 from wtgodbe/cscbench

Stop copying of bad System.Runtime version

8 years agoMerge pull request #3250 from janvorli/fix-explicit-frames-popping-2
Sergiy Kuryata [Fri, 19 Feb 2016 18:44:16 +0000 (10:44 -0800)]
Merge pull request #3250 from janvorli/fix-explicit-frames-popping-2

Fix the explicit frames unwinding on Unix

8 years agoMerge pull request #3242 from briansull/arm64conds
Brian Sullivan [Fri, 19 Feb 2016 18:12:52 +0000 (10:12 -0800)]
Merge pull request #3242 from briansull/arm64conds

Refactor of conditional branches for the ARM architecture

8 years agoMerge pull request #3238 from tarekgh/DateTimeRefactor
Tarek Mahmoud Sayed [Fri, 19 Feb 2016 17:08:44 +0000 (09:08 -0800)]
Merge pull request #3238 from tarekgh/DateTimeRefactor

Small refactoring in DateTime comparing methods

8 years agoFix the explicit frames unwinding on Unix
Jan Vorlicek [Thu, 18 Feb 2016 22:36:43 +0000 (23:36 +0100)]
Fix the explicit frames unwinding on Unix

This change fixes a problem when exception unwinds native frames of code that contains
explicit frames. There were two issues. First, the destructor of the explicit frame
base class Frame that was responsible for popping the frames was missing switch to
GC cooperative mode and so it could pop frames that GC was currently walking.
And second, after adding the switch to cooperative mode, it turned out that if a
thread gets blocked in the Frame destructor due to GC and the stack walker tries to
get stack cookie from FrameWithCookie wrapper of a class derived from the Frame,
it fails since the vtable pointer was already reset to the vtable of the base Frame
class and it detects that as an invalid case.

The fix was to add destructors to all final classes derived from Frame and perform
the frame popping from there.

8 years agoMerge pull request #3243 from LLITCHEV/structDesc-clone
Lubomir Litchev [Fri, 19 Feb 2016 07:47:11 +0000 (23:47 -0800)]
Merge pull request #3243 from LLITCHEV/structDesc-clone

Added code to clone the structDesc member of GT_CALL.

8 years agoMerge pull request #3135 from CarolEidt/x86VirtualStubDirect
Carol Eidt [Fri, 19 Feb 2016 05:33:20 +0000 (21:33 -0800)]
Merge pull request #3135 from CarolEidt/x86VirtualStubDirect

Enable Virtual Stub calls that are direct for x86

8 years agoAdded code to clone the structDesc member of GT_CALL.
Lubomir Litchev [Fri, 19 Feb 2016 00:22:36 +0000 (16:22 -0800)]
Added code to clone the structDesc member of GT_CALL.

Adds code to clone the structDesc member of GT_CALL. It modifies the
importer to get the structDesc directly in this field, instead of using a
separate local and eliminates the obsolete SetRegisterReturningStructState
method of GenTreeCall.

Fixes 3239.

8 years agoMerge pull request #3237 from AndyAyersMS/InlineRefactor4b
Andy Ayers [Fri, 19 Feb 2016 03:29:21 +0000 (19:29 -0800)]
Merge pull request #3237 from AndyAyersMS/InlineRefactor4b

Inline refactoring: capture failing observation for non-candidates

8 years agoMade the changes suggested fromn code reviewers
Brian Sullivan [Fri, 19 Feb 2016 02:34:44 +0000 (18:34 -0800)]
Made the changes suggested fromn code reviewers

8 years agostop copying of bad System.Runtime version
William Godbe [Thu, 18 Feb 2016 23:51:38 +0000 (15:51 -0800)]
stop copying of bad System.Runtime version

8 years agoAdded enum CompareKind as input to genJumpKindForOper()
Brian Sullivan [Thu, 18 Feb 2016 23:33:54 +0000 (15:33 -0800)]
Added enum CompareKind as input to genJumpKindForOper()

Record the result of genJumpKindForOper() in a local before generating the jump instruction
Added support for using Logical instructions with genJumpKindForOper()

8 years agoInline refactoring: capture failing observation for non-candidates
Andy Ayers [Thu, 18 Feb 2016 20:48:37 +0000 (12:48 -0800)]
Inline refactoring: capture failing observation for non-candidates

Refactor the InlineResult to take a `GenTreeCall` instead of artifacts
derived from the call. Use this to decorate the call (in DEBUG) if
an inline fails with the observation that lead to the failure. Move
this constructor out of the header since we now need it to invoke
methods on types that are header-opaque.

Try and pick this reason up later on when non-candidate call sites are
encountered during inlining.

Introduce a second constructor for the pre-jit use case, where we are
evaulating a method to see if we can mark it as never inline to save
work in any subsequent compilation. Put this into the cpp file too for
symmetry.

Type the backing field in GenTreeCall as unsigned to avoid creating
more deeply entangled include circularities. Happy to reconsider if
this seems ill-advised.

Reword a few more uses of inlinee to callee (similarly inliner to
caller). Make `inlIsValidObservation` globally visible and enable
a prior commented-out assert.

8 years agoEnable Virtual Stub calls that are direct for x86
Carol Eidt [Thu, 11 Feb 2016 18:39:36 +0000 (10:39 -0800)]
Enable Virtual Stub calls that are direct for x86

On x86, direct virtual stub calls must be done with a relative address, NOT through a register.

8 years agoSmall refactoring in DateTime comparing methods
Tarek Mahmoud Sayed [Thu, 18 Feb 2016 22:19:09 +0000 (14:19 -0800)]
Small refactoring in DateTime comparing methods

8 years agoMerge pull request #3229 from AndyAyersMS/InlineRefactor4a
Andy Ayers [Thu, 18 Feb 2016 21:34:09 +0000 (13:34 -0800)]
Merge pull request #3229 from AndyAyersMS/InlineRefactor4a

Inline refactoring: add candidate observations

8 years agoMerge pull request #3219 from adityamandaleeka/twowaypipe_cleanup
Aditya Mandaleeka [Thu, 18 Feb 2016 20:45:45 +0000 (12:45 -0800)]
Merge pull request #3219 from adityamandaleeka/twowaypipe_cleanup

Clean up Unix twowaypipe code

8 years agoMerge pull request #3222 from richardlford/testswithrefs0216
Richard L Ford [Thu, 18 Feb 2016 20:43:09 +0000 (12:43 -0800)]
Merge pull request #3222 from richardlford/testswithrefs0216

Port desktop tests that had references

8 years agoMerge pull request #3231 from ellismg/add-back-push-triggers
Matt Ellis [Thu, 18 Feb 2016 20:07:26 +0000 (12:07 -0800)]
Merge pull request #3231 from ellismg/add-back-push-triggers

Add back push triggers

8 years agoMerge pull request #3230 from jkotas/jitee-cleanup
Jan Kotas [Thu, 18 Feb 2016 19:31:19 +0000 (11:31 -0800)]
Merge pull request #3230 from jkotas/jitee-cleanup

Delete NetCF quirk and MDIL generation support from RyuJIT and JIT-EE interface

8 years agoDelete 'do not port' test, add non-windows exclusions
Richard L Ford [Thu, 18 Feb 2016 19:14:30 +0000 (11:14 -0800)]
Delete 'do not port' test, add non-windows exclusions

8 years agoAdd back push triggers
Matt Ellis [Thu, 18 Feb 2016 18:54:42 +0000 (10:54 -0800)]
Add back push triggers

Do {debug|checked|release} builds for all platforms on push. Upstack
projects (e.g CoreFX) take some of these as inputs and we use the
results in building out the badge links.

For the jobs which have flow's, just build the folow (which will trigger
the non flow builds).

8 years agoDelete unused files
Jan Kotas [Thu, 18 Feb 2016 17:27:35 +0000 (09:27 -0800)]
Delete unused files

8 years agoDelete MDIL generation support from JIT-EE interface
Jan Kotas [Thu, 18 Feb 2016 17:21:04 +0000 (09:21 -0800)]
Delete MDIL generation support from JIT-EE interface

8 years agoMerge pull request #3224 from gkhanna79/UpdateNugetPkg
Gaurav Khanna [Thu, 18 Feb 2016 17:59:41 +0000 (08:59 -0900)]
Merge pull request #3224 from gkhanna79/UpdateNugetPkg

Update CoreCLR Nuget package

8 years agoDelete NetCF quirks from RyuJIT
Jan Kotas [Thu, 18 Feb 2016 17:17:52 +0000 (09:17 -0800)]
Delete NetCF quirks from RyuJIT

8 years agoInline refactoring: add candidate observations
Andy Ayers [Wed, 17 Feb 2016 20:46:29 +0000 (12:46 -0800)]
Inline refactoring: add candidate observations

Add candidate observations and update the InlineResult to hold
onto the observation rather than the reason string.

8 years agoMerge pull request #3196 from AndyAyersMS/InlineRefactor4
Andy Ayers [Thu, 18 Feb 2016 16:43:15 +0000 (08:43 -0800)]
Merge pull request #3196 from AndyAyersMS/InlineRefactor4

Inline refactoring: header cleanup and some renaming

8 years agoUpdate CoreCLR Nuget package version to be 1.0.2.
Gaurav Khanna [Thu, 18 Feb 2016 04:53:59 +0000 (20:53 -0800)]
Update CoreCLR Nuget package version to be 1.0.2.

8 years agoMerge pull request #3191 from manu-silicon/absolute_path
Jan Vorlicek [Thu, 18 Feb 2016 09:23:10 +0000 (10:23 +0100)]
Merge pull request #3191 from manu-silicon/absolute_path

Fix absolute path on Linux

8 years agoFix typo in genXplatEventing.py.
Aditya Mandaleeka [Thu, 18 Feb 2016 02:35:13 +0000 (18:35 -0800)]
Fix typo in genXplatEventing.py.

8 years agoUse pal.h directly in Unix twowaypipe code and remove windefs.h.
Aditya Mandaleeka [Thu, 18 Feb 2016 00:56:28 +0000 (16:56 -0800)]
Use pal.h directly in Unix twowaypipe code and remove windefs.h.

8 years agoPort desktop tests that had references
Richard L Ford [Tue, 16 Feb 2016 23:13:32 +0000 (15:13 -0800)]
Port desktop tests that had references

This change ports desktop tests that had references to dlls.
It also fixes some of the dll project files.
In addition there are some additional tests that were not
previously ported (but that do not reference dlls).

There are 4 tests that are excluded because of issue #3216.

8 years agoMerge pull request #3218 from sergiy-k/niimageloading
Jan Kotas [Thu, 18 Feb 2016 04:06:07 +0000 (20:06 -0800)]
Merge pull request #3218 from sergiy-k/niimageloading

Change MAPMapPEFile to use ExecutableAllcator instead of mmap to reserve VA

8 years agoMerge pull request #3220 from dotnet-bot/from-tfs
Jan Kotas [Thu, 18 Feb 2016 04:04:15 +0000 (20:04 -0800)]
Merge pull request #3220 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoport fix for pad ratio
Maoni Stephens [Thu, 18 Feb 2016 02:34:21 +0000 (18:34 -0800)]
port fix for pad ratio

[tfs-changeset: 1576135]

8 years agoRefactor the Conditional branches on Arm to match the Arm condition codes
Brian Sullivan [Thu, 18 Feb 2016 02:03:17 +0000 (18:03 -0800)]
Refactor the Conditional branches on Arm to match the Arm condition codes

Updated the enum emitJumpKInd to use Arm condition codes rather than x86 conditional branches
This change  impacts the Arm32 JIT and verified to have no asm diffs using the for Arm32

Implemented and tested for Arm64 the full set of ordered and unordered floating point branches
Implemented and tested for Arm64 genSetRegToCond for ordered and unordered floating point compares
On Arm64 we now use the genJumpKIndsForTree to return up to two conditional branches for floating point compares

Cleanup we now use genJumpKindForOper to select conditional branches and prefer
 using isUnsigned=false for creating branches for GT_EQ and GT_NE

 Removed the unused fourth 'condcode' portion of the JMP_SMALL macro and
 the fourth column from the Arm/ARm64 part of "emitjmps.cpp"

 Unified Arm32 and Arm64 conditionals in "emitjmps.cpp"
 Reordered the Arm32 and Arm64 conditionals in "emitjmps.cpp" to matchthe ARMV8 docs

8 years agoFix ildasm to be run without specifying the full path
Manu [Tue, 16 Feb 2016 06:27:24 +0000 (15:27 +0900)]
Fix ildasm to be run without specifying the full path

Using the fixed version of GetEntrypointExecutableAbsolutePath when the
program name on the command line does not reflect an actual file on disk
(case when a program is launched by finding it in the PATH). This should fix
issue#3190.

8 years agoChange MAPMapPEFile to use ExecutableAllcator instead of mmap to reserve VA
Sergiy Kuryata [Thu, 18 Feb 2016 01:40:30 +0000 (17:40 -0800)]
Change MAPMapPEFile to use ExecutableAllcator instead of mmap to reserve VA

This change modifies the MAPMapPEFile in PAL to use ExecutableAllcator
instead of mmap in order to reserve VA for managed executable images. This
allows all NI images to be located near each other and close to the
coreclr library, which also allows the runtime to generate code that is
more efficient (by avoiding usage of jump stubs).

It also fixes an issue (https://github.com/dotnet/cli/issues/652) where
CLI fails with OutOfMemoryException which turned out to be related to
loading NI files. Due to a certain allocation pattern, mmap can place an
NI file at a region of virtual address space that does not have any free
memory around the NI images. As a result, when the runtime needs to
allocate memory for jump stubs for the image it cannot find any available
memory near the image and fails with OutOfMemoryException.

8 years agoFix GetEntrypointExecutableAbsolutePath on Linux
Manu [Tue, 16 Feb 2016 06:27:04 +0000 (15:27 +0900)]
Fix GetEntrypointExecutableAbsolutePath on Linux

Although PR#1818 was supposed to implement this for Linux, only the MacOS X
implementation was correct. We are now using `readlink' on Linux to get
the path of the current running executable.

8 years agoMerge pull request #3215 from jkotas/arm-floatargs
Jan Kotas [Thu, 18 Feb 2016 01:33:32 +0000 (17:33 -0800)]
Merge pull request #3215 from jkotas/arm-floatargs

Save/restore floating point arguments in asm macros on Linux arm and arm64

8 years agoRemove PAL_unlink.
Aditya Mandaleeka [Thu, 18 Feb 2016 00:37:12 +0000 (16:37 -0800)]
Remove PAL_unlink.

8 years agoSave/restore floating point arguments in transition block on arm and arm64
Jan Kotas [Wed, 17 Feb 2016 19:26:36 +0000 (11:26 -0800)]
Save/restore floating point arguments in transition block on arm and arm64

The transition block prolog/epilog macros were not correctly saving and restoring the floating point arguments on arm and arm64 on Unix.

8 years agoMerge pull request #3213 from rahku/fixarm64
Rahul Kumar [Wed, 17 Feb 2016 23:55:18 +0000 (15:55 -0800)]
Merge pull request #3213 from rahku/fixarm64

Fix arm64 build break

8 years agoMerge pull request #3189 from krytarowski/netbsd-support-49
Jan Kotas [Wed, 17 Feb 2016 21:38:46 +0000 (13:38 -0800)]
Merge pull request #3189 from krytarowski/netbsd-support-49

Enforce compiler version of alloca(3) on NetBSD

8 years agoMerge pull request #3212 from dotnet-bot/from-tfs
Kyungwoo Lee [Wed, 17 Feb 2016 21:30:02 +0000 (13:30 -0800)]
Merge pull request #3212 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #3166 from sejongoh/add_linux_corefx_testing
Sejong Oh [Wed, 17 Feb 2016 20:37:09 +0000 (12:37 -0800)]
Merge pull request #3166 from sejongoh/add_linux_corefx_testing

Enable linux corefx testing

8 years agoFix arm64 build break
Rahul Kumar [Wed, 17 Feb 2016 20:30:45 +0000 (12:30 -0800)]
Fix arm64 build break

8 years agoFix NetBSD build issue: Use compiler version of alloca(3) when possible
Kamil Rytarowski [Tue, 16 Feb 2016 21:55:13 +0000 (22:55 +0100)]
Fix NetBSD build issue: Use compiler version of alloca(3) when possible

The documentation of alloca(3) says:

     o   The alloca() function should be supplied by the compiler because the
         compiler is allowed to make assumptions about the stack and frame
         pointers.  The libc alloca() implementation cannot account for those
         assumptions.  While there is a machine dependent implementation of
         alloca() in libc, its use is discouraged and in most cases it will
         not work.  Using this implementation will produce linker warnings.

This is true for CoreCLR - alloca(3) was breaking 30 PAL tests.

Enforce on this operating system a compiler version.

Thanks Jan Kotas (Microsoft) for inspiration what may go wrong.
Thanks Jan Vorli (Microsoft) for useful suggestions in order to fix it.

8 years agoMerge pull request #3211 from gregg-miskelly/OSXAttachFix
Aditya Mandaleeka [Wed, 17 Feb 2016 19:40:21 +0000 (11:40 -0800)]
Merge pull request #3211 from gregg-miskelly/OSXAttachFix

Fix debugger attach to process on OSX

8 years agoOption for Enforcing Intrinsic Expansion
dotnet-bot [Wed, 17 Feb 2016 19:03:58 +0000 (11:03 -0800)]
Option for Enforcing Intrinsic Expansion

Currently intrinsic is disabled under MIN_OPT while being enabled under OPT.
There is no way to enforce intrinsic expansion where non-intrinsic (call) path is not yet implemented.
This adds an optional output boolean argument to getIntrinsicID that tells JIT whether to enforce intrinsic expansion.
If JIT cannot expand intrinsic for such case, fatal error occurs.
There is no functional change the argument is default to false.

[tfs-changeset: 1575973]

8 years agoMerge pull request #3177 from krytarowski/netbsd-support-47
Jan Vorlicek [Wed, 17 Feb 2016 19:01:19 +0000 (20:01 +0100)]
Merge pull request #3177 from krytarowski/netbsd-support-47

Fix build issue on NetBSD: Make RPATH optional and user-settable

8 years agoMerge pull request #3205 from AndyAyersMS/FixBenchFProjFiles
Andy Ayers [Wed, 17 Feb 2016 18:39:18 +0000 (10:39 -0800)]
Merge pull request #3205 from AndyAyersMS/FixBenchFProjFiles

Remove IlasmRoundTrip from these project files

8 years agoFix debugger attach to process on OSX
Gregg Miskelly [Wed, 17 Feb 2016 18:37:26 +0000 (10:37 -0800)]
Fix debugger attach to process on OSX

Attaching to processes on OSX was broken with the way the .NET CLI is installing CoreCLR. The issue is that the vmmap executable that dbgshim is using will, by default, truncate paths. This caused it to be unable to find the real path to DBI.

Fix: pass the '-wide' argument to vmmap

8 years agoInline refactoring: header cleanup and some renaming
Andy Ayers [Tue, 16 Feb 2016 22:28:08 +0000 (14:28 -0800)]
Inline refactoring: header cleanup and some renaming

Move inlining classes and related bits of code into inline.h.
Rename `JitInlineResult` to `InlineResult` and `InlInlineHints` to
`InlineHints`.

8 years agoMerge pull request #3203 from AndyAyersMS/FixJitMemoryUsage
Andy Ayers [Wed, 17 Feb 2016 18:04:17 +0000 (10:04 -0800)]
Merge pull request #3203 from AndyAyersMS/FixJitMemoryUsage

Fix issue with excessive memory use by debug and checked jits

8 years agoMerge pull request #3173 from mikedn/ssadef-dup
Russ Keldorph [Wed, 17 Feb 2016 17:39:10 +0000 (09:39 -0800)]
Merge pull request #3173 from mikedn/ssadef-dup

Remove duplicate calls to GetPerSsaData

8 years agoMerge pull request #3176 from mikedn/topref
Russ Keldorph [Wed, 17 Feb 2016 17:37:49 +0000 (09:37 -0800)]
Merge pull request #3176 from mikedn/topref

Avoid unnecessary copies of AllSuccessorIter and LocationInfo

8 years agoRemove IlasmRoundTrip from these project files
Andy Ayers [Wed, 17 Feb 2016 16:36:45 +0000 (08:36 -0800)]
Remove IlasmRoundTrip from these project files

We test ilasm/ildasm separately, so no reason to round trip when
building these benchmarks.

Closes #3202.

8 years agoMerge pull request #3187 from manu-silicon/ildasm
Kyungwoo Lee [Wed, 17 Feb 2016 13:06:34 +0000 (05:06 -0800)]
Merge pull request #3187 from manu-silicon/ildasm

Fix ildasm when ran against CoreFX assemblies like System.Runtime

8 years agoFix issue with excessive memory use by debug and checked jits
Andy Ayers [Wed, 17 Feb 2016 07:46:16 +0000 (23:46 -0800)]
Fix issue with excessive memory use by debug and checked jits

In #3051 the jit started calling `eeGetClassFullName` for both
caller and callee handles even when dumping was disabled, passed
this information to the logging messages where previously the caller
and callee were identified via other context, and prepared the full
name dump artifacts for all inline decisions rather than the selective
cases handled previously.

This change caused excessive memory use in some tests.

This change makes the calls to `eeGetClassFullName` conditional on
whether dumping is enabled, and does not require these calls for logging
messages.

8 years agoFix invalid usage of pointer and SZSTRING_REMAINING_SIZE macro
Manu [Wed, 17 Feb 2016 00:48:16 +0000 (09:48 +0900)]
Fix invalid usage of pointer and SZSTRING_REMAINING_SIZE macro

When manipulating strings, the string destination buffer and the argument
of SZSTRING_REMAINING_SIZE should be the same otherwise buffer
overflows will occur.
Changed DumpHexbytes to start from the provided pointer and not finding
out how much was printed so far in the szString buffer.

8 years agoMerge pull request #3200 from dotnet-bot/from-tfs
Jan Kotas [Wed, 17 Feb 2016 03:36:44 +0000 (19:36 -0800)]
Merge pull request #3200 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoFix build issue on NetBSD: Make RPATH optional and user-settable
Kamil Rytarowski [Sun, 14 Feb 2016 16:34:25 +0000 (17:34 +0100)]
Fix build issue on NetBSD: Make RPATH optional and user-settable

The `$ORIGIN` linker feature isn't supported on NetBSD.

All RPATH is done via `pkgsrc` on all supported platforms, allow to override it.
pkgsrc will set CORECLR_SET_RPATH:BOOL=OFF and specify manually needed options.

8 years agoFix Init to return False when not being able to load executable
Manu [Tue, 16 Feb 2016 00:09:14 +0000 (09:09 +0900)]
Fix Init to return False when not being able to load executable

8 years agoMerge pull request #3195 from janvorli/fix-invalid-gcvalue
Jan Kotas [Wed, 17 Feb 2016 00:37:06 +0000 (16:37 -0800)]
Merge pull request #3195 from janvorli/fix-invalid-gcvalue

Fix INVALIDGCVALUE on Unix

8 years agoMerge pull request #3167 from mikem8361/tracing
Jan Vorlicek [Wed, 17 Feb 2016 00:18:07 +0000 (01:18 +0100)]
Merge pull request #3167 from mikem8361/tracing

Fix tracing lib problems in multiple PALs. Issue #3164.

8 years agoFinish fixing VSO #190301. DACRaiseException need some STATIC_ contracts.
Mike McLaughlin [Tue, 16 Feb 2016 23:09:18 +0000 (15:09 -0800)]
Finish fixing VSO #190301. DACRaiseException need some STATIC_ contracts.

[tfs-changeset: 1575640]

8 years agoMerge pull request #3193 from richardlford/addtestlibs0216
Richard L Ford [Tue, 16 Feb 2016 22:55:47 +0000 (14:55 -0800)]
Merge pull request #3193 from richardlford/addtestlibs0216

Add libraries for tests that reference them.

8 years agoFix INVALIDGCVALUE on Unix
Jan Vorlicek [Tue, 16 Feb 2016 22:22:42 +0000 (23:22 +0100)]
Fix INVALIDGCVALUE on Unix

The INVALIDGCVALUE value loaded into the R11 in the JIT_WriteBarrier_Debug
and JIT_ByRefWriteBarrier is sign extended to 0xFFFFFFFFCCCCCCCD instead of
being the 0x00000000CCCCCCCD.
It was introduced during the early days of CoreCLR porting when I have
misread the error message that I was getting from Clang when compiling
mov R11, 0xCCCCCCCD and didn't know yet that loading 64 bit number requires
using the movabs mnemonics.

8 years agoMake dll project files build-only.
Richard L Ford [Tue, 16 Feb 2016 21:49:53 +0000 (13:49 -0800)]
Make dll project files build-only.

Dll project files need extra properties to avoid being run as tests.

8 years agoMerge pull request #3124 from AndyAyersMS/InlineRefactor3
Andy Ayers [Tue, 16 Feb 2016 21:08:59 +0000 (13:08 -0800)]
Merge pull request #3124 from AndyAyersMS/InlineRefactor3

Inline refactoring: start untangling observation and policy

8 years agoMerge pull request #3185 from janvorli/fix-exception-severity
Jan Vorlicek [Tue, 16 Feb 2016 20:57:32 +0000 (21:57 +0100)]
Merge pull request #3185 from janvorli/fix-exception-severity

Fix missing exception corruption severity setting

8 years agoAdd libraries for tests that reference them.
Richard L Ford [Tue, 16 Feb 2016 20:53:44 +0000 (12:53 -0800)]
Add libraries for tests that reference them.

This change adds dynamic link libraries that are referenced
by other tests.

8 years agoAvoid unnecessary copies of AllSuccessorIter, LocationInfo and VNDefFunc2Arg
Mike Danes [Sun, 14 Feb 2016 14:47:33 +0000 (16:47 +0200)]
Avoid unnecessary copies of AllSuccessorIter,  LocationInfo  and VNDefFunc2Arg

ArrayStack<T>::Top() returns a copy rather than a reference like typical C++ containers do. For large Ts like AllSuccessorIterator and LocationInfo this results in a lot of code bloat and unncessary copying. Add a T& TopRef() function to avoid such copying.

8 years agoFix missing exception corruption severity setting
Jan Vorlicek [Mon, 15 Feb 2016 20:16:35 +0000 (21:16 +0100)]
Fix missing exception corruption severity setting

This change fixes missing exception corruption severity for exceptions
that were thrown by native code but didn't pass through any managed
frames yet.

We have seen assert in the RaiseTheException function when an exception
thrown from native code is caught in native code without passing through
any managed frames and then it is being thrown in a wrapper TargetInvocationException.

8 years agoInline refactoring: start untangling observation and policy
Andy Ayers [Mon, 8 Feb 2016 19:08:57 +0000 (11:08 -0800)]
Inline refactoring: start untangling observation and policy

Create set of observations that can be made during inlining. These
are implemented as a set of static tables plus some helper methods.
Each observation has an enum name, a type, a description string,
an impact, and a target.

For now most observations are about blocking issues and are classified
as having FATAL impact. There are a handful of INFORMATIONAL and
PERFORMANCE observations but they're not widely used yet.

This change also updates the bulk of the jit code to report
observations to the JitInlineResult instead of directly requesting
changes to the JitInlineResult state. Over on the JitInlineResult side,
the current legacy policy is implemented and fails fast if any blocking
observation is made. For now, any any FATAL impact observation must be
made via `noteFatal`, and all other observations be made via `note`.

As with the previous refactorings, this change tries not to alter
any code generation. There are a few cases where observations that
are made solely about the callee are now targeted that way instead of
being targeted at callsites. For instance a method that is marked by
COMPLUS_JitNoInline will never be inlined. This can sometimes lead to
localized code diffs, since the jit creates slightly different IR for a
call to an inline candidate than a call to a non-candidate, and is not
always able to undo this later if inlining fails. However the number of
diffs should be small. Will verify diffs further before merging. There
are no inlining changes crossgenning mscorlib.

Some of the message strings associated with inlining failures have
changed. The messages use `caller` and `callee` to describe the two
methods involved, and `callsite` for the instance in question, and
deprecate `inlinee`. These message strings can be seen in the jit
dumps and logs and are reported back to the VM where they presumably
make their way into other diagnostic reporting streams.

Subsequent work will re-examine the FATAL observations and likely
reclassify a number of them to have less dramatic immediate impact.
Subsequent work will also begin extracting the policy into a separate
class to lay the groundwork for supporting alternate policies while
still being able to fall back to the legacy policy.

8 years agoMerge pull request #3179 from JohnChen0/crossgen-fprintf
John Chen [Tue, 16 Feb 2016 18:44:31 +0000 (10:44 -0800)]
Merge pull request #3179 from JohnChen0/crossgen-fprintf

Fix fprintf in crossgen

8 years agoMerge pull request #2992 from steveharter/FixSanitizerClrStartup
Steve Harter [Tue, 16 Feb 2016 16:02:26 +0000 (10:02 -0600)]
Merge pull request #2992 from steveharter/FixSanitizerClrStartup

Clang sanitizer: remove unaligned address check

8 years agoEnable linux corefx testing
Sejong Oh [Fri, 12 Feb 2016 01:28:32 +0000 (17:28 -0800)]
Enable linux corefx testing

8 years agoMerge pull request #3183 from janvorli/fix-unwound-funclet-stack-reporting
Jan Vorlicek [Mon, 15 Feb 2016 17:57:01 +0000 (18:57 +0100)]
Merge pull request #3183 from janvorli/fix-unwound-funclet-stack-reporting

Fix unwound funclet GC stack reporting on Unix

8 years agoMerge pull request #3157 from benaadams/QueueUserWorkItemCallback
Eric Eilebrecht [Mon, 15 Feb 2016 17:30:12 +0000 (09:30 -0800)]
Merge pull request #3157 from benaadams/QueueUserWorkItemCallback

Slimmer QueueUserWorkItemCallback

8 years agoFix unwound funclet GC stack reporting on Unix
Jan Vorlicek [Mon, 15 Feb 2016 12:44:13 +0000 (13:44 +0100)]
Fix unwound funclet GC stack reporting on Unix

This change fixes a problem with reporting object on stack for GC when
GC scan is performed right after a funclet is unwound during exception handling.
In such case, the parent of the funclet should report live object references,
but it was not doing so on Unix.
On Unix, the unwound funclet is detected in a different way than on Windows due
to the fact that the stack frames of the funclet are already reclaimed, while on
Windows, they are still there.
When we detect the unwound funclet on Unix, we set state of the stack walker so
that it behaves in the same way as on Windows. But we were missing one state
variable that makes the parent report the references instead of the funclet,
the m_fDidFuncletReportGCReferences.

8 years agoMerge pull request #3170 from krytarowski/netbsd-support-44
Jan Vorlicek [Mon, 15 Feb 2016 10:21:07 +0000 (11:21 +0100)]
Merge pull request #3170 from krytarowski/netbsd-support-44

Prefer BSD uuid over libuuid

8 years agoMerge pull request #3149 from krytarowski/netbsd-support-41
Jan Vorlicek [Mon, 15 Feb 2016 10:09:11 +0000 (11:09 +0100)]
Merge pull request #3149 from krytarowski/netbsd-support-41

Fix build issue on NetBSD: Include <time.h> for time(3) in gc.cpp

8 years agoMerge pull request #3171 from krytarowski/netbsd-support-45
Jan Vorlicek [Mon, 15 Feb 2016 10:04:34 +0000 (11:04 +0100)]
Merge pull request #3171 from krytarowski/netbsd-support-45

Add more CMake sugar for NetBSD

8 years agoMerge pull request #3160 from josteink/master
Jan Vorlicek [Mon, 15 Feb 2016 09:58:27 +0000 (10:58 +0100)]
Merge pull request #3160 from josteink/master

Make the coreclr build-process support rtags

8 years agoMerge pull request #3175 from krytarowski/netbsd-support-46
Jan Kotas [Sun, 14 Feb 2016 22:49:01 +0000 (14:49 -0800)]
Merge pull request #3175 from krytarowski/netbsd-support-46

Fix build issue on NetBSD: Remove unneeded -nostdinc++ flag

8 years agoFix fprintf in crossgen
John Chen (CLR) [Sun, 14 Feb 2016 22:25:32 +0000 (14:25 -0800)]
Fix fprintf in crossgen

CrossGen configures its stdout to allow only Unicode output functions.
Add a wrapper to fprintf to allow it to work inside crossgen.

8 years agoSlimmer QueueUserWorkItemCallback
Ben Adams [Fri, 12 Feb 2016 09:25:33 +0000 (09:25 +0000)]
Slimmer QueueUserWorkItemCallback

8 years agoPrefer BSD uuid over libuuid
Kamil Rytarowski [Sat, 13 Feb 2016 20:25:32 +0000 (21:25 +0100)]
Prefer BSD uuid over libuuid

This fixes recent NetBSDbuild breakage:
../libcoreclrpal.a(miscpalapi.cpp.o): In function `CoCreateGuid':
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/misc/miscpalapi.cpp:356: undefined reference to `uuid_generate_random'
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)

No need to link against libuuid.

Add detection of BSD-styl <uuid.h>.
Few Linux distros ship with custom <uuid.h> and they aren't compatibile.

8 years agoMerge pull request #3162 from dotnet-bot/from-tfs
Jan Kotas [Sun, 14 Feb 2016 14:25:01 +0000 (06:25 -0800)]
Merge pull request #3162 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoFix build issue on NetBSD: Remove unneeded -nostdinc++ flag
Kamil Rytarowski [Sun, 14 Feb 2016 14:17:15 +0000 (15:17 +0100)]
Fix build issue on NetBSD: Remove unneeded -nostdinc++ flag

This flag isn't recognized by clang on NetBSD:
clang-3.9: warning: argument unused during compilation: '-nostdinc++'

$ pkg_info |grep -E 'lldb|llvm|clang'
llvm-3.9.0nb20160213 Low Level Virtual Machine compiler infrastructure
clang-3.9.0nb20160213 C language family frontend for LLVM
lldb-3.9.0nb20160213 next generation, high-performance debugger

$ uname -a
NetBSD chieftec 7.99.26 NetBSD 7.99.26 (GENERIC) #0: Wed Feb 10 21:58:18 UTC 2016
root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64

This flag was disabled also for Darwin in #125 by @jkotas

8 years agoFix build issue on NetBSD: Add time(3) to PAL
Kamil Rytarowski [Fri, 12 Feb 2016 02:40:30 +0000 (03:40 +0100)]
Fix build issue on NetBSD: Add time(3) to PAL

Otherwise it triggers linker warnings.

/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/gc/gc.cpp:33869:
warning: warning: reference to compatibility time(); include <time.h> for correct reference

$ uname -a
NetBSD chieftec 7.99.25 NetBSD 7.99.25 (GENERIC) #0: Fri Dec 25 20:51:06 UTC 2015  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64

8 years agoRemove duplicate calls to GetPerSsaData
Mike Danes [Sun, 14 Feb 2016 09:38:27 +0000 (11:38 +0200)]
Remove duplicate calls to GetPerSsaData

The code is too complex for the C++ compiler to figure out that it is duplicated and the generated code contains a second call to ExpandArray::EnsureCoversInd for what is otherwise just a trivial assignment.

8 years agoMerge pull request #3172 from RussKeldorph/redisable
Russ Keldorph [Sun, 14 Feb 2016 13:39:35 +0000 (05:39 -0800)]
Merge pull request #3172 from RussKeldorph/redisable

Re-disable tests failing due to #2728

8 years agoRe-disable tests failing due to #2728
Russ Keldorph [Sun, 14 Feb 2016 04:48:26 +0000 (20:48 -0800)]
Re-disable tests failing due to #2728

8 years agoAdd more CMake sugar for NetBSD
Kamil Rytarowski [Sun, 14 Feb 2016 03:31:57 +0000 (04:31 +0100)]
Add more CMake sugar for NetBSD

This resolves 'gen-dactable-rva.sh does not print to dactablerva.h' #3168

This fixes issue with g_dacTable unavailable in libcoreclr.so.

This patch assumes GNU ld(1) on NetBSD

Thanks to Bruce Mitchener @waywardmonkeys for pointing out ld(1) nits.

8 years agoMake the build-process support rtags
Jostein Kjønigsen [Sat, 13 Feb 2016 20:18:42 +0000 (21:18 +0100)]
Make the build-process support rtags

Rtags depends on cmake to export its build commands in order to index
the codebase.

Adding this flag makes cmake do that.

8 years agoMerge pull request #3161 from richardlford/restoredllnames0212
Richard L Ford [Sat, 13 Feb 2016 03:33:59 +0000 (19:33 -0800)]
Merge pull request #3161 from richardlford/restoredllnames0212

Restore original dll names, use Define constants.