Geunsik Lim [Tue, 26 Jul 2016 03:59:47 +0000 (12:59 +0900)]
Linux/ARM: Fix +3000 bus errors of unit-test in case of O2/O3 levels (dotnet/coreclr#6379)
**PROBLEM**
This patch is to resolve +3000 bus errors that are generated whenever we use
the aggressive optimization levels of clang (issue dotnet/coreclr#5844 ).
When we enable the -O3 optimization level of the clang version(from clang 3.5
to clang 3.9(snapshot)), we have always got the lots of bus errors from the
coreCLR's unit tests. Actually, we can easily monitor SIGBUS signals (e.g.,
"misaligned memory access") with /proc/cpu/alignment facility in kernel space.
Using "echo 2 > /proc/cpu/alignment" makes Linux kernel fixes the problems
but the performance of the application will be degraded.
.source: http://lxr.free-electrons.com/source/Documentation/arm/mem_alignment
**VERSION 4**
. Use 'GET_UNALIGNED_VALXXX' macros in the CoreClr infra-structure without
any need for ifdefs.
**VERSION 3**
.Apply this PR on only Linux/ARM for different system environment (Windows).
Here is .NET CI Report on Windows: Compile Error
error C2146: syntax error: missing ';' before identifier '__unaligned_int32'
(compiling source file D:\j\workspace\checked_windo---
f6dc6fe4\src\jit\alloc.cpp)
[D:\j\workspace\checked_windo---
f6dc6fe4\bin\obj\Windows_NT.x64.Checked\src\jit\
crossgen\clrjit_crossgen.vcxproj] Indication 1
**VERSION 2**
.Add UNALIGNED_ARM macro for handling ARM core specific optimization levels.
.Add RISC-based ARM core handling into the existing infra-structure of the
platform adaptation layer (PAL) for aggressive optimization cases on Linux/ARM.
**VERSION 1**
Basically, RISC-based ARM architecture requires aligned access with 4byte reads.
In order to support aggressive optimization levels such as O2/O3, let's use
attribute keyword of aligned(1) instead of using memcpy(2) in into
a properly aligned buffer or the packing attribute.
**BACKGROUND**
According to ARM information center(infocenter.arm.com), By default,
the ARM compiler expects normal C and C++ pointers to point
to an aligned word in memory. A type qualifier __packed is provided to
enable unaligned pointer access. If you want to define a pointer to a word
that can be at any address (that is, that can be at a non-natural alignment),
you must specify this using the __packed qualifier when defining the pointer:
__packed int *pi; // pointer to unaligned int
However, clang/llvm does not support the __packed qualifier such as
__attribute__((packed)) or __attribute__((packed, aligned(4)))
In -O0 (debug build) the innermost block is emitted as the following assembly,
which works properly:
ldr r1, [r0, dotnet/coreclr#24]
ldr r2, [r0, dotnet/coreclr#20]
In -O3 (release build) however the compiler realizes these fields are adjacent
and generates this assembly:
ldrdeq r2, r3, [r0, dotnet/coreclr#20]
Unfortunately, vldr/ldrdb instructions always generate an alignment fault
(in practice). It seems that clang uses ldrb instruction although GCC uses
ldr instruction because armv7 supports unaligned ldr instruction.
Note: If some arm architectures (e.g., Linux/ARM Emulator) does not support
unaligned ldr, this issue is not generated with aggressive optimization
levels (e.g., -O2 and -O3).
* Case study: How does the ARM Compiler support unaligned accesses?
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html
* Case study: Indicating unaligned access to Clang for ARM compatibility
http://stackoverflow.com/questions/9185811/indicating-unaligned-access-to-clang-for-arm-compatibility
* Case study: Chromium source for UnalignedLoad32() on ARM
https://github.com/nwjs/chromium.src/blob/nw15/third_party/cld/base/basictypes.h#L302
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
561b64d2c210b4d999de7f1ac55756704eaba784
Rama krishnan Raghupathy [Tue, 26 Jul 2016 03:36:53 +0000 (20:36 -0700)]
Merge pull request dotnet/coreclr#6328 from ramarag/arm64debugger
Implementing Arm64 Debugger Requirements
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e3c1a63e683b9c825c218efc6d75bf5e430f474
Rama Krishnan Raghupathy [Tue, 19 Jul 2016 02:40:05 +0000 (19:40 -0700)]
Arm64: Debugger
Instruction emulation for Break Points
Debugger::FuncEvalSetup
NativeWalker
ExceptionHijack
Exception intercept
Managed Return Value
Commit migrated from https://github.com/dotnet/coreclr/commit/
00e3695c1b51248f58f6b7e1f24f83a791a3b79e
Vance Morrison [Mon, 25 Jul 2016 22:06:45 +0000 (15:06 -0700)]
Merge pull request dotnet/coreclr#6156 from justinvp/activitytracker_tostring
Avoid string concat array allocation in ActivityTracker
Commit migrated from https://github.com/dotnet/coreclr/commit/
c358f77a1ddcf31475450c40af64ad115259e622
Vance Morrison [Mon, 25 Jul 2016 22:00:29 +0000 (15:00 -0700)]
Merge pull request dotnet/coreclr#6158 from justinvp/tracing_stringcomparison
Specify StringComparison.Ordinal in System.Diagnostics.Tracing
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a0bdd52dbe627486c586ad3f1d2ddb0e3ea7bc7
Stephen Toub [Mon, 25 Jul 2016 19:49:17 +0000 (15:49 -0400)]
Merge pull request dotnet/coreclr#6461 from stephentoub/update_buildtools
Update BuildTools to 1.0.26-prerelease-00625-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
43a8caf9ce4b8a7c3516122eebfd0dcc2cb9ca2f
Stephen Toub [Mon, 25 Jul 2016 16:16:01 +0000 (12:16 -0400)]
Update BuildTools to 1.0.26-prerelease-00625-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5772785e2afade5fd9840dddb6d539ff7994902
Gaurav Khanna [Mon, 25 Jul 2016 13:23:59 +0000 (06:23 -0700)]
Merge pull request dotnet/coreclr#6456 from dotnet-bot/UpdateDependencies20160725083514
Updating CoreClr dependencies to beta-24325-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fd8cd393aabce43eefa20e6e965f0c10d65e7de
Gaurav Khanna [Mon, 25 Jul 2016 13:23:29 +0000 (06:23 -0700)]
Merge pull request dotnet/coreclr#6453 from dotnet-bot/UpdateDependencies20160725061810
Updating External dependencies to beta-24325-00
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf609c3344c2d78ad23aa35b3072af5f69d9b16e
Shahid Khan [Mon, 25 Jul 2016 13:07:15 +0000 (18:07 +0500)]
[Documentation] Projects Use licences (dotnet/coreclr#6442)
address feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab744a4d2fe958935f0cba35709c3463bd93e4d3
dotnet-bot [Mon, 25 Jul 2016 08:35:13 +0000 (08:35 +0000)]
Updating CoreClr dependencies to beta-24325-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
12d6d3ac8dc7f850f413bf3d91831adc62664682
dotnet-bot [Mon, 25 Jul 2016 06:18:10 +0000 (06:18 +0000)]
Updating External dependencies to beta-24325-00
Commit migrated from https://github.com/dotnet/coreclr/commit/
77e6a204003a440a5bd22d59e06fecf91bd42187
Gaurav Khanna [Mon, 25 Jul 2016 04:19:33 +0000 (21:19 -0700)]
Merge pull request dotnet/coreclr#6449 from dotnet-bot/UpdateDependencies20160725123214
Updating CoreClr dependencies to beta-24325-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
70503892983b710f266122dd255d2b4e177eb79c
Bruce Forstall [Mon, 25 Jul 2016 04:13:19 +0000 (21:13 -0700)]
Merge pull request dotnet/coreclr#6342 from BruceForstall/tailcall
RyuJIT/x86: implement tailcall via helper
Commit migrated from https://github.com/dotnet/coreclr/commit/
8604efafe86be6720e95cef71ad58d127130aab5
dotnet-bot [Mon, 25 Jul 2016 00:32:14 +0000 (00:32 +0000)]
Updating CoreClr dependencies to beta-24325-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
463f10f0b3903251ce5590742003c98e2295ebb9
Gaurav Khanna [Sun, 24 Jul 2016 21:39:06 +0000 (14:39 -0700)]
Merge pull request dotnet/coreclr#6445 from dotnet-bot/UpdateDependencies20160724042519
Updating CoreClr dependencies to beta-24324-03
Commit migrated from https://github.com/dotnet/coreclr/commit/
1bb9e2df37f888ca9963dbecd0c44188a7a4a355
dotnet-bot [Sun, 24 Jul 2016 16:25:19 +0000 (16:25 +0000)]
Updating CoreClr dependencies to beta-24324-03
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f5d1f8191948fd89b68310045850852bf89b6e7
Gaurav Khanna [Sun, 24 Jul 2016 13:49:17 +0000 (06:49 -0700)]
Merge pull request dotnet/coreclr#6443 from dotnet-bot/UpdateDependencies20160724082829
Updating CoreClr dependencies to beta-24324-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
e2a877e8ac91a605464525ac13777bebdddb321c
Oleg Demchenko [Sun, 24 Jul 2016 12:08:51 +0000 (09:08 -0300)]
Fix up for grabs issues link in contributing workflow doc (dotnet/coreclr#6437)
Current link to up for grabs issues for CoreCLR repository leads
to the empty list because there's not such label as "up for grabs"
(existing label name is "up-for-grabs"). Ideally both CoreCLR
and CoreFX repos should use exactly the same label for public
issues to avoid possible mistakes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf9d60eab4a51d2d0862df406f46afc4878b8512
dotnet-bot [Sun, 24 Jul 2016 08:28:29 +0000 (08:28 +0000)]
Updating CoreClr dependencies to beta-24324-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
60efc635e01709a759dc14676eb94f0181675732
Bruce Forstall [Thu, 14 Jul 2016 15:06:25 +0000 (08:06 -0700)]
RyuJIT/x86: implement tailcall via helper
Fixes dotnet/coreclr#4185
Also: (1) added a class to simplify non-standard arg handling in fgMorphArgs(),
(2) fixed minor tree output alignment bug.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe4ac43dfd4a22141abde24503929f1fa5f8f4d6
Stephen Toub [Sat, 23 Jul 2016 20:49:42 +0000 (13:49 -0700)]
Merge pull request dotnet/coreclr#6425 from weshaggard/UpdateMscorlibFacadeToUseRewrittenCoreLib
Update mscorlib facade to use the rewritten S.P.CoreLib
Commit migrated from https://github.com/dotnet/coreclr/commit/
c88953305ac38d82f36358a58caa6f2652a42669
Martin Woodward [Sat, 23 Jul 2016 16:39:34 +0000 (09:39 -0700)]
Fix dotnet/coreclr#6125 (dotnet/coreclr#6432)
Add reference for Bit Twiddling Hacks
Commit migrated from https://github.com/dotnet/coreclr/commit/
59f169e508fe9520ede1a89da5e3a81ecc0e440a
Jan Kotas [Sat, 23 Jul 2016 14:23:21 +0000 (07:23 -0700)]
GC update from CoreRT (dotnet/coreclr#6429)
https://github.com/dotnet/corert/tree/master/src/Native/gc dotnet/coreclr@
91d7a9c8e2b393314422b6106adedec683c0ae51
Commit migrated from https://github.com/dotnet/coreclr/commit/
087e750df2a13801d0f144cdcfa6c1c3e16067c2
Jan Kotas [Sat, 23 Jul 2016 14:13:22 +0000 (07:13 -0700)]
Add link to https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord (dotnet/coreclr#6430)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac01e272bbbf6ce03f69843326d7fdfc74df245a
Gaurav Khanna [Sat, 23 Jul 2016 13:17:11 +0000 (06:17 -0700)]
Merge pull request dotnet/coreclr#6428 from dotnet-bot/UpdateDependencies20160723082720
Updating CoreClr dependencies to beta-24323-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff899f8cb3a32b33d14d7527d7f972b9458eaed4
vinnyrom [Sat, 23 Jul 2016 11:46:50 +0000 (04:46 -0700)]
The call to printf expects a string argument, but the actual argument was of class type 'PathString'. (dotnet/coreclr#6422)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d74076128f25499d132732075d53c02994a5406
dotnet-bot [Sat, 23 Jul 2016 08:27:20 +0000 (08:27 +0000)]
Updating CoreClr dependencies to beta-24323-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
21270389079ae0288c26ed4d8090973c4a71565e
Wes Haggard [Sat, 23 Jul 2016 05:38:43 +0000 (22:38 -0700)]
Update mscorlib facade to use the rewritten S.P.CoreLib
Indirectly we were building the mscorlib facade against the
pre-rewritten S.P.CoreLib which had more types in it that weren't
present after we rewrote the assembly. This change forces the
TargetPath to be the final output for S.P.CoreLib so the ProjectReference
pulls in the correct assembly and will give errors if there are
missing types when generating the facade.
ICloneable and and ResolveEventHandler were missing so including
those in the model.xml file.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6494de96ed4683fbe0fd5aa146c3bb8fdd69a97
Stephen Toub [Sat, 23 Jul 2016 02:20:07 +0000 (19:20 -0700)]
Merge pull request dotnet/coreclr#6415 from joperezr/ExposeISerializableDatetime
Exposing ISerializable implementation in System.DateTime
Commit migrated from https://github.com/dotnet/coreclr/commit/
61cb42ceb8f6f542606c7863c7e26edea7b9653c
Gaurav Khanna [Sat, 23 Jul 2016 01:23:34 +0000 (18:23 -0700)]
Merge pull request dotnet/coreclr#6414 from dotnet-bot/UpdateDependencies20160722044814
Updating CoreClr dependencies to beta-24322-04
Commit migrated from https://github.com/dotnet/coreclr/commit/
064a9b9f411b54eec2ca6de32a356d7188d839e1
Swaroop Sridhar [Fri, 22 Jul 2016 23:09:56 +0000 (16:09 -0700)]
Merge pull request dotnet/coreclr#6417 from swaroop-sridhar/contract
GetGcInfo(): Add a missing contract declaration
Commit migrated from https://github.com/dotnet/coreclr/commit/
252776751c689cd254ea354060852412f4f3c431
Swaroop Sridhar [Fri, 22 Jul 2016 20:34:08 +0000 (13:34 -0700)]
GetGcInfo(): Add a missing contract declaration
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b47c7711b4ab3a1bc78aeec5362c6885293f5fc
dotnet-bot [Fri, 22 Jul 2016 16:48:14 +0000 (16:48 +0000)]
Updating CoreClr dependencies to beta-24322-04
Commit migrated from https://github.com/dotnet/coreclr/commit/
dccaa1382d5772ca837de28488ff703d95a9c982
Jose Perez Rodriguez [Fri, 22 Jul 2016 16:48:10 +0000 (09:48 -0700)]
Exposing ISerializable implementation in System.DateTime
Commit migrated from https://github.com/dotnet/coreclr/commit/
999353cab70d14719800326866dd812c89a96b83
Sujin Kim [Fri, 22 Jul 2016 10:04:55 +0000 (19:04 +0900)]
ARM-CI : Check a device is already mounted while mounting a device. (dotnet/coreclr#6377)
Now ARM-CI makes building failure frequently with below messages.(dotnet/coreclr#6329)
http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm_emulator_cross_debug_ubuntu_prtest/559/console
00:01:27.252 + sudo umount /opt/linux-arm-emulator-root/dev
00:01:27.260 umount: /opt/linux-arm-emulator-root/dev: device is busy.
00:01:27.260 (In some cases useful info about processes that use
00:01:27.260 the device is found by lsof(8) or fuser(1))
00:01:27.265 Build step 'Execute shell' marked build as failure
I think ARM CI jobs have tried to unmount the same rootfs by an 'arm32_ci_script.sh' at the same time. (At this time, other jobs still are on running...)
So I suggest though the script is exited by any cases, the script would not run un-mounting.
But whenever CI is running and mounting a device, It will check the device is already mounted.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3f5a70b404386c538053cb0fe1746338ac4d342
Stephen Toub [Fri, 22 Jul 2016 00:46:36 +0000 (17:46 -0700)]
Merge pull request dotnet/coreclr#6399 from stephentoub/fix_typos
Fix build break when FEATURE_SERIALIZATION defined
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f74aff5752c03aab5f03c1b529f6faf6648cb90
Stephen Toub [Fri, 22 Jul 2016 00:25:08 +0000 (17:25 -0700)]
Fix build break when FEATURE_SERIALIZATION defined
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ffcfee178dfef1cf60c66a98cdc8fec208cbdc2
Egor Chesakov [Thu, 21 Jul 2016 23:51:50 +0000 (16:51 -0700)]
Merge pull request dotnet/coreclr#6367 from echesakov/StackAllocation
Fix bug: inlinee did not copy inlinee bbFlags to caller bbFlags.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe3aaa3cc2d300858ae308d4a8ed95ae4b855b72
Aditya Mandaleeka [Thu, 21 Jul 2016 23:24:32 +0000 (16:24 -0700)]
Merge pull request dotnet/coreclr#6395 from adityamandaleeka/fix_shell_scripts
Fix lexicographical compares of numeric values in a couple of scripts.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f4d4f2e8a1eaf5ec570604871cc910264203852
Sejong Oh [Thu, 21 Jul 2016 22:22:06 +0000 (15:22 -0700)]
Merge pull request dotnet/coreclr#6300 from sejongoh/decompose_gt_ind
Decompose GT_IND for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6f387b180f0dea552911197dcb07962e9775d26
Aditya Mandaleeka [Thu, 21 Jul 2016 21:12:14 +0000 (14:12 -0700)]
Merge pull request dotnet/coreclr#6396 from adityamandaleeka/runtest_help_fix
Fix minor error in runtest help
Commit migrated from https://github.com/dotnet/coreclr/commit/
de1a689ad75076bbd63df8530f844822c04ae72c
Aditya Mandaleeka [Thu, 21 Jul 2016 21:04:31 +0000 (14:04 -0700)]
Fix minor error in runtest help.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7409310e31cb76da8e12f7b1a475655e4239a29
Aditya Mandaleeka [Thu, 21 Jul 2016 20:55:29 +0000 (13:55 -0700)]
Fix lexicographical compares of numeric values.
Commit migrated from https://github.com/dotnet/coreclr/commit/
63dd009d459054acd972acdc70c1e3bfbe5c9a0f
Evgeny Pavlov [Thu, 21 Jul 2016 18:18:46 +0000 (22:18 +0400)]
Change verbatim ELF.h and Dwarf.h LLVM headers to be able to build in CoreCLR + add license header (dotnet/coreclr#6389)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ece6cb3aba99ce30cbadb1fe4092959371401f29
Kyungwoo Lee [Thu, 21 Jul 2016 17:17:18 +0000 (10:17 -0700)]
Merge pull request dotnet/coreclr#6277 from kyulee1/frageh
ARM64: Enable Function Fragment
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d2a0d298a1f771c34a97201db763e86fbcacd59
Stephen Toub [Thu, 21 Jul 2016 17:02:40 +0000 (10:02 -0700)]
Merge pull request dotnet/coreclr#6375 from stephentoub/serialization_modelxml
Expose serialization primitives from System.Private.Corelib
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a1fd93039cf1b7281412f5b901c5e8528c53fb1
Evgeny Pavlov [Thu, 21 Jul 2016 16:52:10 +0000 (20:52 +0400)]
[SOS][Linux] Fix incorrect processing 'setclrpath' command with portable PDB reader (dotnet/coreclr#6358)
* Fix incorrect processing 'setclrpath' command in lldb libsosplugin.so with portable PDB reader
* Replace 'fprintf' and 'perror' to 'ExtErr'
Commit migrated from https://github.com/dotnet/coreclr/commit/
da5b94ed35602c43c505381bfe62b894895a9736
Jan Vorlicek [Thu, 21 Jul 2016 16:42:40 +0000 (18:42 +0200)]
Refactor GC background thread creation (dotnet/coreclr#6384)
This change modifies the GCToEEInterface::CreateBackgroundThread so that it returns
a fully initialized and running thread.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b5550f9892bce0e17cc50f26e655f2215ce3c9e
Evgeny Pavlov [Thu, 21 Jul 2016 16:41:54 +0000 (20:41 +0400)]
Add ELF.h and Dwarf.h from LLVM for gdbjit feature implementation. (dotnet/coreclr#6383)
Files were copied from http://llvm.org/git/llvm.git repo, commit: dotnet/coreclr@
8b47c17a53d683f313eaaa93c4a53de26d8fcba5
Commit migrated from https://github.com/dotnet/coreclr/commit/
bfe11c1f9326134daf9dd6f471b1d0b947437cf0
Stephen Toub [Thu, 21 Jul 2016 15:29:59 +0000 (08:29 -0700)]
ifdef out CodeAccessPermission demand used in SerializationInfo on CoreCLR
It brings in an FCall not available on coreclr.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e95a6e82f410a74c702c8a338b99aeac3542dbdf
Kyungwoo Lee [Thu, 21 Jul 2016 15:06:17 +0000 (08:06 -0700)]
Merge pull request dotnet/coreclr#6385 from kyulee1/reemail
ARM64: Reenable email notification
Commit migrated from https://github.com/dotnet/coreclr/commit/
952151c221980e7722c6fcdc3d1ba1efafc63ceb
Kyungwoo Lee [Thu, 21 Jul 2016 15:05:28 +0000 (08:05 -0700)]
ARM64: Reenable email notification
Commit migrated from https://github.com/dotnet/coreclr/commit/
ecb2d02aaefec3e126981faa28e52c4f02b5f057
Stephen Toub [Thu, 21 Jul 2016 04:46:55 +0000 (21:46 -0700)]
Expose serialization primitives from System.Private.Corelib
- Update the model.xml file to expose the serialization primitives from the runtime, e.g. [Serializable], [NonSerialized], ISerializable, etc.
- Tweak how FEATURE_SERIALIZATION is used on some types. ISerializable and IDeserializationCallback are not ifdef'd based on FEATURE_SERIALIZATION, but their members are, which means there are some types which are implementing the interface but have the implementation of the interface's method ifdef'd. This commit removes the ifdef'ing of the methods on the interface, and then ifdef's the implementation of the interface on the offending types.
Commit migrated from https://github.com/dotnet/coreclr/commit/
292d4eaeb0656119acfe5bc654176792b35b5190
Michelle McDaniel [Thu, 21 Jul 2016 13:41:33 +0000 (06:41 -0700)]
Merge pull request dotnet/coreclr#6219 from adiaaida/compareLongs
Fix silent bad codegen in signed comparison
Commit migrated from https://github.com/dotnet/coreclr/commit/
92eeb0ef418b5c2aa08350a73b813c515c993ff6
Swaroop Sridhar [Thu, 21 Jul 2016 11:10:02 +0000 (04:10 -0700)]
Remove DBG GcInfo encoder/decoder (dotnet/coreclr#6374)
This change removes the redundant set of GcInfo encoder/decoder
in the CoreCLR tree called Debug encoder/decoders.
These components are expected to be are well-tested versions
for verification, but are not actively used.
They cause additional overhead wrt maintaining two versions of
GcInfo encoder/decoder as GcInfo format changes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1697c6f8b6e6d1f06b4d734fabd3b328e1dc724
Geunsik Lim [Thu, 21 Jul 2016 10:23:30 +0000 (19:23 +0900)]
Documentation: Add additional terminologies in the glossary.md (dotnet/coreclr#6372)
It is a trivial patch. However, it will be helpful to developers that
learn the internals of CoreCLR via the source code and documents.
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
4ba6e7418e6a34ffa7b8ba91cb10e004d30d803f
Jarret Shook [Thu, 21 Jul 2016 06:24:48 +0000 (23:24 -0700)]
Merge pull request dotnet/coreclr#6365 from jashook/arm32_umount
More verbose logging for arm32 umount
Commit migrated from https://github.com/dotnet/coreclr/commit/
d12b41027de7db2ff3f690778f13ad0b12dc6ed8
jashook [Wed, 20 Jul 2016 22:04:38 +0000 (15:04 -0700)]
More verbose logging for arm32 umount
Umount fails occasionaly in the arm32 ci script. Add some logging
information using lsof before calling umount to diagnose which files are
open.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c218f9557487eb4575638a3f10e368215e1d1f4
Carol Eidt [Thu, 21 Jul 2016 04:19:14 +0000 (21:19 -0700)]
Merge pull request dotnet/coreclr#6297 from CarolEidt/MorphGenTreeRefactors
More Struct-related Refactorings
Commit migrated from https://github.com/dotnet/coreclr/commit/
481c1818829b652b71fff4be9dad2d094965adeb
Swaroop Sridhar [Thu, 21 Jul 2016 04:11:30 +0000 (21:11 -0700)]
Merge pull request dotnet/coreclr#6325 from swaroop-sridhar/R2Rver
GCInfo: Support versioning.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d5eac078847baebb32653655373086d6729f923
Swaroop Sridhar [Fri, 15 Jul 2016 07:41:30 +0000 (00:41 -0700)]
GCInfo: Support versioning.
This change enables the VM to support multiple versions GCInfo concurrently.
This is necessary in light of upcoming work to add ReturnType and other
modifications to the GCInfo format -- so that existing ReadyToRun images
will continue to run correctly.
The version# is not stored in the GcInfo structure -- because it is
wasteful to store the version once for every method. Instead, it is
tracked per range-section of generated/loaded methods.
The GCInfo version is computed as:
1) The current GCINFO_VERSION for JITted and Ngened images
2) A function of the Ready-to-run major version stored in READYTORUN_HEADER
for ready-to-run images. ReadyToRunJitManager::JitTokenToGCInfoVersion()
provides the GcInfo version for any Method. Currently, there's only one
version of GCInfo.
An abstraction GCInfoToken is added to the GcInfo interface, which tracks the
{GcInfo, Version} pair in-memory. Several GcInfo APIs are
modified to use GCInfoToken in place of GcInfo pointers.
Notes:
1) SOS GcDump: The GCDump API has separate dump routines for Header and the
pointer-liveness information (DumpGCTable and DumpGCHeader) each of which
advance a pointer to the GCInfo block. These APIs are not changed to
recieve a GCInfoToken in place of the GcInfo block pointer. Instead, they
recieve the GcInfo version at the time of construction.
2) Some routines that are specific to x86 gcInfo (ex: crackMethodInfoHdr)
are not yet updated to use versioning, since the development plan is to
update the Non-x86 GcInfo structure first.
3) The x86 specific structs defining GcInfo headers are moved to GcInfoTypes.h,
along with the non-x86 GcInfo type definitions.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f915aebaf5db0b829f062dc9940e23bb5c38d575
Jan Vorlicek [Thu, 21 Jul 2016 00:37:26 +0000 (02:37 +0200)]
Remove include of <utility> from seh.cpp (dotnet/coreclr#6359)
In my previous change that made exceptions smaller, I had `#include <utility>`
and I haven't realized that it pulls in some stl headers. That breaks build
on ARM.
The fix is to replace that include by defining just the std::move that's
all that was needed from the header.
Commit migrated from https://github.com/dotnet/coreclr/commit/
32a020e47a0797bba4167e85efc38a34397f633e
joemmett [Wed, 20 Jul 2016 23:31:04 +0000 (16:31 -0700)]
Fix is_blittable partial specializations (dotnet/coreclr#6357)
The is_blittable partial specializations were defined using "class", privately
inheriting from std::true_type. This means the ::value member variable will
be inaccessible to most users of these types. Thus the type
``std::enable_if<is_blittable<T>::value>::type'' will always result in a
substitution failure with a compiler that respects accessibility in SFINAE.
This commit changes "class" to "struct" for these partial specializations
so they inherit publicly from std::true_type.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8cdcdf1e8e2ed789c8a689553a384bb6fd1d7bcd
Egor Chesakov [Tue, 19 Jul 2016 18:33:19 +0000 (11:33 -0700)]
Fix bug: inlinee did not copy inlinee bbFlags to caller bbFlags.
Commit migrated from https://github.com/dotnet/coreclr/commit/
45cff6169b2ec915f1aae567a9581f0e3265de39
Carol Eidt [Fri, 15 Jul 2016 19:29:29 +0000 (12:29 -0700)]
More Struct-related Refactorings
- Make GT_OBJ and GT_NULLCHECK derive from GenTreeIndir, as they are also indirections.
- Extract the ordering-related methods from gentree and optcse, as they will need to be used slightly differently for struct assignments.
- Make fgMorphImplicitByRefArgs take a pointer to the tree, as it may need to replace the tree with one that a simple CopyFrom() will not work for.
- In gtSetEvalOrder(), in the addressing mode code, replace "adr" with "base" and "op1" with "addr", as the existing names are quite confusing.
- Other minor refactorings to reduce future diffs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c4ac0d992c883342dd6dff3b1da2565bc0f7b0a1
Sivarv [Wed, 20 Jul 2016 22:14:58 +0000 (15:14 -0700)]
Merge pull request dotnet/coreclr#6326 from sivarv/phase2
Support for reg optional tree temps.
Commit migrated from https://github.com/dotnet/coreclr/commit/
34e1626bc3a49b50900ca192bed1f97524d81e6a
Maoni Stephens [Wed, 20 Jul 2016 21:55:48 +0000 (14:55 -0700)]
Merge pull request dotnet/coreclr#6242 from Maoni0/race
Fixed race condition in setting dd_new_allocation
Commit migrated from https://github.com/dotnet/coreclr/commit/
4529b0a0d9fd09b89843d5ba894151d7202e3c23
Aditya Mandaleeka [Wed, 20 Jul 2016 21:24:02 +0000 (14:24 -0700)]
Merge pull request dotnet/coreclr#6348 from hseok-oh/softfp_rootfs
Fix to ignore codename for arm-softfp
Commit migrated from https://github.com/dotnet/coreclr/commit/
e157ba344f73e937dbac8dceb425e7dda7061101
sivarv [Mon, 18 Jul 2016 23:56:59 +0000 (16:56 -0700)]
Support for reg optional tree temps.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a817e0195e76a94e88ccd6a8779ed6451e8640a
William Godbe [Wed, 20 Jul 2016 19:01:10 +0000 (12:01 -0700)]
Merge pull request dotnet/coreclr#6323 from wtgodbe/updatePackages
Enable automatic updating of package versions in test project.json files
Commit migrated from https://github.com/dotnet/coreclr/commit/
cfb651c8e3feca5bf18de4d67dbd84fdb2085407
wtgodbe [Mon, 18 Jul 2016 22:25:04 +0000 (15:25 -0700)]
Enable automatic updating of package versions in test project.json files
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6116a5263f1d23c4b4501524ec82176e96740b1
Matt Mitchell [Wed, 20 Jul 2016 18:43:52 +0000 (11:43 -0700)]
Merge pull request dotnet/coreclr#6360 from mmitche/fix-regex
Incorrect quoting around regex string
Commit migrated from https://github.com/dotnet/coreclr/commit/
ad7d6463426b5b515b98223659494674af8a5102
Matt Mitchell [Wed, 20 Jul 2016 18:43:07 +0000 (11:43 -0700)]
Incorrect quoting around regex string
Strings requiring inline replacement need double quotes
Commit migrated from https://github.com/dotnet/coreclr/commit/
c110738b7d3dc9cffc46883234450cf0d97587f1
Michelle McDaniel [Mon, 11 Jul 2016 16:32:56 +0000 (09:32 -0700)]
Fix silent bad codegen in signed comparison
While working on dotnet/coreclr#5956, I uncovered a silent bad codegen bug in signed
comparison. The way the code was written, we'd do an unsigned set after a
signed compare/jump from the high comparison. However, in this case, we
need to make sure that we are honoring the sign of the comparison done on
the high part of the operation, and the lo comparison would still want to
be an unsigned compare followed by an unsigned set. This change splits
comparisons into two cases: 1) A signed comparison where we have two jumps
for the high part (GT_GT, GT_LT, GT_GE, and GT_LE), which require a signed
set if the high comparisons are true, and an unsigned set if not, and 2)
An unsigned comparison, or a comparison where the sign does not matter for
the compare (GT_NE, GT_EQ), which just require an unsigned set for both
the high and lo operations (the code we already had in genCompareLong).
When we compare longs, we don't need to have both a jg/ja and a jne
instruction for the hi compare for the case where we enregister the result
of the compare, since the set will do the right thing. We only need to
check the lo halves if the hi halves were equal.
For long compares where the result isn't stored in a register, we need to use
signed jumps for the high comparison, and unsigned jumps for the low compare.
Currently, we generate a signed jump in the code for GT_JTRUE that is used by
both compares. This change modifies the logic for these compares/JTRUEs.
We separate the logic into genJTrueLong. In genJTrueLong, we use similar
logic as the legacy backend for the jumps, using a signed jump after the
high compare when we have signed operands, and unsigned jump when we have
a unsigned operands, and an unsigned jump for the low compare.
This change also modifies genJumpKindsForTreeLongHi, since it is now only
used for the uncontained case, where we need to jump to the bbJumpDest if
the compare is true, so we need to use the actual jump type, rather than
just checking for inequality (as inequality only tells us if we need to
check the low halves, not if the condition is true or not).
This change also adds test cases for the two silent bad codegen cases this
commit fixes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
243e7c4f661d5ad0217c9e743c391a0df43bb6a0
William Godbe [Wed, 20 Jul 2016 17:24:24 +0000 (10:24 -0700)]
Merge pull request dotnet/coreclr#6340 from wtgodbe/tPack
Stop building targetingPack package on non-windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
54a3d1d6755c2ca9fee95514673095540f76b56d
Gaurav Khanna [Wed, 20 Jul 2016 17:04:17 +0000 (10:04 -0700)]
Merge pull request dotnet/coreclr#6346 from dotnet-bot/UpdateDependencies20160720052232
Updating External dependencies to beta-24320-00
Commit migrated from https://github.com/dotnet/coreclr/commit/
c369fc1ec48e753db3d5cacdca1463f277d4d23e
Matt Mitchell [Wed, 20 Jul 2016 16:59:40 +0000 (09:59 -0700)]
Merge pull request dotnet/coreclr#6354 from dotnet/revert-6344-UndoNetCIChange
Revert "Revert: Pull crash dump links"
Commit migrated from https://github.com/dotnet/coreclr/commit/
e1fa15afc04e537c45e7ab5ea3b5b738f7caf90f
Matt Mitchell [Wed, 20 Jul 2016 16:01:04 +0000 (09:01 -0700)]
Revert "Revert: Pull crash dump links"
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3111f4bd005c4f998333fcdd41afab0b2699cd1
Kyungwoo Lee [Wed, 20 Jul 2016 15:50:22 +0000 (08:50 -0700)]
ARM64: Enable Function Fragment
Fixes https://github.com/dotnet/coreclr/issues/6064
Fixes https://github.com/dotnet/coreclr/issues/6122
Basically this enable function fragment.
Unwind data for arm64 can express only 1MB range.
For the large function, we should split unwind data for each fragment of
function. Other than the first fragment (the host region), each fragment
has a phantom prolog starting with "end_c(0xe5)".
I confirmed that this implementation aligns with window's unwinder, and
tested with COMPlus_JitSplitFunctionSize=32 for a few test cases which
split both main and funclets.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b37e6fc8f5cd72eaae9258df2158bb85e5ff43dc
Jan Vorlicek [Wed, 20 Jul 2016 12:21:08 +0000 (14:21 +0200)]
Make PAL_SEHException smaller (dotnet/coreclr#6267)
The PAL_SEHException is quite large due to the fact that it contains context
and exception records. This causes a problem when we try to throw it and
system gets out of memory. The C++ runtime can throw exceptions even in that
case, but only if they are smaller than certain threshold. So in our case,
it just aborts the process.
This change separates the context and exception records from the exception,
which ensures that the above mentioned mechanism in the C++ runtime can
kick in and the exception can be thrown even when malloc fails to allocate
it.
I have also modified HandleHardwareException to return BOOL indicating whether
the execution should continue at the possibly modified exception context
instead of using RtlRestoreContext. In that case, we return all the way back
to the signal handler, update the ucontext in there and return from it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
03250d34da85f23df0a8f7ad1c8b3760e0b73b1f
Hyeongseok Oh [Wed, 20 Jul 2016 09:35:08 +0000 (18:35 +0900)]
Fix if statement to ignore Ubuntu codename if BuildArch is arm-softfp
Commit migrated from https://github.com/dotnet/coreclr/commit/
6dca838bcba5a748792f37d2083fcf9b79a1cb1d
Hanjoung Lee [Wed, 20 Jul 2016 07:45:09 +0000 (16:45 +0900)]
Fix mistyped instruction in linux-instructions.md (dotnet/coreclr#6332)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3317125ebf10f9d949b5460cbdff8153748346f
Gaurav Khanna [Wed, 20 Jul 2016 06:49:45 +0000 (23:49 -0700)]
Fix for CoreCLR 6269 - Trigger formal binding if domain-wide cache does not have entry for an assembly in custom load context. (dotnet/coreclr#6335)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d86bc689856df25d1826b8418d7b251dd88f19e
Andy Ayers [Wed, 20 Jul 2016 06:31:51 +0000 (23:31 -0700)]
Merge pull request dotnet/coreclr#6337 from AndyAyersMS/CountObservations
Inliner: improve arg observations
Commit migrated from https://github.com/dotnet/coreclr/commit/
7288deb7991bc5e5be707d4f96c2e635be58a99a
Sean Gillespie [Wed, 20 Jul 2016 05:46:46 +0000 (22:46 -0700)]
Merge pull request dotnet/coreclr#6338 from swgillespie/revert-weakreference-tests
Re-enable two tests testing GC.GetGeneration(System.WeakReference)
Commit migrated from https://github.com/dotnet/coreclr/commit/
05f8883d1fb005d50e2b247f27faca102d6eafcf
dotnet-bot [Wed, 20 Jul 2016 05:22:32 +0000 (05:22 +0000)]
Updating External dependencies to beta-24320-00
Commit migrated from https://github.com/dotnet/coreclr/commit/
fda7e91c1a8ec1a649ff4da7964ad4d56d3b8dcc
Andy Ayers [Wed, 20 Jul 2016 03:54:30 +0000 (20:54 -0700)]
Merge pull request dotnet/coreclr#6344 from AndyAyersMS/UndoNetCIChange
Revert: Pull crash dump links
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bbf4b208506a572374a57cf53f7bfb098483f86
Andy Ayers [Wed, 20 Jul 2016 01:52:39 +0000 (18:52 -0700)]
Revert: Pull crash dump links
Ubuntu testing is failing with a groovy scripting error.
Matt asked me to revert this change for now.
This reverts commit dotnet/coreclr@
7fc5cb7e52c5db53a5696d398e281c0f6f6a1588.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fcb84d7e839563c559802467ca0680fcc8dd4bea
James Ko [Wed, 20 Jul 2016 00:18:06 +0000 (20:18 -0400)]
Remove duplicate code from string.GetHashCode (dotnet/coreclr#4696)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ff9f6b76f1d9c91ce7169689f07d3e61836e7d5
James Ko [Wed, 20 Jul 2016 00:13:55 +0000 (20:13 -0400)]
Improve performance, drastically reduce misfires for new string(char*) on 64-bit (dotnet/coreclr#6125)
Commit migrated from https://github.com/dotnet/coreclr/commit/
266108a9884775d10aa6f72a0f2161d8741f0d32
James Ko [Wed, 20 Jul 2016 00:06:01 +0000 (20:06 -0400)]
Better performance for string.CompareOrdinalHelper (dotnet/coreclr#6119)
- For 64-bit, process a `long` at a time (and 3 longs per iteration of the loop), since it's the largest word size of the processor. This is what other functions, like `EqualsHelper` or `StartsWithOrdinalHelper` do.
- Make sure we perform aligned reads on 64-bit platforms
- Strings (objects in general?) are allocated on an aligned word boundary (that is, divisible by 4/8). However, the offset to the chars (`OffsetToStringData`) is 12 on 64-bit platforms, meaning that if we read a long from the first char it will *not* be aligned. To fix this, first check for differences in the first/second chars and start the loop from there.
- Used `goto` within the loop code, so we don't have to keep making jumps in the common case.
I also removed a comment above the `String` class that seems to be outdated (seeing as there is no string constructor that accepts another string).
Commit migrated from https://github.com/dotnet/coreclr/commit/
719c34f3fc205093cb137e73c608f3b58e1a144f
Kyungwoo Lee [Tue, 19 Jul 2016 23:37:18 +0000 (16:37 -0700)]
Merge pull request dotnet/coreclr#6293 from kyulee1/altjit
ARM64: Cross-Target Jit
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1b8d2b85090e419be92475159f1983e645981ce
wtgodbe [Tue, 19 Jul 2016 22:30:26 +0000 (15:30 -0700)]
Stop building targetingPack package on non-windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e71867b4bb37cc2398d1d868cf955cb70700e98
Sean Gillespie [Tue, 19 Jul 2016 21:48:07 +0000 (14:48 -0700)]
Re-enable two tests testing GC.GetGeneration(System.WeakReference) that has now been exposed
Commit migrated from https://github.com/dotnet/coreclr/commit/
d82f1b92e0b49b2eff69b7f06117115a3715105e
Andy Ayers [Tue, 19 Jul 2016 07:27:13 +0000 (00:27 -0700)]
Inliner: improve arg observations
Two related changes to better capture cases where args or constant args
are seen at inline call sites.
On the observation side, the inliner's stack modelling of the callee is
crude and will often overestimate the evaluation stack depth. So when
looking at an opcode that takes just one stack operand (eg BRFALSE) the
inliner's check should be whether the stack has at least one element
instead of checking whether the stack has exactly one element. For
compatibility reasons, the check for exactly one element is still used
when the inline is evaluated via the LegacyPolicy.
On the policy side, instead of keeping a bool flag to note that there
were interesting arg cases, count the number of observations.
LegacyPolicy continues to act as before, checking if count is zero or
nonzero instead of whether the flag was false or true. The count is
available for use in other heuristics and is reported in inline data.
Commit migrated from https://github.com/dotnet/coreclr/commit/
16d07575509a7bec2aa6e8ca10aabdaea020cadf
Matt Mitchell [Tue, 19 Jul 2016 20:52:41 +0000 (13:52 -0700)]
Merge pull request dotnet/coreclr#6336 from mmitche/crash-dump-links
Pull crash dump links
Commit migrated from https://github.com/dotnet/coreclr/commit/
56395ed39752a53aedc9ea9b9e4c86ad39a92977
Matt Mitchell [Tue, 19 Jul 2016 20:45:42 +0000 (13:45 -0700)]
Pull crash dump links
Pulls crash dump links from dumplings.txt in the workspace into the build report
Commit migrated from https://github.com/dotnet/coreclr/commit/
7fc5cb7e52c5db53a5696d398e281c0f6f6a1588
Jim Ma [Tue, 19 Jul 2016 17:21:01 +0000 (01:21 +0800)]
Make coreclr buildable on 32bit Windows 10. (dotnet/coreclr#6316)
Automatically determine the OS architecture(x86 or x64) and download the
correct dev tool.
Fix dotnet/coreclr#6308
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0a72f0132b46f2ecc93b3bc5d5ae49a4f9d24e4
Gaurav Khanna [Tue, 19 Jul 2016 16:14:00 +0000 (09:14 -0700)]
Merge pull request dotnet/coreclr#6331 from dotnet-bot/UpdateDependencies20160719051717
Updating External dependencies to beta-24319-00
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ee31812da8b31bbf9c973208a2072790b3716c6