platform/upstream/coreclr.git
5 years agoAdd unloadability support to ReliabilityFramework (#20418)
Jan Vorlicek [Thu, 8 Nov 2018 00:08:46 +0000 (01:08 +0100)]
Add unloadability support to ReliabilityFramework (#20418)

* Add unloadability support to ReliabilityFramework

This change adds support for unloadable AssemblyLoadContext to the GC
ReliabilityFramework. It basically mimics what was there ifdef-ed out
for AppDomains.
It allows stress testing GC when running inside of an unloadable
AssemblyLoadContext. GC has some special handling for collectible
classes and this allows testing the respective code paths.

* Make tests run on separate threads

The tests running in the assembly load context were bot using separate
threads per test and so they were not really stressing GC as much as
possible. This change fixes that.
I've also merged code for AppDomains / AssemblyLoadContext at most
places so that the differences are clearly visible.

5 years agoRemove need for full GC for unloadable stuff (#20384)
Jan Vorlicek [Thu, 8 Nov 2018 00:08:20 +0000 (01:08 +0100)]
Remove need for full GC for unloadable stuff (#20384)

This change removes enforcing of full GC after native LoaderAllocator is
destroyed. It turns out it was not needed. There is no regression in
running coreclr pri 1 tests inside an unloadable AssemblyLoadContext and
unloading the context after a test completes for each test.

5 years agoFix string error handling for failed DNS lookup (dotnet/corefx#32351)
Tomas Weinfurt [Wed, 7 Nov 2018 14:55:12 +0000 (06:55 -0800)]
Fix string error handling for failed DNS lookup (dotnet/corefx#32351)

* better handling for dns failures

* cleanup

* add test for DNS failure exception

* relaxt test a little bit to make it more robust for future

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoImprove DumpAsync SOS command (#20845)
Stephen Toub [Wed, 7 Nov 2018 20:14:00 +0000 (15:14 -0500)]
Improve DumpAsync SOS command (#20845)

* Help DumpDelegate to dump more cases

* Improve DumpAsync command

- Add a stats summary at the beginning of the output
- Improved single-line-per-entry default behavior for increased readability
- Add option to include all tasks, not just async state machine objects
- Include state value for each async object, the state field for async state machines or the state flags for other tasks
- Support following continuation chains, rendered as "async stacks"
- Support resolving delegate names so that Task.Run and related items have the associated method name displayed
- Optional (experimental) DGML rendering of the graph
- Optionally include completed tasks, by default filtering them out
- Optionally display the fields of state machines

* Decode task state flags

* Add addr option and associated DumpAsync DML

* Fix cast warnings in checked / fprintf_s on Unix

* Remove DGML from DumpAsync

Not enough value right now, and complications in compilation on Unix given sos's current set up.  Not worth it.

5 years agoDelete dead code from IdnMapping (#20857)
Stephen Toub [Wed, 7 Nov 2018 18:55:22 +0000 (13:55 -0500)]
Delete dead code from IdnMapping (#20857)

5 years agoMerge pull request #20787 from CarolEidt/Arm64IntrinsicsWindows
Carol Eidt [Wed, 7 Nov 2018 15:06:40 +0000 (07:06 -0800)]
Merge pull request #20787 from CarolEidt/Arm64IntrinsicsWindows

Add Windows support for Arm64 HW Intrinsics

5 years ago[Darc-Update] Update dependencies from build 20181106.6 of https://github.com/dotnet...
dotnet-maestro[bot] [Wed, 7 Nov 2018 14:35:49 +0000 (14:35 +0000)]
[Darc-Update] Update dependencies from build 20181106.6 of https://github.com/dotnet/arcade (#20832)

* Updating version files

* Updating version files

5 years agoForce using clang5.0 for Ubuntu arm32 builds (#20825)
Bruce Forstall [Wed, 7 Nov 2018 06:35:12 +0000 (22:35 -0800)]
Force using clang5.0 for Ubuntu arm32 builds (#20825)

* Force using clang5.0 for Ubuntu arm32 builds

* Update for code review feedback

to https://github.com/dotnet/corefx/pull/33261

5 years agoexclude freebsd symbols from publishing (#20854)
Tomas Weinfurt [Wed, 7 Nov 2018 03:48:02 +0000 (19:48 -0800)]
exclude freebsd symbols from publishing (#20854)

* try to use exclude on same line as Include instead of remove in separate step

* update freebsd exclude pattern

5 years agoPull out GetContainingObject
Andrew Au [Mon, 5 Nov 2018 19:34:49 +0000 (11:34 -0800)]
Pull out GetContainingObject

5 years agoNITs
Andrew Au [Thu, 1 Nov 2018 23:59:55 +0000 (16:59 -0700)]
NITs

5 years agoComments in JIT helper
Andrew Au [Thu, 1 Nov 2018 19:01:54 +0000 (12:01 -0700)]
Comments in JIT helper

5 years agoMore code review feedback
Andrew Au [Tue, 30 Oct 2018 17:50:47 +0000 (10:50 -0700)]
More code review feedback

5 years agoGetContainingObject should be a method of ICorDebugValue
Andrew Au [Tue, 30 Oct 2018 01:31:45 +0000 (18:31 -0700)]
GetContainingObject should be a method of ICorDebugValue

5 years agoChange GetContainingObject API
Andrew Au [Thu, 25 Oct 2018 02:22:44 +0000 (19:22 -0700)]
Change GetContainingObject API

5 years agoFEATURE_DATABREAKPOINT
Andrew Au [Tue, 23 Oct 2018 23:49:52 +0000 (16:49 -0700)]
FEATURE_DATABREAKPOINT

5 years agoCode review feedback
Andrew Au [Thu, 18 Oct 2018 01:01:55 +0000 (18:01 -0700)]
Code review feedback

5 years agoComment on jithelp.asm
Andrew Au [Mon, 15 Oct 2018 18:45:01 +0000 (11:45 -0700)]
Comment on jithelp.asm

5 years agoEnsure BeforeGC and AfterGC events are always sent in pairs
Chuck Ries [Fri, 12 Oct 2018 23:28:36 +0000 (16:28 -0700)]
Ensure BeforeGC and AfterGC events are always sent in pairs

This latches the m_isGarbageCollectionEventsEnabled in BeforeGarbageCollection
to ensure that if we send a BeforeGC event we will send the corresponding
AfterGC event. It also ensure we will not send an AfterGC event if we did not
send the corresponding BeforeGC event.

5 years agoStepping out of the write barrier
Andrew Au [Sat, 13 Oct 2018 01:34:12 +0000 (18:34 -0700)]
Stepping out of the write barrier

5 years agoComplete the work for AMD64 unwind out of write barrier work
Andrew Au [Thu, 11 Oct 2018 20:53:55 +0000 (13:53 -0700)]
Complete the work for AMD64 unwind out of write barrier work

5 years agoBringing up the AMD64 support for unwinding away from JIT WriteBarrier
Andrew Au [Wed, 10 Oct 2018 22:29:48 +0000 (15:29 -0700)]
Bringing up the AMD64 support for unwinding away from JIT WriteBarrier

5 years agoMake the write barrier unwinding fix works for coreclr release build
Andrew Au [Wed, 10 Oct 2018 17:16:29 +0000 (10:16 -0700)]
Make the write barrier unwinding fix works for coreclr release build

5 years agox86 only stackwalk fix
Andrew Au [Wed, 10 Oct 2018 00:32:33 +0000 (17:32 -0700)]
x86 only stackwalk fix

5 years agoAllocating the DebuggerDataBreakpoint object in the right heap
Andrew Au [Thu, 20 Sep 2018 23:44:39 +0000 (16:44 -0700)]
Allocating the DebuggerDataBreakpoint object in the right heap

5 years agoAvoid unused event types
Andrew Au [Tue, 28 Aug 2018 03:48:54 +0000 (20:48 -0700)]
Avoid unused event types

5 years agoAvoiding triggering data breakpoint in Linux
Andrew Au [Tue, 28 Aug 2018 00:58:30 +0000 (17:58 -0700)]
Avoiding triggering data breakpoint in Linux

5 years agoLinux fix
Andrew Au [Tue, 28 Aug 2018 00:40:13 +0000 (17:40 -0700)]
Linux fix

5 years agoFix ARM compilation issue
Andrew Au [Mon, 13 Aug 2018 21:53:10 +0000 (14:53 -0700)]
Fix ARM compilation issue

5 years agoMore code review feedback
Andrew Au [Mon, 13 Aug 2018 18:14:18 +0000 (11:14 -0700)]
More code review feedback

5 years agoCode review feedback
Andrew Au [Sat, 11 Aug 2018 00:10:02 +0000 (17:10 -0700)]
Code review feedback

5 years agoMore comments about Debugger::SuspendComplete
Andrew Au [Fri, 10 Aug 2018 22:39:51 +0000 (15:39 -0700)]
More comments about Debugger::SuspendComplete

5 years agoUse proper macros for GetContainingObject()
Andrew Au [Fri, 10 Aug 2018 22:17:01 +0000 (15:17 -0700)]
Use proper macros for GetContainingObject()

5 years agoAdding comments for thread execution mode in DebuggerRCThread::SendIPCEvent
Andrew Au [Fri, 10 Aug 2018 22:16:48 +0000 (15:16 -0700)]
Adding comments for thread execution mode in DebuggerRCThread::SendIPCEvent

5 years agoMore API comments
Andrew Au [Fri, 10 Aug 2018 17:44:36 +0000 (10:44 -0700)]
More API comments

5 years agoFix a couple bugs in GetContainingObject
Andrew Au [Fri, 10 Aug 2018 17:27:24 +0000 (10:27 -0700)]
Fix a couple bugs in GetContainingObject

5 years agoRename lite to isEESuspendedForGC
Andrew Au [Thu, 9 Aug 2018 18:15:18 +0000 (11:15 -0700)]
Rename lite to isEESuspendedForGC

5 years agoICorDebug API documentation
Andrew Au [Thu, 9 Aug 2018 17:27:23 +0000 (10:27 -0700)]
ICorDebug API documentation

5 years agoTurn GarbageCollection events off by default and allow VS turning them on
Andrew Au [Tue, 7 Aug 2018 23:55:21 +0000 (16:55 -0700)]
Turn GarbageCollection events off by default and allow VS turning them on

5 years agoFixing the deadlocks
Andrew Au [Mon, 6 Aug 2018 22:04:37 +0000 (15:04 -0700)]
Fixing the deadlocks

5 years agoFix collision with ICorDebugProcess9 to 10
Andrew Wang [Thu, 2 Aug 2018 01:53:21 +0000 (18:53 -0700)]
Fix collision with ICorDebugProcess9 to 10

5 years agoFix a bug where a data breakpoint is accidentially deleted when the context is restor...
Andrew Au [Thu, 19 Jul 2018 20:00:49 +0000 (13:00 -0700)]
Fix a bug where a data breakpoint is accidentially deleted when the context is restored on FuncEval completion

5 years agoUsing Debugger::SuspendComplete()
Andrew Au [Fri, 13 Jul 2018 18:12:24 +0000 (11:12 -0700)]
Using Debugger::SuspendComplete()

5 years agoReturn better HR for failing to get managed thread context
Andrew Au [Wed, 11 Jul 2018 20:41:07 +0000 (13:41 -0700)]
Return better HR for failing to get managed thread context

5 years agoDo not handle the thread context for garbage collection events
Andrew Au [Wed, 11 Jul 2018 00:20:42 +0000 (17:20 -0700)]
Do not handle the thread context for garbage collection events

5 years agoSimple fixes
Andrew Au [Sat, 7 Jul 2018 16:33:14 +0000 (09:33 -0700)]
Simple fixes

5 years agoEliminate dataBreakpointMask from ICorDebug
Andrew Au [Fri, 29 Jun 2018 22:54:12 +0000 (15:54 -0700)]
Eliminate dataBreakpointMask from ICorDebug

5 years agoFixing linux build
Andrew Au [Wed, 27 Jun 2018 20:23:17 +0000 (13:23 -0700)]
Fixing linux build

5 years agoGet/Set the ThreadContext natively if the debuggee is block on garbage collection...
Andrew Au [Wed, 27 Jun 2018 18:15:04 +0000 (11:15 -0700)]
Get/Set the ThreadContext natively if the debuggee is block on garbage collection events

5 years agoHacking CordbProcess::GetThreadContext / SetThreadContext to retrieve/modify managed...
Andrew Au [Tue, 26 Jun 2018 17:31:07 +0000 (10:31 -0700)]
Hacking CordbProcess::GetThreadContext / SetThreadContext to retrieve/modify managed ThreadContext

5 years agoClear Canary cache unconditionally
Andrew Au [Thu, 21 Jun 2018 17:52:13 +0000 (10:52 -0700)]
Clear Canary cache unconditionally

5 years agoFix linux build
Andrew Au [Thu, 21 Jun 2018 17:45:31 +0000 (10:45 -0700)]
Fix linux build

5 years agoThis should fix the non-deterministic failures
Andrew Au [Wed, 20 Jun 2018 00:06:31 +0000 (17:06 -0700)]
This should fix the non-deterministic failures

5 years agoProperly fix the DB_IPCE_ASYNC_BREAK case
Andrew Au [Fri, 15 Jun 2018 23:18:48 +0000 (16:18 -0700)]
Properly fix the DB_IPCE_ASYNC_BREAK case

5 years agoRemoving unnecessary hacks
Andrew Au [Thu, 24 May 2018 22:52:32 +0000 (15:52 -0700)]
Removing unnecessary hacks

5 years agofind_object
Maoni0 [Wed, 23 May 2018 20:52:08 +0000 (13:52 -0700)]
find_object

5 years agoCompleted the lock reversal work
Andrew Au [Thu, 24 May 2018 18:43:54 +0000 (11:43 -0700)]
Completed the lock reversal work

5 years agoMaking sure issues are tracked by TODOs
Andrew Au [Tue, 22 May 2018 23:00:11 +0000 (16:00 -0700)]
Making sure issues are tracked by TODOs

5 years agoFiring the GC events within the thread suspension
Andrew Au [Tue, 22 May 2018 22:08:25 +0000 (15:08 -0700)]
Firing the GC events within the thread suspension

5 years agoContainerObject -> ContainingObject
Andrew Au [Thu, 17 May 2018 22:20:15 +0000 (15:20 -0700)]
ContainerObject -> ContainingObject

5 years agoPass databreakpoint mask into debugger
Tom McDonald [Thu, 17 May 2018 02:20:06 +0000 (19:20 -0700)]
Pass databreakpoint mask into debugger

5 years agoImplement ICorDebugManagedCallback4::DataBreakpoint
Tom McDonald [Wed, 16 May 2018 18:31:34 +0000 (11:31 -0700)]
Implement ICorDebugManagedCallback4::DataBreakpoint

5 years agoSaving progress
Andrew Au [Wed, 16 May 2018 00:42:29 +0000 (17:42 -0700)]
Saving progress

5 years agoICorDebugValue -> ICorDebugObjectValue on GetContainerObject()
Andrew Au [Tue, 15 May 2018 20:54:46 +0000 (13:54 -0700)]
ICorDebugValue -> ICorDebugObjectValue on GetContainerObject()

5 years agoA dummy implementation of the GetContainerObject API
Andrew Au [Mon, 14 May 2018 22:52:55 +0000 (15:52 -0700)]
A dummy implementation of the GetContainerObject API

5 years agoBoilerplate for adding new DBI method
Andrew Au [Mon, 14 May 2018 17:18:38 +0000 (10:18 -0700)]
Boilerplate for adding new DBI method

5 years agoPassing ICorDebugProcess instead of ICorDebugController
Andrew Au [Thu, 10 May 2018 23:43:54 +0000 (16:43 -0700)]
Passing ICorDebugProcess instead of ICorDebugController

5 years agoThe GC events are now working, somewhat ...
Andrew Au [Thu, 10 May 2018 21:49:39 +0000 (14:49 -0700)]
The GC events are now working, somewhat ...

5 years agoMake sure we block after sending the events
Andrew Au [Thu, 10 May 2018 16:39:33 +0000 (09:39 -0700)]
Make sure we block after sending the events

5 years agoSaving progress - works towards gc events
Andrew Au [Wed, 9 May 2018 16:40:47 +0000 (09:40 -0700)]
Saving progress - works towards gc events

5 years agoAdd x86 data breakpoint support
Andrew Au [Fri, 4 May 2018 20:33:12 +0000 (13:33 -0700)]
Add x86 data breakpoint support

5 years agoInitial data breakpoint changes
Cagri (Charlie) Aslan [Wed, 28 Mar 2018 02:39:16 +0000 (19:39 -0700)]
Initial data breakpoint changes

temporary changes towards multiple data breakpoints

add multiple hardware bp support

Remove Complus.log

revert log.cpp changes

5 years agoDisable running ILAsm round-trip build on COM Tests (#20822)
Jeremy Koritzinsky [Wed, 7 Nov 2018 00:26:40 +0000 (16:26 -0800)]
Disable running ILAsm round-trip build on COM Tests (#20822)

* Disable running ILAsm round-trip build on COM  (requires ilasm resource embedding support).

* ILAsmTestKind -> IlrtTestKind

5 years agotry to use exclude on same line as Include instead of remove in separate step (#20846)
Tomas Weinfurt [Tue, 6 Nov 2018 23:10:18 +0000 (15:10 -0800)]
try to use exclude on same line as Include instead of remove in separate step (#20846)

5 years agoLoop-free GC rounding helpers with _BitScanReverse. (#20157)
Jack Pappas [Tue, 6 Nov 2018 23:07:47 +0000 (18:07 -0500)]
Loop-free GC rounding helpers with _BitScanReverse. (#20157)

5 years agoRemove /RESOURCE flag documentation on ilasm. (#20818)
Jeremy Koritzinsky [Tue, 6 Nov 2018 21:33:29 +0000 (13:33 -0800)]
Remove /RESOURCE flag documentation on ilasm. (#20818)

* Remove /RESOURCE flag on ilasm.

* Revert "Remove /RESOURCE flag on ilasm."

This reverts commit 7d1a9ac959a94359d2f1ef5f70ec7041804ec6f4.

* Update documentation in ilasm switches.

* Update documentation to say that the obj file has to come from a .res file.

* Remove documentation of the /RESOURCE switch. Leave the switch code-path in place for corefx.

5 years agoImprove performance of Memory<T>.Span property getter (#20386)
Levi Broderick [Tue, 6 Nov 2018 19:02:16 +0000 (11:02 -0800)]
Improve performance of Memory<T>.Span property getter (#20386)

- We can use our knowledge of object representation in the runtime to speed up type checks.
- We leave the ref T and the length deconstructed until the very end, optimizing register usage.
- The Length property getter is once again just a simple field accessor with no bitwise logic.

5 years agoMerge pull request #20633 from BruceForstall/FixSPCheck
Bruce Forstall [Tue, 6 Nov 2018 18:52:40 +0000 (10:52 -0800)]
Merge pull request #20633 from BruceForstall/FixSPCheck

Fix SP check for x64/x86, remove for arm32/arm64

5 years agoEnable SyncBlk for xplat SOS (#20830)
Mike McLaughlin [Tue, 6 Nov 2018 18:42:53 +0000 (10:42 -0800)]
Enable SyncBlk for xplat SOS (#20830)

Add SyncBlk to xplat SOS.

5 years agofix corefx folder (#20828)
Sergey Andreenko [Tue, 6 Nov 2018 18:24:37 +0000 (10:24 -0800)]
fix corefx folder (#20828)

5 years agoMerge pull request #20834 from BruceForstall/FixArmElJob
Bruce Forstall [Tue, 6 Nov 2018 17:52:29 +0000 (09:52 -0800)]
Merge pull request #20834 from BruceForstall/FixArmElJob

Fix corefx folder for Tizen job

5 years agoFix corefx folder for Tizen job
Bruce Forstall [Tue, 6 Nov 2018 17:28:45 +0000 (09:28 -0800)]
Fix corefx folder for Tizen job

https://ci.dot.net/job/dotnet_coreclr/job/master/job/armel_cross_checked_tizen_innerloop_prtest/

5 years agoAdded support for running in a sandbox on Mac (#20735)
Oded Hanson [Tue, 6 Nov 2018 16:31:49 +0000 (18:31 +0200)]
Added support for running in a sandbox on Mac (#20735)

* Added support for running in a sandbox on Mac

When running in a sandbox, the Mac operating system will limit access to resources, esp. the file system. Right now both Mutex and SharedMemory in the PAL are accessing the /tmp folder for which Mac does not provide the application permissions to access.

Instead, the sandbox provides the ability to share information between applications by using a shared container folder. This is done by registering the application with an Application Group ID. Using this ID, we can access the shared folder and read/write from it.

Since the .Net runtime can be loaded in multiple ways, we decided that the easiest way to let the runtime know what the application group ID is via an environment variable. Thus, if the NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID environment variable is set (on Mac), the runtime will assume we are sandboxed, and will use the value provided as the application group ID. Note that due to limitations on semaphore file lengths, we will not allow application group IDs longer than 13 characters. This gives us 10 characters for the developer ID, and 3 extra characters for the group name.

When sandbox is disabled (the environment variable is empty) then the folder for Mutex and SharedMemory will continue to be rooted in /tmp. However when the sandbox is enabled, these files will be created under /user/{loginname}/Library/Group Containers/{AppGroupId}/.

Fixes #20473

* Made  gApplicationContainerPath a pointer so it does not get automatically deleted by the c runtime

* Made s_runtimeTempDirectoryPath and s_sharedMemoryDirectoryPath pointers so they are not automatically deleted by the c runtime

* Renamed gApplicationContainerPath to gSharedFilesPath

* Renamed NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID to DOTNET_SANDBOX_APPLICATION_GROUP_ID

* Fixed usage of VerifyStringOperation

* Replaced new with InternalNew

* Wrapped Apple specific code with #ifdef

* Added exception handling during close

* Moved VerifyStringOperation macro into SharedMemoryManager

* Moved PathCharString variable declarations before AutoCleanup is declared.

* Fixed initialization functions not to throw

* Renamed CopyPath to BuildSharedFilesPath

* Fixed misc nits

* Fixed implicit conversions from BOOL to bool

* Moved MAX_APPLICATION_GROUP_ID_LENGTH inside ifdef APPLE

* Removed PAL_IsApplicationSandboxed

5 years agoFix calling convention for 3 p/invoke test cases
Bruce Forstall [Tue, 6 Nov 2018 02:41:16 +0000 (18:41 -0800)]
Fix calling convention for 3 p/invoke test cases

5 years agoFix SP check for x64/x86, remove for arm32/arm64
Bruce Forstall [Fri, 26 Oct 2018 07:06:38 +0000 (00:06 -0700)]
Fix SP check for x64/x86, remove for arm32/arm64

The actual checking had gotten lost between JIT32 and RyuJIT.
I fixed the "on return from function" case for x86/x64, and
the "around every call site" case for x86.

I removed the arm64 case because it's not easy to store SP to a
stack local or directly compare SP against a stack local without
a temporary. Also, for the fixed outgoing arg space ABIs (all but x86),
these checks don't seem too useful anyway, so I also removed the
arm case.

5 years agoExclude FreeBSD symbol packages from symbol uploader (Part 3) (#20824)
Mike McLaughlin [Tue, 6 Nov 2018 00:43:03 +0000 (16:43 -0800)]
Exclude FreeBSD symbol packages from symbol uploader (Part 3) (#20824)

5 years agoAdd support for BSWAP intrinsic (#18398)
Levi Broderick [Tue, 6 Nov 2018 00:06:32 +0000 (16:06 -0800)]
Add support for BSWAP intrinsic (#18398)

With this change, the JIT will recognize a call to BinaryPrimitives.ReverseEndianness and will emit a bswap instruction.
This logic is currently only hooked up for x86 and x64; ARM still uses fallback logic.
If the JIT can't emit a bswap instruction (for example, trying to emit a 64-bit bswap in a 32-bit process), it will fall back to a software implementation, so the APIs will work across all architectures.

5 years agoAdding some new functions to System.Math and System.MathF (#20788)
Tanner Gooding [Mon, 5 Nov 2018 23:37:36 +0000 (15:37 -0800)]
Adding some new functions to System.Math and System.MathF (#20788)

* Adding BitIncrement, BitDecrement, CopySign, MaxMagnitude, and MinMagnitude to Math and MathF

* Adding FusedMultiplyAdd, IlogB, Log2, and ScaleB to Math and MathF

* Adding some basic PAL tests for fma, ilogb, log2, and scalbn

* Fixing a couple typos and adding clarifying comments

* Fixing the MSVC _VVV FCALL declarations

5 years agoUpdating the importer to throw a NotImplementedException if it finds a mustExpand...
Tanner Gooding [Mon, 5 Nov 2018 23:37:14 +0000 (15:37 -0800)]
Updating the importer to throw a NotImplementedException if it finds a mustExpand intrinsic that it can't expand (#20792)

* Updating the importer to throw a NotImplementedException if it finds a mustExpand hwintrinsic that it can't expand

* Updating the JITEEVersionIdentifier

5 years agoImprove/fix SerialStream.Dispose (dotnet/corefx#33221)
Krzysztof Wicher [Mon, 5 Nov 2018 18:48:53 +0000 (10:48 -0800)]
Improve/fix SerialStream.Dispose (dotnet/corefx#33221)

* Improve/fix SerialStream.Dispose

* Review feedback

* remove unused using statement

* Use ToFileDescriptor

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoMerge pull request #20736 from briansull/issue_18672
Brian Sullivan [Mon, 5 Nov 2018 23:13:05 +0000 (15:13 -0800)]
Merge pull request #20736 from briansull/issue_18672

Fix ValueNumber constant propagation with nested structs

5 years ago Fiber-friendly Vectored Exception Handling (#20746)
Tobias Loew [Mon, 5 Nov 2018 19:28:01 +0000 (20:28 +0100)]
 Fiber-friendly Vectored Exception Handling (#20746)

* Fiber-friendly Vectored Exception Handling

Check during exception handling if the cached and the current stack-base match to detect Fibers.

5 years agoFix constant propagation with nested structs
Brian Sullivan [Thu, 1 Nov 2018 00:11:38 +0000 (17:11 -0700)]
Fix constant propagation with nested structs
Fixes #18672
Test case is here: JIT/Regression/JitBlue/GitHub_18672/GitHub_18672.cs

5 years agoBump FreeBSD AzDO build timeout to 90 minutes
Matt Galbraith [Mon, 5 Nov 2018 18:03:38 +0000 (10:03 -0800)]
Bump FreeBSD AzDO build timeout to 90 minutes

5 years agoFix perf regression in master. (#20762)
Sergey Andreenko [Mon, 5 Nov 2018 17:03:43 +0000 (09:03 -0800)]
Fix perf regression in master. (#20762)

* Fix comments.

We count implict byref argument occurrences for all lclVars not only for promoted.

* Fix the regression.

Return the old behaiour where both parent and promoted lclVar have updated ref counters.

* rename `UpdateImplicitByRefCounter` to `UpdateEarlyRefCountForImplicitByRef`

* Fix comment.

5 years agoSystem.Decimal code style and comments clean-up (#20793)
Pent Ploompuu [Sun, 4 Nov 2018 20:42:11 +0000 (22:42 +0200)]
System.Decimal code style and comments clean-up (#20793)

5 years ago[Darc-Update] Update dependencies from build 20181102.21 of https://github.com/dotnet...
dotnet-maestro[bot] [Sun, 4 Nov 2018 15:49:22 +0000 (15:49 +0000)]
[Darc-Update] Update dependencies from build 20181102.21 of https://github.com/dotnet/arcade (#20783)

* Updating version files

* Updating version files

5 years agoOptimization: Reduce many array allocations in GetCustomAtttributes()'s inherited...
Nick Craver [Sun, 4 Nov 2018 07:11:47 +0000 (02:11 -0500)]
Optimization: Reduce many array allocations in GetCustomAtttributes()'s inherited path (#20779)

* Optimization: avoid 2 array allocations in inherited attribute misses

This is a follow-up to many allocations recognized in #20448.

A lot of methods ultimately call through CustomAttributes.GetCustomAttributes(). In the inherited search path (default for most searches above), the inheritance path of a class is traversed, resulting in an array allocation per crawled type, a copy to the overall List<object> and then after that - in current code - an array allocation from that list and a typed array allocation it's copied to.

However, in the common miss case as simple as:
typeof(T).GetCustomAttributes(typeof(TAttr), true);
...and many other overloads, all the same path underneath...

We can avoid the last 2 arrays in the miss case. We have the List<object> to go off of. If that's a zero-entry list, we can return an Array.Empty<TAttr>(). That's effectively what this change does.

While converting the entire attribute pipeline to generics is problematic and has issue since some object[] return abstracts aren't sealed, we can at least somewhat trivially cache an array per attribute type (only one static, ultimately from Array.Empty<T> underneath) and return that for the miss case.

There are far more wins to be had here, but they require more changes.

* Move RuntimeType empty array cache generation to Attribute.CreateAttributeArrayHelper

This exposes Attribute.CreateAttributeArrayHelper to internal and uses it directly on the RuntimeType caching for empty arrays. Though this allocated 1 additional array overall, it's simpler, faster to init, and still is an infinite win over the per-call allocations before this overall changesets.

* CustomAttributes: remove needless array copy in the inherited hit case

This removes a .ToArray() for the sake of Array.Copy() where a simple for loop suffices and removes the allocation. Reversing the "empty" result checks is also just a bit cleaner here.

This also expands the same fix to the MemberInfo path.

Note: should DRY these up too (longstanding issue) - but let's do that in a separate commit for clarity.

* GetCusomAttributes: use ListBuilder<object> for inheritance crawls

This exposes RuntimeType.ListBuilder<T> for internal usage and replaces the List<T> allocation in GetCustomAttributes() paths to reduce allocations and increase performance in the inherited crawl paths (which is the default for many optional-parameter methods in layers above).

Note: there is a subtle behavior depending on previous-null (not possible with a struct now) in AttributeUsageCheck() that I believe still behaves correctly, but could use another set of eyes and a full test suite run to confirm. object[] attributes was removed there simply because it wasn't used before - only cleaning up.

* Attribute caching: use Array.CreateInstance() directly on RuntimeType

This also reverts the CreateAttributeArrayHelper => internal change, since it's no longer needed.

* Ref passing for RuntimeType.ListBuilder<object> & CustomAttribute simplification

This fixes the struct passing duplication and tweaks how we're creating arrays a bit, centralizing the zero-element checks to cover all cases as well as simplify the per-method code to rely on the fact this is happening underneath.

5 years agoImprove error messages for byref-like type loading errors (#20789)
Jan Kotas [Sat, 3 Nov 2018 23:14:10 +0000 (16:14 -0700)]
Improve error messages for byref-like type loading errors (#20789)

Related to dotnet/corefx#33233

5 years agoMerge pull request #20780 from dotnet/dev/unix_test_workflow
Bruce Forstall [Sat, 3 Nov 2018 22:23:17 +0000 (15:23 -0700)]
Merge pull request #20780 from dotnet/dev/unix_test_workflow

PMI asm diffs changes