summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01Coreclr gnuport (#22129)Sinan Kaya15-44/+89
* Abstract away NOINLINE statement MSVC and GNU compilers use different attributes for noinline. Abstract away compiler differences. * Replace __sync_swap with __atomic_exchange_n __sync_swap doesn't exist on GNU. Replacing with __atomic_exchange_n which is universally available. * Define CDECL for GNUC __cdecl is not defined by default on GNU compilers. * Define gcc version of __declspec(thread) * Correct pointer casting A pointer value is usually unsigned long on most platforms. Casting it to integer causes signedness issues. Use size_t to be efficient on all 32 and 64 bit architectures. * Put quotes around the error string Correct error statement. GNU G++ is picky about the string following the error statement with ' character in it. It needs to be enclosed with double quotes. * Fix casting problem Seeing these warnings with GNU G++ compiler src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalInitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION, DWORD, bool)’: src/pal/src/sync/cs.cpp:630:48: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null] pPalCriticalSection->OwningThread = NULL; ^ src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*)’: src/pal/src/sync/cs.cpp:880:43: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null] pPalCriticalSection->OwningThread = NULL; ^ * Abstract optnone compiler attribute GNU compiler doesn't support optnone attribute. pal/src/exception/seh-unwind.cpp:449:77: warning: ‘optnone’ attribute directive ignored [-Wattributes] * Set the aligned attribute for GNU compiler * Make __rotl and __rotr functions portable GNU compiler doesn't have an intrinsic for these. Open code them using the provided implementation. * Define deprecated attribute for gcc * Add throw specifier for GCC /usr/include/string.h:43:28: error: declaration of ‘void* memcpy(void*, const void*, size_t) throw ()’ has a different exception specifier size_t __n) __THROW __nonnull ((1, 2));
2019-01-31Fixing a GC hole in Number.BigInteger (#22334)Tanner Gooding1-2/+5
2019-01-31Add -skipcrossarchnative option to build.cmd (#22091)Bruce Forstall2-9/+23
* Add -skipcrossarchnative option to build.cmd This allows you to skip building the cross-architecture native components. * Add -skipcrossarchnative to build.sh
2019-01-31Replace several Nullable<T>.Value with .GetValueOrDefault() (#22297)Stephen Toub5-12/+12
The former does extra work that the latter doesn't do, and they're equivalent when we know it contains a value, such as immediately after a HasValue check.
2019-01-31AsyncSteppingFix - Eagerly initialize the AsyncStateMachineBox to avoid ↵Andrew Au3-9/+38
expression evaluation in ProjectN async stepping. [tfs-changeset: 1732745] Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-31Increase arm64 timeout. (#22298)Sergey Andreenko1-0/+6
* increase arm64 debug/checked timeout. * Increase timeout only for corefx jobs.
2019-01-31[Arm64/arm32] GCStress failure in ↵José Rivero1-0/+1
tracing/eventsourcetrace/eventsourcetrace/eventsourcetrace.sh (#22328) Marking this test `GCStressIncompatible` = True for now.
2019-01-31Re-point Jenkins to new Ubuntu ARM64 queueRuss Keldorph1-2/+2
Move Jenkins off the Ubuntu.1604.Arm64.Open queue so it can be repurposed for Azure DevOps. This "Iron" queue should only be used by Jenkins.
2019-02-01Support for dumping GC info in R2RDump (#22216)Tomáš Rylek1-1/+44
Thanks to tons of help from Jan Vorlicek I found out that a huge failure bucket in the CoreCLR Pri#1 tests is caused by incorrect GC info for generic methods causing failures in catch clauses where the exception type is a generic referring to a generic parameter of the method. As part of investigation of this issue I'm adding provisions for dumping the GC info alongside methods to make the differences between CPAOT and Crossgen easier to analyze. For now I have only implemented the AMD64 variant of the GC info. Thankfully it turns out that the same GC info is used by both ARM32 and ARM64 so that the only remaining debt is supplying a variant of the new code for X86. Thanks Tomas
2019-01-31Update python lookup in CMakeLists.txt to match build.(sh|cmd) (#22145)Omair Majid1-1/+1
Use the same logic that's used in build.sh/build.cmd to lookup python: first search for `python3`, then fall back to `python2` and finally to `python`.
2019-01-31Fix ProjectN build breaks (dotnet/corert#6924)Michal Strehovský1-0/+1
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-31Fix for missing GC ref map record on ARM64 for the X8 register (#22309)Tomáš Rylek3-4/+14
GC stress testing revealed a deficiency in GC ref map on ARM64 - we weren't emitting the entry corresponding to the X8 return buffer address because a recent refactoring changed its location in the transition block. This change generalizes transition block by exposing a new function GetOffsetOfFirstGCRefMapSlot() that returns the same value as GetOffsetOfArgumentRegisters() except on ARM64 where it returns the offset of the X8 register in the transition block (above the callee-saved registers and 8-byte padding i.e. at position 13 corresponding to offset 0x68, or GetOffsetOfArgumentRegisters() - 8). Thanks Tomas
2019-01-31Add design document for unloadability (#22166)Jan Vorlicek2-0/+423
* Add design document for the unloadability
2019-01-31Replace Environment.s_macOS with use of PLATFORM_OSXStephen Toub1-17/+18
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-31Adapt corert to Environment moving from corefxStephen Toub1-2/+10
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-31Stop collecting source line information during a stacktrace for the E… ↵Aaron Robinson1-1/+1
(#22305) * Stop collecting source line information during a stacktrace for the Exception.Source property. * Code review feedback
2019-01-30Add managed implementation of GetSystemMaxDBCSCharSize (#22290)Marek Safar7-21/+14
2019-01-30Add timeoutPerTestCollection and use this to control Helix workitem timeout ↵Egor Chesakov4-16/+32
(#22312)
2019-01-30Update CoreFx, IbcData, PgoData to preview.19080.2, master-20190130.3, ↵dotnet-maestro-bot1-7/+7
master-20190130.3, respectively (#22310)
2019-01-30Remove run.exe and config.json (#21608)Sven Boemer20-979/+507
This moves us one step away from buildtools and towards arcade. This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd". - I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs. - I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet. All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change. Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point). Some subtle parts of the change: * Add msbuild.cmd This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild. * Fix BuildOS processing in package build and publish Previously, config.json had its own processing that would set OSName. Instead, we now pass it in explicitly where it's needed (building packages), or not at all (publishing them). * Handle "=" in publish-packages.cmd and other scripts This seems necessary to properly handle the azure access token * Set __BuildOS in PublishPackages Required for cases where the build OS isn't detected during the build such as freebsd. * Use dotnet msbuild in runtest.py This prevents us from having to deal with different quote escape behavior on windows and linux. Previously, arguments like fileloggerparameters and the logger were given quotes to escape semicolons in the argument. On unix, this prevented the argument from being split up by bash. On windows, it seems that the run.cmd/run.exe tools would prevent the extra quotes from being passed to msbuild.exe (desktop msbuild would choke on the quotes if they were passed along). Unlike desktop msbuild, dotnet msbuild is able to parse the quoted strings, so we simply psas the quoted arguments directly to it on windows. We may be able to do the same on unix. * Fix build-test.sh problem with BuildOS When copying native files during the unix test build, we rely on __BuildOS being set. Fixing the import order and always setting __BuildOS fixes this. We should eventually fix the inconsistent use of BuildOS vs __BuildOS.
2019-01-30Reverting "Fixing up the UTF8Formatter and some tests to properly handle ↵Tanner Gooding1-0/+6
-0.0" (#22300)
2019-01-30Disable outdated test until it is updatedRuss Keldorph1-0/+4
2019-01-30Update CoreFx, PgoData to preview.19080.1, master-20190130.1, respectivelydotnet-maestro-bot1-5/+5
2019-01-30Disable tests consistently failing in AzDO CI (#22304)Egor Chesakov1-0/+9
* JIT\jit64\opt\cse\hugeexpr1 on Linux/arm Related issue: https://github.com/dotnet/coreclr/issues/22260 * baseservices\threading\interlocked\compareexchange\CompareExchangeTClass * baseservices\threading\interlocked\compareexchange\CompareExchangeTClass_1 Related issue: https://github.com/dotnet/coreclr/issues/22303
2019-01-30Remove GTF_ADDR_ONSTACK and IsVarAddr.Eugene Rozenfeld8-61/+22
IsVarAddr was checking GTF_ADDR_ONSTACK to determine if the GT_ADDR node is an address of a local. This change removes both GTF_ADDR_ONSTACK and IsVarAddr and uses IsLocalAdrExpr instead. IsLocalAddrExpr uses opcodes to determine if GT_ADDR node is a local address. GTF_ADDR_ONSTACK flag is ancient, added before 2002 so I couldn't find the checkin that introduced it. I changed the assert to a check and an assignment since simplifications inside fgMorphArgs between https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3709 (which causes https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3057) and https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3790 may result in more GT_ADDR nodes recognized by IsLocalAdrExpr. x86 and x64 pmi frameworks had no code diffs and some gcinfo reductions (15 methods with gcinfo diffs in x86). Fixes #22190.
2019-01-30Switch CoreLib over to using shared Environment from corefx (#22106)Stephen Toub18-910/+692
This requires merging/adapting the implementation with EnvironmentAugments (which goes away completely), the shared files, what corert has, etc.
2019-01-30Fix CorError header file generation (#22294)Michal Strehovský2-20/+15
The checked in batch script was only usable if you have a Razzle environment and even then it didn't update the right files.
2019-01-30fixed pdf link in dotnet-standards.md (#22292)Meir Blachman1-1/+1
2019-01-30Fix namespace of the AmbiguousImplementationException (#22291)Michal Strehovský1-2/+2
Moving to the namespace that was approved in dotnet/corefx#34124.
2019-01-29Recover some of the size lost with AsyncMethodBuilder/Task unification (#6913)Michal Strehovský3-9/+18
When we unified the implementations of these across all of our runtimes, we lost all size optimizations people have been doing on the Project N side over the past six years. This restores a bit of the loss. For one sample app with lots of async usage, this removes 2.1 MB of generic instantiations. There is more we can do, but I can't spend time on that right now. These two things jumped out on me when I was looking at it back in December and were an easy fix I wanted to do for a while. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-29Add AmbiguousImplementationException (#22280)Markus Kitsinger3-0/+37
2019-01-29Do not cache error string in SerializationException (#22281)Markus Kitsinger1-3/+1
2019-01-29RunCrossGen in ReadyToRun tests, set TimeoutPerTest, set ↵Egor Chesakov5-22/+68
FailOnWorkItemFailure (#22261) * For ReadyToRun tests in AzDO set RunCrossGen=true during Helix test running * Set __TestTimeout and introduce TimeoutPerTestInMinutes for test jobs * Set FailOnWorkItemFailure - fail the AzDO step on Helix work item "catastrophic failure"
2019-01-29Move Marshal::StringTo* methods to shared partition (#22266)Marek Safar2-145/+128
2019-01-29Fixing several of the HWIntrinsic SoftwareFallback functions to be ↵Tanner Gooding2-18/+18
captureless (#22263)
2019-01-29To support container scenario, 2 HardLimit configs are added - (#22180)Maoni Stephens15-274/+887
GCHeapHardLimit - specifies a hard limit for the GC heap GCHeapHardLimitPercent - specifies a percentage of the physical memory this process is allowed to use If both are specified, GCHeapHardLimit is checked first and only when it's not specified would we check GCHeapHardLimitPercent. If neither is specified but the process is running inside a container with a memory limit specified, we will take this as the hard limit: max (20mb, 75% of the memory limit on the container) If one of the HardLimit configs is specified, and the process is running inside a container with a memory limit, the GC heap usage will not exceed the HardLimit but the total memory is still the memory limit on the container so when we calculate the memory load it's based off the container memory limit. An example, process is running inside a container with 200mb limit user also specified GCHeapHardLimit as 100mb. if 50mb out of the 100mb is used for GC, and 100mb is used for other things, the memory load is (50 + 100)/200 = 75%. Some notes on these configs - + The limit is the commit size. + This is only supported on 64-bit. + For Server GC the minimum *reserved* segment size is 16mb per heap, this is to avoid the scenario where the hard limit is small but the process can use many procs and we end up with tiny segments which doesn't make sense. We then keep track of the committed on the segments so the total does not exceed the hard limit.
2019-01-28Add Marshal ansi conversion to shared partition (#22243)Marek Safar6-44/+59
* Add Marshal ansi conversion to shared partition * Ignore bestFit/throwOnUnmappableChar on Unix * Use same assert in StringToAnsiString * wideCharLen parameter rename
2019-01-28Fix various fgMorphInitBlock issues (#21820)mikedn6-182/+579
* Fix various fgMorphInitBlock issues * Remove unnecessary destAddr variable * Extend/fix comment headers
2019-01-28Fix finding entry point unwind record for a method with fragmented un… ↵Andy Ayers1-21/+40
(#22202) On Arm and Arm64 unwind records can only cover a limited range of code (512K and 1MB respectively). So for methods larger than this the jit will emit multiple "fragment" unwind records to cover the full method code range. Only the first of these describes the behavior of the method prolog. When mapping an offset back to a method's entry point unwind, make sure to find this "root" unwind record instead of one of the internal fragments. Fixes #19209.
2019-01-28Update PgoData to master-20190128.1 (#22237)dotnet-maestro-bot1-2/+2
2019-01-27string.EndsWith use SequenceEqual not SequenceCompareTo (#22207)Ben Adams1-1/+2
2019-01-27Improve BinaryReader.ReadUInt32() perf by 30% when using MemoryStream (#22102)TW3-103/+79
BinaryReader.ReadInt32() has nice optimization which was missing from the ReadUInt32() version. Now both implementations are aligned. ReadUInt32 and all the 64 bits types are now 30% to 50% faster than original implementation.
2019-01-27Keep CoreCLR-specific temporary hack under ifdefJan Kotas1-2/+6
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-27Shrink Task.Delay when used without cancellation (#22233)Ben Adams1-52/+58
2019-01-27Remove several uses of VoidTaskResult (#22238)Stephen Toub8-232/+168
* Remove defunct netstandard code from ValueTask * Remove several uses of VoidTaskResult Currently TrySetResult/Canceled/Exception live on `Task<T>`. There's no reason `TrySetCanceled` and `TrySetException` need to live there, as they only access state from the base `Task`, and so can be moved down. `TrySetResult` needs the `TResult`, however in a variety of cases `Task<T>` is used with a `VoidTaskResult`, and for such cases we can just have a parameterless `TrySetResult()` on the base class as well, which can be used any time there is no `TResult` or when `default(TResult)` is the desired result. This lets us switch several cases where we were using `Task<VoidTaskResult>` to just be `Task`, which saves 8 bytes on the task instance on 64-bit. It also avoids an Interlocked.Exchange as part of the TrySetResult call. This primarily affects Task.Delay and the non-generic variants of Task.WhenAll, ValueTask.AsTask(), Task.FromCanceled, and Task.FromException.
2019-01-27Move Timer to shared CoreLib partition. (#22231)Filip Navara5-266/+283
* Move Timer to shared CoreLib partition. * Move SignalNoCallbacksRunning back to shared code, add static EventWaitHandle.Set. * Remove AppDomain references from shared Timer code, reshuffle some code out of SetTimer in non-shared code. * Change m_ prefix to match code style.
2019-01-26Update PgoData to master-20190126.1 (#22198)dotnet-maestro-bot1-2/+2
2019-01-26Make ResourceManager use Assembly instead of RuntimeAssembly internally. ↵Filip Navara4-53/+57
(#21979)
2019-01-26Move Marshal::ZeroFree* to shared partition (#22230)Marek Safar5-66/+63
* Move Marshal::ZeroFree* to shared partition * Add managed version of SysStringByteLen
2019-01-26Cleanup stackoverflow handling leftovers (#22228)Jan Kotas19-297/+10