platform/upstream/coreclr.git
7 years agoMerge pull request #11593 from brianrob/eventsource_unix
Stephen Toub [Sat, 13 May 2017 21:31:31 +0000 (17:31 -0400)]
Merge pull request #11593 from brianrob/eventsource_unix

Disable ETW calls on UNIX

7 years agoDisable ETW calls on UNIX.
Brian Robbins [Sat, 13 May 2017 18:39:10 +0000 (11:39 -0700)]
Disable ETW calls on UNIX.

7 years agoFix String.IndexOf with empty string input (#11587)
Tarek Mahmoud Sayed [Sat, 13 May 2017 06:35:49 +0000 (23:35 -0700)]
Fix String.IndexOf with empty string input (#11587)

7 years agoEnable Symbolic Rundown for EventPipe (#11582)
Brian Robbins [Sat, 13 May 2017 01:34:16 +0000 (18:34 -0700)]
Enable Symbolic Rundown for EventPipe (#11582)

7 years agoMerge pull request #11584 from dotnet/revert-11500-from-tfs
Brian Sullivan [Fri, 12 May 2017 23:49:45 +0000 (16:49 -0700)]
Merge pull request #11584 from dotnet/revert-11500-from-tfs

Revert "Merge changes from TFS"

7 years agoRevert "Merge changes from TFS"
Jarret Shook [Fri, 12 May 2017 23:47:12 +0000 (16:47 -0700)]
Revert "Merge changes from TFS"

7 years agoPut the serialization marker under its own IFDEF. (#11568)
Brian Robbins [Fri, 12 May 2017 21:42:04 +0000 (14:42 -0700)]
Put the serialization marker under its own IFDEF. (#11568)

7 years agoDon't allow specification of needStack to EventPipeProvider when creating an event...
Brian Robbins [Fri, 12 May 2017 21:14:28 +0000 (14:14 -0700)]
Don't allow specification of needStack to EventPipeProvider when creating an event. (#11571)

7 years agoUpdate CoreClr, CoreFx to preview2-25312-01, preview2-25312-03, respectively (#11544)
dotnet bot [Fri, 12 May 2017 20:23:36 +0000 (13:23 -0700)]
Update CoreClr, CoreFx to preview2-25312-01, preview2-25312-03, respectively (#11544)

7 years agoOnly call EventActivityIdControl ETW function on Windows. (#11549)
Brian Robbins [Fri, 12 May 2017 19:22:06 +0000 (12:22 -0700)]
Only call EventActivityIdControl ETW function on Windows. (#11549)

7 years agoDelete non-shared version and switch over to shared version.
Atsushi Kanamori [Fri, 12 May 2017 15:22:52 +0000 (08:22 -0700)]
Delete non-shared version and switch over to shared version.

7 years agoMerge pull request dotnet/corert#3601 from dotnet/nmirror
Jan Kotas [Fri, 12 May 2017 14:56:00 +0000 (07:56 -0700)]
Merge pull request dotnet/corert#3601 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMerge pull request #10972 from hqueue/arm/ryujit/lsra
Carol Eidt [Fri, 12 May 2017 18:04:23 +0000 (11:04 -0700)]
Merge pull request #10972 from hqueue/arm/ryujit/lsra

[Ryujit/ARM32] LSRA support for arm32 floating-point register allocation

7 years agoMerge pull request #11500 from dotnet-bot/from-tfs
Jarret Shook [Fri, 12 May 2017 18:00:57 +0000 (11:00 -0700)]
Merge pull request #11500 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoEventPipe Circular Buffer Support and Ability to Start/Stop Tracing (#11507)
Brian Robbins [Fri, 12 May 2017 17:51:31 +0000 (10:51 -0700)]
EventPipe Circular Buffer Support and Ability to Start/Stop Tracing (#11507)

7 years agoMerge pull request #11536 from jashook/green_arm64_ci
Jarret Shook [Fri, 12 May 2017 16:40:00 +0000 (09:40 -0700)]
Merge pull request #11536 from jashook/green_arm64_ci

[Arm64] Disable new test regressions

7 years ago[Arm64] Disable new test regressions
jashook [Thu, 11 May 2017 22:54:44 +0000 (15:54 -0700)]
[Arm64] Disable new test regressions

Disable tests based on #11533, #11534.

7 years agoRe-morph lclVar nodes after simplifying (ind (addr (lclVar))). (#11531)
Pat Gavlin [Fri, 12 May 2017 06:02:54 +0000 (23:02 -0700)]
Re-morph lclVar nodes after simplifying (ind (addr (lclVar))). (#11531)

Morph simplifies (ind (addr (lclVar))) if the type of the load matches
the type of the lclVar node. This simplification is not valid, however,
if the lclVar must be normalized upon load: in that case, the lclVar
node must be normalized appropriately as part of the transformation.
This change fixes the simplification to perform this normalization if
necessary by calling `fgMorphLclVar` on the result if the result is a
lclVar node.

Fixes issue #11508.

7 years agoUpdate CoreFx to preview2-25311-04 (#11532)
dotnet bot [Fri, 12 May 2017 03:35:41 +0000 (20:35 -0700)]
Update CoreFx to preview2-25311-04 (#11532)

7 years agoMerge pull request #11528 from sdmaclea/PR-ARM64-Add-ldar-stlr-instrs
Brian Sullivan [Fri, 12 May 2017 02:43:34 +0000 (19:43 -0700)]
Merge pull request #11528 from sdmaclea/PR-ARM64-Add-ldar-stlr-instrs

[Arm64] Add emitter support for ldar/stlr

7 years agoMerge pull request #11468 from sdmaclea/PR-ARM64-3092
Brian Sullivan [Fri, 12 May 2017 02:28:08 +0000 (19:28 -0700)]
Merge pull request #11468 from sdmaclea/PR-ARM64-3092

[Arm64] Use movn in instGen_Set_Reg_To_Imm

7 years agoRemoves unneeded Serializable attributes from enums and delegates. They can be serial...
Morgan Brown [Fri, 12 May 2017 02:24:42 +0000 (19:24 -0700)]
Removes unneeded Serializable attributes from enums and delegates. They can be serialized without attributes and this will remove noise from future serialization changes. (#11535)

7 years ago[RyuJIT/ARM32] Fix GT_NEG decomposition (#11495)
mskvortsov [Fri, 12 May 2017 01:32:11 +0000 (04:32 +0300)]
[RyuJIT/ARM32] Fix GT_NEG decomposition (#11495)

RyuJIT/ARM32: Fix GT_NEG decomposition.

7 years ago[RyuJIT/ARM32] Implement for GT_STORE_OBJ (#10721)
Sujin Kim [Fri, 12 May 2017 01:26:23 +0000 (10:26 +0900)]
[RyuJIT/ARM32] Implement for GT_STORE_OBJ (#10721)

* Implement lowering for GT_STORE_OBJ

In #10657, I commented that the messages for NYI were printed about GT_STORE_OBJ on running the CodeGenBringUpTests.

'Lowering::LowerBlockStore(GenTreeBlk* blkNode)' method implementation is just copied.
but after lowering phase, in code generation, codegenarm.cpp, below would be used.

```cpp
blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindUnroll;
```
```cpp
blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindHelper;
```

```cpp
void CodeGen::genCodeForStoreBlk(GenTreeBlk* blkOp)
{
    if (blkOp->gtBlkOpGcUnsafe)
    {
        getEmitter()->emitDisableGC();
    }
    bool isCopyBlk = blkOp->OperIsCopyBlkOp();

    switch (blkOp->gtBlkOpKind)
    {
        case GenTreeBlk::BlkOpKindHelper:
            if (isCopyBlk)
            {
                genCodeForCpBlk(blkOp);
            }
            else
            {
                genCodeForInitBlk(blkOp);
            }
            break;
        case GenTreeBlk::BlkOpKindUnroll:
            if (isCopyBlk)
            {
                genCodeForCpBlkUnroll(blkOp);
            }
            else
            {
                genCodeForInitBlkUnroll(blkOp);
            }
            break;
        default:
            unreached();
    }
    if (blkOp->gtBlkOpGcUnsafe)
    {
        getEmitter()->emitEnableGC();
    }
}
```

'genCodeForCpBlk' and 'genCodeForInitBlk' are implemented in ARM/ARM64 by MEMCPY/MEMSET
but 'genCodeForCpBlkUnroll' and 'genCodeForInitBlkUnroll' are not implemented both ARM and ARM64.

Therefore those need to implement.

* Implement NYI : GT_STORE_OBJ is needed of write barriers implementation

It was copied from ARM64 and removed codes related with gc write barrier which doesn't support on ARM.

* Implement CodeGen::genCodeForCpObj

* Refactor some codes

* Use INS_OPTS_LDST_POST_INC option for post-indexing

When structure is copied, the results of asm codes have been strange.

IN0013: 000048 ldr r3, [r1+4]
IN0014: 00004A str r3, [r0+4]
IN0015: 00004C ldr r3, [r1+4]
IN0016: 00004E str r3, [r0+4]

It needs that the index would increment or the post-indexing.

So I use INS_OPTS_LDST_POST_INC option for post-indexing when the instruction is emitted.

* Fix conflicts

* Fix conflicts and Apply #11219

I want to merge genCodeForCpObj to codegenarmarch.cpp but the function has modified in #11219.

So I decided to keep the code divided now.

In future, If modifying the function on ARM is also needed, it would be able to modify.

* Fix conflicts

* Remove NYI

* Fix genCountBits assertion

7 years agoComment per review
Steve MacLean [Thu, 11 May 2017 23:59:50 +0000 (19:59 -0400)]
Comment per review

7 years agoFix build.
Brian Robbins [Thu, 11 May 2017 01:04:24 +0000 (18:04 -0700)]
Fix build.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years ago[RyuJIT/ARM32] Fix assertion in 'unreached' when using emitIns_R_L (#11486)
Sujin Kim [Thu, 11 May 2017 23:13:33 +0000 (08:13 +0900)]
[RyuJIT/ARM32] Fix assertion in 'unreached' when using emitIns_R_L (#11486)

* [RyuJIT/ARM32] Fix assertion in 'unreached'

Now, All of CodeGenBringUpTests have failed.

message : Assertion failed 'unreached' in 'DomainNeutralILStubClass:IL_STUB_PInvoke(ref)'

I found the problem was caused by #11377 that 'genCodeForTreeNode' merged to codegenarmarch.cpp.

7 years agoLinkBench: Report reduction as a ratio.
Swaroop Sridhar [Thu, 11 May 2017 20:49:17 +0000 (13:49 -0700)]
LinkBench: Report reduction as a ratio.

Report the linker size reduction metric as a ratio
(linked filesize / unlinked filesize) instead of as a percentage.

7 years agoMerge pull request #11423 from jashook/arm64_live_tests
Jarret Shook [Thu, 11 May 2017 22:26:44 +0000 (15:26 -0700)]
Merge pull request #11423 from jashook/arm64_live_tests

Windows Arm64 - Build/Run tests in CI

7 years agoWindows Arm64 - Build/Run tests in CI
jashook [Fri, 5 May 2017 18:10:12 +0000 (11:10 -0700)]
Windows Arm64 - Build/Run tests in CI

Build tests with arm64 runs and upload/run them to the arm64 test
machines.

7 years agoHandle ADC in x86 unwindLazyState (#11527)
Michelle McDaniel [Thu, 11 May 2017 19:28:28 +0000 (12:28 -0700)]
Handle ADC in x86 unwindLazyState (#11527)

When we add PGO instrumentation to coreclr, the instrumentation injects
PUSH, MOV, ADD, ADC, POP into the prolog to mark the function entry. This
causes a crash because we do not currently handle ADC instructions in
unwindLazyState. This change adds support for ADC, which uses the normal
DecodeRM code we already have in place.

7 years agoAdd back private BadImageFormatException constructor called by the VM (#11523)
Jan Kotas [Thu, 11 May 2017 18:45:38 +0000 (11:45 -0700)]
Add back private BadImageFormatException constructor called by the VM (#11523)

Also removed rethrowing of an exception inside AssemblyName.GetAssemblyName that sometimes resulted into two identical exceptions getting nested into each other.

Fixes #11499

7 years agoFix AssemblyName version (#11505)
Sepideh Khoshnood [Thu, 11 May 2017 18:45:06 +0000 (11:45 -0700)]
Fix AssemblyName version (#11505)

* Fix AssemblyName.FullName

* Use canonicalized version instead of Version.ToString

7 years ago[Arm64] Fixup stlr instrs
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Thu, 11 May 2017 18:01:49 +0000 (18:01 +0000)]
[Arm64] Fixup stlr instrs

7 years ago[Arm64] Add emitter support for ldar/stlr
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Wed, 10 May 2017 17:50:25 +0000 (17:50 +0000)]
[Arm64] Add emitter support for ldar/stlr

7 years ago[Arm64] Fix instGen_Set_Reg_To_Imm per review
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Thu, 11 May 2017 15:55:38 +0000 (15:55 +0000)]
[Arm64] Fix instGen_Set_Reg_To_Imm per review

7 years agoMerge pull request #11437 from mjsabby/eventpipetoprofilerapi
Noah Falk [Thu, 11 May 2017 03:29:30 +0000 (20:29 -0700)]
Merge pull request #11437 from mjsabby/eventpipetoprofilerapi

Add dynamic method unload event to Profiler API

7 years agoThis change has the following improvements to LinkBench
Swaroop Sridhar [Wed, 10 May 2017 22:25:53 +0000 (15:25 -0700)]
This change has the following improvements to LinkBench

1. Move the testing to the latest version of ILLink package
   (for all benchmarks except for Roslyn, which is still on netcoreapp1.1)
2. Support for LinkBench to run individual benchmarks in the suite --
   helps local testing.
3. Support for running without clean, cloning, build etc --
   for local runs during continuous development.
4. Support to obtain the correct version(s) of DotNet CLI required to run
   the benchmarks
5. Get-Crossgen.ps1 is required to crossgen MusicStore binaries (before/after linking).
   Since it was recently dropped from JitBench repo, it is added to linkBench as an asset.
6. Add the --perf:runid parameter to generate output file names suitable
   to upload the results to BenchView.

7 years agoRemove eventpipe stuff left from prev commit
Mukul Sabharwal [Thu, 11 May 2017 01:41:13 +0000 (18:41 -0700)]
Remove eventpipe stuff left from prev commit

7 years agoadd prebuilt file
Mukul Sabharwal [Thu, 11 May 2017 01:39:37 +0000 (18:39 -0700)]
add prebuilt file

7 years agoRemove EventPipeProfiler due to time constraints
Mukul Sabharwal [Thu, 11 May 2017 01:37:58 +0000 (18:37 -0700)]
Remove EventPipeProfiler due to time constraints

7 years agoAllow multiple SetData calls on AppDomain (#11496)
Alex Ghiondea [Wed, 10 May 2017 23:45:01 +0000 (16:45 -0700)]
Allow multiple SetData calls on AppDomain (#11496)

* Allow multiple SetData calls on AppDomain
* Remove restriction from GetData and remove now-dead code Locate
* Remove LoaderOptimization check since it is not used on CoreCLR

7 years agoRe-Factor EventSource to Support Writing to EventPipe (#11435)
Brian Robbins [Wed, 10 May 2017 22:11:28 +0000 (15:11 -0700)]
Re-Factor EventSource to Support Writing to EventPipe (#11435)

Re-Factor EventSource to Support Writing to EventPipe.

7 years agoMerge pull request #11478 from sdmaclea/PR-ARM64-9711
Brian Sullivan [Wed, 10 May 2017 20:50:19 +0000 (13:50 -0700)]
Merge pull request #11478 from sdmaclea/PR-ARM64-9711

[Arm64] Support GTF_IND_VOLATILE

7 years agoAdd version.txt to the coreclr transport package (#11497)
Jose Perez Rodriguez [Wed, 10 May 2017 20:23:28 +0000 (13:23 -0700)]
Add version.txt to the coreclr transport package (#11497)

* Add version.txt to the coreclr transport package

* PR Feedback

7 years agoMerge pull request #11448 from DrewScoggins/AddPriority
Drew Scoggins [Wed, 10 May 2017 20:07:12 +0000 (13:07 -0700)]
Merge pull request #11448 from DrewScoggins/AddPriority

Launch perf process with high priority

7 years agoRenable building frankenjit
dotnet-bot [Wed, 10 May 2017 19:43:11 +0000 (12:43 -0700)]
Renable building frankenjit

[tfs-changeset: 1657926]

7 years ago[ARM/Linux] Enable build with FEATURE_DBGIPC=0 (#11254)
Jonghyun Park [Wed, 10 May 2017 19:32:33 +0000 (12:32 -0700)]
[ARM/Linux] Enable build with FEATURE_DBGIPC=0 (#11254)

* [ARM/Linux] Enable build with FEATURE_DBGIPC=0

* Replace HAVE_ALIGNED_MALLOC with SUPPORT_LOCAL_DEBUGGING

7 years ago[Arm64] Revise GTF_IND_VOLATILE per comments
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Wed, 10 May 2017 16:30:45 +0000 (16:30 +0000)]
[Arm64] Revise GTF_IND_VOLATILE per comments

7 years agoFix clang version detection in src/pal/tools/gen-buildsys-clang.sh (#11398)
Jan Vorlicek [Wed, 10 May 2017 16:32:42 +0000 (18:32 +0200)]
Fix clang version detection in src/pal/tools/gen-buildsys-clang.sh (#11398)

The version detection that was added recently for the purpose of selecting
optimization options for ARM builds was not working properly when the
clang binary doesn't have version in its name. This resulted in syntax
error being reported on OSX and some Linux distros:
/Users/janvorli/git/coreclr/src/pal/tools/gen-buildsys-clang.sh:
line 162: : /usr/bin/clang: syntax error: operand expected (error token is "/usr/bin/clang")

7 years agoUpdate the License to MIT for coreclr repo (#11482)
Tarek Mahmoud Sayed [Wed, 10 May 2017 15:38:20 +0000 (08:38 -0700)]
Update the License to MIT for coreclr repo (#11482)

7 years agoAllow users to enable automatic NI bind fallback via command-line (#11485)
Jonghyun Park [Wed, 10 May 2017 15:10:22 +0000 (08:10 -0700)]
Allow users to enable automatic NI bind fallback via command-line (#11485)

* Add FEATURE_NI_BIND_FALLBACK support

* Fix incorrect variable setup

* Negate the check condition

* Use WIN32 instead of FEATURE_PAL

* Check WIN32 first, and FEATURE_NI_BIND_FALLBACK later

7 years agoMerge pull request #11484 from pgavlin/DisableLongRunningTests
Pat Gavlin [Wed, 10 May 2017 13:56:57 +0000 (06:56 -0700)]
Merge pull request #11484 from pgavlin/DisableLongRunningTests

Disable a few long-running tests.

7 years agoUpdate CoreFx to preview2-25310-01 (#11483)
dotnet bot [Wed, 10 May 2017 05:20:44 +0000 (22:20 -0700)]
Update CoreFx to preview2-25310-01 (#11483)

7 years agoDisable a few long-running tests.
Pat Gavlin [Wed, 10 May 2017 03:41:05 +0000 (20:41 -0700)]
Disable a few long-running tests.

These tests consistently time out under GC stress or heap verification.
Each disabled test is known to complete successfully given adequate
time.

7 years agoFix lldbplugin to properly build with lldb 3.9. (#11480)
Mike McLaughlin [Wed, 10 May 2017 02:14:09 +0000 (19:14 -0700)]
Fix lldbplugin to properly build with lldb 3.9. (#11480)

7 years ago[x86, R2R] Exclude DevDiv_278523 because it fails in R2R
Sergey Andreenko [Tue, 9 May 2017 21:11:24 +0000 (14:11 -0700)]
[x86, R2R] Exclude DevDiv_278523 because it fails in R2R

Look at #11476 for the description.

7 years agoMerge pull request #11465 from JosephTremoulet/StaticHoist
Joseph Tremoulet [Tue, 9 May 2017 23:36:14 +0000 (19:36 -0400)]
Merge pull request #11465 from JosephTremoulet/StaticHoist

Stop hoisting statics above cctors

7 years agoMerge pull request #11351 from sdmaclea/PR-ARM64-RRSS-SSRR
Brian Sullivan [Tue, 9 May 2017 23:11:33 +0000 (16:11 -0700)]
Merge pull request #11351 from sdmaclea/PR-ARM64-RRSS-SSRR

[Arm64] Add emitIns_R_R_S_S & emitIns_S_S_R_R

7 years agodelete tabs from the exclude list
Sergey Andreenko [Tue, 9 May 2017 20:24:37 +0000 (13:24 -0700)]
delete tabs from the exclude list

7 years agoStop hoisting statics above cctors
Joseph Tremoulet [Tue, 9 May 2017 02:30:04 +0000 (22:30 -0400)]
Stop hoisting statics above cctors

Extend the logic in optLoopHoist around `CLS_VAR` nodes to ensure we don't
hoist any tree that contains a `CLS_VAR` for a field with the flag
`CORINFO_FLG_FIELD_INITCLASS` set, unless we also (identify and) hoist the
corresponding static init helper call.  The previous logic was
insufficient in that it blocked hoisting of singleton `CLS_VAR` nodes, but
not hoisting of trees that contain `CLS_VAR` nodes as sub-trees.

Add flag `GTF_FLD_INITCLASS`/`GTF_CLS_VAR_INITCLASS` so that optLoopHoist
can recall which fields are paired with static init helper calls, and only
block the hoisting of their trees.

Fixes #10780.

7 years ago[Arm64] Support GTF_IND_VOLATILE
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Tue, 9 May 2017 19:45:49 +0000 (19:45 +0000)]
[Arm64] Support GTF_IND_VOLATILE

Addresses #9711 for arm64

7 years agoReplace tabs with spaces.
Sergey Andreenko [Tue, 9 May 2017 19:07:20 +0000 (12:07 -0700)]
Replace tabs with spaces.

7 years agoReturn DevDiv_255294 test to the exclude list for x86
Sergey Andreenko [Tue, 9 May 2017 18:00:08 +0000 (11:00 -0700)]
Return DevDiv_255294 test to the exclude list for x86

Because it causes out of memory exception in crossgen mode.

7 years agoFix static analysis issues (#11466)
Koundinya Veluri [Tue, 9 May 2017 20:56:40 +0000 (13:56 -0700)]
Fix static analysis issues (#11466)

Fix static analysis issues

7 years agoMerge pull request #11406 from sdmaclea/PR-ARM64-ENABLE-FEATURE_TAILCALL_OPT
Bruce Forstall [Tue, 9 May 2017 19:05:20 +0000 (12:05 -0700)]
Merge pull request #11406 from sdmaclea/PR-ARM64-ENABLE-FEATURE_TAILCALL_OPT

[Arm64] Enable FEATURE_TAILCALL_OPT

7 years agoStop loading crossgen-ed binaries at preferred address on Unix (#11467)
Jan Vorlicek [Tue, 9 May 2017 18:30:59 +0000 (20:30 +0200)]
Stop loading crossgen-ed binaries at preferred address on Unix (#11467)

This change removes attempt to load crossgen-ed binaries at preferred
address on Unix and uses whatever address the mmap returns instead.

7 years agoFix issue #11446. (#11455)
Pat Gavlin [Tue, 9 May 2017 18:10:00 +0000 (11:10 -0700)]
Fix issue #11446. (#11455)

This issue was a GC hole that was caused by bad IR produced by
recursivelty promoting a struct with the following form:

```
struct S
{
    struct T
    {
        object o;
    };

    T t;
}
```

In this case, the recursive promotion logic created a single lclVar to
represent `S.t` and retyped it using the type of `T.o`, but did not
rewrite IR that treated the single lclVar as a struct (e.g. instances of
`lclFld/st.lclFld Vx` where `Vx` referred to the lclVar that represented
`S.t` were not rewritten an `lclVar/st.lclVar Vx`). This IR in
turn confused the incremental liveness used during code generation,
which caused the stack slot holding `o`'s value to die too early.

This change fixes codegen's incremental liveness to handle this case.

7 years ago[Arm64] Use movn in instGen_Set_Reg_To_Imm
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Mon, 8 May 2017 20:08:07 +0000 (20:08 +0000)]
[Arm64] Use movn in instGen_Set_Reg_To_Imm

Reduces total generated instructions
Fixes #3092

7 years agoUpdate CoreClr, CoreFx to preview2-25309-01, preview2-25309-01, respectively (#11427)
dotnet bot [Tue, 9 May 2017 14:32:46 +0000 (07:32 -0700)]
Update CoreClr, CoreFx to preview2-25309-01, preview2-25309-01, respectively (#11427)

7 years agoEnable build on old Linux (#11414)
Jan Vorlicek [Tue, 9 May 2017 09:03:32 +0000 (11:03 +0200)]
Enable build on old Linux (#11414)

This change enables building coreclr on old Linux distros that
don't have PR_SET_PTRACER and don't have _xstate struct in the
standard sigcontext.h header.

7 years agoAdd an event pipe that pipes to the profiler apis
Mukul Sabharwal [Sun, 7 May 2017 10:17:39 +0000 (03:17 -0700)]
Add an event pipe that pipes to the profiler apis

7 years agoAvoid throwing in the globalization managed callbacks (#11454)
Tarek Mahmoud Sayed [Tue, 9 May 2017 01:03:05 +0000 (18:03 -0700)]
Avoid throwing in the globalization managed callbacks (#11454)

* Avoid throwing in the globalization managed callbacks

* Add Assert

7 years agoFailFast stderr logging with stacktrace (#11397)
Viktor Hofer [Tue, 9 May 2017 00:41:06 +0000 (17:41 -0700)]
FailFast stderr logging with stacktrace (#11397)

7 years agoMerge pull request #11457 from jashook/arm64_pri1_tests
Jarret Shook [Mon, 8 May 2017 23:18:08 +0000 (16:18 -0700)]
Merge pull request #11457 from jashook/arm64_pri1_tests

[Arm64] For arm64 jobs build pri1 tests by default

7 years agoMerge pull request #11451 from pgavlin/gh11447
Pat Gavlin [Mon, 8 May 2017 22:56:54 +0000 (15:56 -0700)]
Merge pull request #11451 from pgavlin/gh11447

Fix issue #11447.

7 years ago[Arm64] For arm64 jobs build pri1 tests by default
jashook [Mon, 8 May 2017 22:41:12 +0000 (15:41 -0700)]
[Arm64] For arm64 jobs build pri1 tests by default

This relates to coreclr #11423, enabling pri1 tests to
be built.

7 years agoAdd assembly level attribute on CoreLib (#11449)
Alex Ghiondea [Mon, 8 May 2017 22:14:02 +0000 (15:14 -0700)]
Add assembly level attribute on CoreLib (#11449)

7 years agoLaunch perf process with high priority
Drew Scoggins [Mon, 8 May 2017 18:59:23 +0000 (11:59 -0700)]
Launch perf process with high priority

This change uses the stability prefix flag that was already in
run-xunit-perf to pass flags to set the affinity of the process to a
single processor and to run the process at high priority.

7 years agoAdd the "createdump" to the linux runtime package. (#11441)
Mike McLaughlin [Mon, 8 May 2017 20:34:41 +0000 (13:34 -0700)]
Add the "createdump" to the linux runtime package. (#11441)

7 years agoFix issue #11447.
Pat Gavlin [Mon, 8 May 2017 19:17:42 +0000 (12:17 -0700)]
Fix issue #11447.

This issue was caused by the code for PInvoke frame initialization reading
from the stub argument register after it had been trashed by prior
instructions. This change fixes this issue by inserting the PInvoke
frame initialization at the beginning of the scratch block into which it
is inserted rather than at the end.

Note that a more correct fix here would be to represent the stub
argument as a lclVar rather than a physical register; that work is
tracked by #11450.

7 years agoMake CoreCLR work properly under PaX's RANDMMAP (#11382)
Koundinya Veluri [Mon, 8 May 2017 19:16:21 +0000 (12:16 -0700)]
Make CoreCLR work properly under PaX's RANDMMAP (#11382)

Make CoreCLR work properly under PaX's RANDMMAP

Issues:
- The ExecutableMemoryAllocator is used to attempt to map native images into a memory range near libcoreclr so that its helper table can use short relative addresses for jumps to libcoreclr
  - RANDMMAP typically prevents mmap calls with a specific address from reserving memory at the requested address, so the executable memory allocator fails to reserve any memory. When Server GC is enabled, the large GC heap can exacerbate the issue by taking address space near libcoreclr.
- Native images are loaded far from libcoreclr, and now jump stub space needs to be allocated near the native image, but RANDMMAP typically prevents this too
- NGenReserveForJumpStubs is intended to reserve some memory near mapped native images for jump stubs, but that reservation is done with a separate mmap call in the same way as above and RANDMMAP typically prevents this too
- The JIT needs to allocate memory for code that may need to jump/call to a native image or libcoreclr, which may require jump stubs near the code that cannot be allocated. CodeHeapReserveForJumpStubs reserves space in code heap blocks without using a separate call to mmap, so this works, but without this environment variable by default there is still a good chance of failing.
- See https://github.com/dotnet/coreclr/blob/56d550d4f8aec2dd40b72a182205d0a2463a1bc9/Documentation/design-docs/jump-stubs.md for more details

Fixes #8480
- It would be ideal to fix all of the above properly, such that there would never be a need to attempt reserving memory within a certain range. Since we're running out of time for 2.0, I figured the following simpler, temporary solution that should cover most of the practical cases, may be appropriate for 2.0.
- Extended ExecutableMemoryAllocator to reserve address space even when it cannot do so near libcoreclr
- Had ClrVirtualAllocWithinRange use the executable memory allocator to reserve memory for jump stubs when the requested range is satisfied
- This covers a maximum of ~2 GB of executable code and should cover most of the practical cases. Once this space is exhausted, under RANDMMAP, native images loaded later will fail, and for jitted code the environment variable above can be used.

7 years agoMerge pull request #11445 from jashook/fix_build_break
Jarret Shook [Mon, 8 May 2017 19:14:18 +0000 (12:14 -0700)]
Merge pull request #11445 from jashook/fix_build_break

Add define for FEATURE_SIMD

7 years agoMerge pull request #11443 from DrewScoggins/CopyFix
Drew Scoggins [Mon, 8 May 2017 18:50:45 +0000 (11:50 -0700)]
Merge pull request #11443 from DrewScoggins/CopyFix

Fix copy error in perf script

7 years agoMerge pull request #11231 from russellhadley/UpdateEHDoc
Russell C Hadley [Mon, 8 May 2017 18:08:11 +0000 (11:08 -0700)]
Merge pull request #11231 from russellhadley/UpdateEHDoc

Update EH WriteThru doc with review feedback.

7 years agoUpdate doc with review feedback.
Russell Hadley [Wed, 26 Apr 2017 19:24:24 +0000 (12:24 -0700)]
Update doc with review feedback.

Factor in additional exception cases from Andy and fix some wording from
Joe.

7 years agoAdd define for FEATURE_SIMD
jashook [Mon, 8 May 2017 16:30:24 +0000 (09:30 -0700)]
Add define for FEATURE_SIMD

This fixs a build break in the desktop product.

7 years agoUse profile information to differentiate files
Drew Scoggins [Mon, 8 May 2017 17:19:05 +0000 (10:19 -0700)]
Use profile information to differentiate files

7 years ago[Arm64] Revise per comments
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Mon, 8 May 2017 15:47:22 +0000 (15:47 +0000)]
[Arm64] Revise per comments

7 years ago[Arm64] Add emitIns_R_R_S_S
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Mon, 1 May 2017 19:10:37 +0000 (19:10 +0000)]
[Arm64] Add emitIns_R_R_S_S

7 years ago[Arm64] Add emitIns_S_S_R_R
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Mon, 1 May 2017 17:44:19 +0000 (17:44 +0000)]
[Arm64] Add emitIns_S_S_R_R

7 years agoMinor typo corrected (#11444)
Sebastian Lauber [Mon, 8 May 2017 16:08:27 +0000 (18:08 +0200)]
Minor typo corrected (#11444)

7 years agoChange xcopy to copy
Drew Scoggins [Mon, 8 May 2017 06:26:42 +0000 (23:26 -0700)]
Change xcopy to copy

7 years agoFix copy error in perf script
Drew Scoggins [Mon, 8 May 2017 05:09:20 +0000 (22:09 -0700)]
Fix copy error in perf script

When I merged the PR that enabled the lean runs I added another call to
our run script.  This run script had an assumption that it would only
ever be called once and as such would try and copy two files that had
the same name.  This would cause it to prompt to overwrite or not and
fail the run.  This change makes each copy unique based on the
collection flags that were used for collection.

7 years agoMake Debugger class static (#11439)
Justin Van Patten [Mon, 8 May 2017 03:42:41 +0000 (20:42 -0700)]
Make Debugger class static (#11439)

* Make Debugger class static

It's static in the .NET Standard and .NET Core refs, and in CoreRT's
implementation, so make it static in the CoreCLR implementation as well.
Also, minor cleanup while making changes here.

7 years agoLog Events to EventPipe on Linux (#11433)
Brian Robbins [Sat, 6 May 2017 19:36:08 +0000 (12:36 -0700)]
Log Events to EventPipe on Linux (#11433)

* Implement the EventPipe object model for providers and events.

* Plumb Runtime Events into EventPipe (#11145)

Plumb runtime ETW events into the EventPipe.

* Fix bug where all events except for SampleProfiler events were never enabled.

* Plumb EventPipeEventInstance through the EventPipe.

* Implement EventPipeFile and FastSerializer.

* Write event contents to the EventPipeFile.

* Only build EventPipe on Linux.

* Conditionally add a sentinel value marking event end.

* Send SampleProfiler events to the EventPipeFile.

* Fix provider ID printing to JSON file.

* Write the start date/time, timestamp, and clock frequency into the trace file.

* Support unloading of EventPipeProviders.

* Handle failure cases when we can't walk the stack or are shutting down.

* Fix a bug where we pass a null src pointer to memcpy.

7 years agoDelete dead code (#11431)
Jan Kotas [Sat, 6 May 2017 18:03:27 +0000 (11:03 -0700)]
Delete dead code (#11431)

7 years agoDelete moved file
Jan Kotas [Sat, 6 May 2017 14:18:56 +0000 (07:18 -0700)]
Delete moved file

7 years agoDelete moved files and fix build breaks
Jan Kotas [Sat, 6 May 2017 03:48:28 +0000 (20:48 -0700)]
Delete moved files and fix build breaks

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMove more files to shared CoreLib partition (#11429)
Jan Kotas [Sat, 6 May 2017 03:32:38 +0000 (20:32 -0700)]
Move more files to shared CoreLib partition (#11429)