summaryrefslogtreecommitdiff
path: root/src/ToolBox
AgeCommit message (Collapse)AuthorFilesLines
2018-03-08Don't build superpmi as crosscomponent (#16729)Egor Chesakov5-10/+10
* Don't build superpmi as crosscomponent * Replace install with _install in all superpmi CMakeLists.txt files
2018-03-06Remove libuuid usage (#16643)Jan Vorlicek3-3/+3
* Remove libuuid usage This change removes dependency on the libuuid library that is used for GUID creation only. It implements it using a random generator instead. It also modifies return type of PAL_Random to VOID since it was always returning TRUE and none of the existing callers were checking it. 1. Port the GUID creation to managed code. 2. Modify the PAL_Random to have 6 times better perf so that the perf of the CoCreateGuid that is used in the native runtime doesn't degrade that much w.r.t the previous state when the libuuid was used. 3. Use Interop.GetRandomBytes on Unix and fix Windows
2018-03-02Use TARGET_POINTER_SIZE macro (#16640)Egor Chesakov1-0/+4
* Replace sizeof(void*) with TARGET_POINTER_SIZE in TYPEINFO in src/inc/cortypeinfo.h * Replace sizeof(LPVOID) with TARGET_POINTER_SIZE in DEFINEELEMENTTYPEINFO in src/vm/siginfo.cpp * Define TARGET_POINTER_SIZE as POINTERSIZE_BYTES in src/ToolBox/SOS/Strike/util.h
2018-03-02Fix !threads -special spurious error message (#16701)Mike McLaughlin2-7/+12
Fix !threads -special spurious error message Generate portable PDB for SOS.NETCore. Fix issue #16665. Incorrect command names in messages on Linux.
2018-02-25Delete printing of security transparency in SOS (#16560)Jan Kotas6-39/+0
Security transparency is not relevant in .NET Core.
2018-02-17delete unused mirror files (#16423)Sergey Andreenko9-9/+0
2018-01-19Revert "Change just-in-time debugging registry keys. (#15722)" (#15921)Mike McLaughlin1-5/+5
This reverts commit 8b2cac974db3edde38e1a555455f53592d03b68e.
2018-01-05Change just-in-time debugging registry keys. (#15722)Mike McLaughlin1-5/+5
From "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" to "SOFTWARE\Microsoft\.NETCore\JITDebugging".
2017-12-28Fix desktop build warningsBruce Forstall1-2/+2
2017-12-12Add SPMI for getTypeForPrimitiveNumericClassFei Peng8-1/+67
2017-12-11fix CoreCLR build errors with clang5.0. (#15477)Sergey Andreenko1-2/+0
* spmi: delete the explicit call to the constructor. MethodContext was already initialized through `new MethodContext();` * add an artificial using of lambda param. the define `#define PAL_EXCEPT(dispositionExpression)` can declare expression that has zero or one param. If it has zero param, then `__param` in the lambda is unused, prevent clang complains by adding this change.
2017-12-06new intrinsic type support (#15340)Fei Peng8-1/+178
2017-11-21format spmi source (#15144)Sergey Andreenko4-29/+23
2017-11-20fix the adding (#15121)Sergey Andreenko1-1/+1
2017-11-13fix DevDiv521437dotnet-bot1-0/+12
[tfs-changeset: 1680966]
2017-11-04[Infrastructure] Use MSBuild v15 extension point to control CL parallelism, ↵Jacek Blaszczynski5-5/+5
abstract MSBuild /maxcpucount switch (#14578) This commit frees -ExtraParameters and uses MSBuild v15 extension point to control CL compiler parallelism. If MSBuild 15.0 is available - installed with Visual Studio 2017 - CL parallelism control is achieved by using extension point in Microsoft.Common.props file which allows to include Directory.Build.props - for details see [Microsoft.Common.props] [1] file in MSBuild repo. https://github.com/Microsoft/msbuild/blob/b38e4ceeaaec36c5237ae698041e9b9f18c84876/src/Tasks/Microsoft.Common.props#L36. MSBuild parallelism is controled via abstracted /maxcpucount command line switch which now is available as -MSBuildNodeCount pass through run.cmd/run.sh command line argument with default value equal to /maxcpucount (what defaults to number of logical processors). This allows to control MSBuild parallelism on all supported platforms. It is possible to control MSBuild parallelism programatically via MSBuild public API using MaxNodeCount properties available on the following APIs: Microsoft.Build.Evaluation.ProjectCollection.MaxNodeCount Microsoft.Build.Execution.BuildParameters.MaxNodeCount It's use in current build infrastructure would require creating unnecessary complexity and was ruled out.
2017-10-30JIT: optimize calls on boxed objectsAndy Ayers8-1/+101
For calls with boxed this objects, invoke the unboxed entry point if available and modify the box to copy the original value or struct to a local. Pass the address of this local as the first argument to the unboxed entry point. Defer for cases where the unboxed entry point requires an extra type parameter. This may enable subsequent inlining of the method, and if the method has other boxed parameters, may enable undoing those boxes as well. The jit is not yet as proficient at eliminating the struct copies, but they are present with or without this change, and some may even be required when the methods mutate the fields of `this`. Closes #14213.
2017-10-17format spmi sources. (#14545)Sergey Andreenko28-245/+305
format spmi sources.
2017-10-16protect strlen from nullptr (#14533)Sergey Andreenko1-5/+6
2017-10-11Delete !FEATURE_IMPLICIT_TLS (#14398)Jan Kotas1-26/+2
Linux and Windows arm64 are using the regular C/C++ thread local statics. This change unifies the remaining Windows architectures to be on the same plan.
2017-10-05JIT: More type equality opts (#14317)Andy Ayers8-1/+153
* JIT: Wrap some runtime lookups in new node type Work based on the plan outlined in #14305. Introduce a new unary node type GT_RUNTIMELOOKUP that wraps existing runtime lookup trees created in `impLookupToTree` and holds onto the handle that inspired the lookup. Note there are other importer paths that create lookups directly that we might also want to wrap, though wrapping is not a requirement for correctness. Keep this node type around through morph, then unwrap and just use the wrapped node after that. * JIT: More enhancements to type equality testing The jit is now able to optimize some type equality checks in shared method instances where one or both of the types require runtime lookup, for instance comparing `T` to a value type, or comparing two different value types `V1<T>` and `V2<T>`. Add two new jit interface methods, one for testing for type equality and the other for type casting. These return Must/MustNot/Maybe results depending on whether or not the equality or cast can be resolved at jit time. Implement the equality check. Use this to enhance the type equality opts in the jit for both direct comparison and the checking done by unbox.any.
2017-10-05[SOS] Fix address types inconsistency (#14188)Konstantin Baladurin1-21/+21
GetObjFieldOffset function expects that cdaObj and cdaMT arguments have CLRDATA_ADDRESS type (sign-extended) but in some cases we use TADDR instead of CLRDATA_ADDRESS that isn't sign-extended. Due to it some SOS commands (for example DumpRuntimeTypes) don't work on x86 and ARM32.
2017-10-05[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)Konstantin Baladurin2-1/+22
* [x86/Linux][SOS] Add support for x86 in GetContextFromFrame It's need for 'clrstack -f' command of SOS plugin on x86. * [x86/Linux] Fix RtlpGetFunctionEndAddress function We should use PTR_UNWIND_INFO instead of PUNWIND_INFO for pointer to UNWIND_INFO structure because it's pointer from other process and we need to use DAC to read data using it. * [x86/Linux][SOS] Define DEBUG_STACK_CONTEXT for x86 It's needed for 'clrstack -f' command in libsosplugin. * [x86/Linux] Fix undefined references in libmscordbi.so on x86 Asm block like following: __asm fnsave currentFPUState where currentFPUState is structure works with MSVC but leads to undefined reference currentFPUState in the binary with other compilers. So rewrite such asm blocks for them. This patch fixes error "Unable to load 'libmscordbi.so'" during execution of 'clrstack -f' command of SOS plugin on x86. * [x86/Linux] Fix calling convention inconsistency WINAPI and STDAPI are defined as __cdecl but in some cases functions with these attributes are called using stdcall calling convention. It leads to crashes during execution of 'clrstack -i' command of SOS plugin on x86.
2017-10-04Few build changes to support Freebsd (#14121)Tomas Weinfurt1-3/+8
* also look for python27 * add more locations to search for lldb.h so it just work on FreeBSD * add adm64 to ARCH selection. This is mostly cosmetic to avoild warning on FreeBSD * add support for -osgroup=XXX - this is mostly for conistency. -OSGroup=FreeBSD is similar to freebsdmscorlib in build.cmd * fix typo adm->amd * add back fi removed by mistake * add __HostDistroRid for FreeBSD * adress fedback from review: make python lookup consistent - starting with most specific version. uddate warning message about lldb.h and remove composite flag * feedback from review: type and small change on OSGroup syntax * few more minor fixes
2017-10-03[SOS] Use addresses without sign extension in lldb plugin (#14009)Konstantin Baladurin1-0/+23
lldb doesn't expect sign-extended addresses so we need to convert them before using with lldb API. This patch allows to use SOS plugin for core files in lldb on 32-bit platforms and also fixes output of the 'clrstack -f' command.
2017-10-02The !DumpArray sos command emits invalid DML for array elements (#13855)tvass831-1/+1
Element Methodtable is reported correctly but for individual elements, the generated DML uses the MT of the array, not the element, thus giving incorrect results Only value types are affected 0:007> !DumpArray /d 02b16574 Name:        WindowsFormsApplication2_SOS_bug.Test[] MethodTable: 011c82ec EEClass:     011c8290 Size:        412(0x19c) bytes Array:       Rank 1, Number of elements 100, Type VALUETYPE Element Methodtable: 011c824c [0] 02b1657c => here is the problem
2017-09-29Update build clang/llvm/lldb 3.9 (#14096)Mike McLaughlin1-3/+3
Update build scripts, docs and build pipeline docker images to clang/llvm/lldb 3.9
2017-09-29[x86/Linux][SOS] Fix DumpStack command output on x86 (#14189)Konstantin Baladurin1-4/+4
On x86 DumpStack command doesn't print symbol information for caller and callee. This patch fixes it and make output the same as on AMD64.
2017-09-28Add the capability to force JIT options on the SPMI command line. (#14209)Sergey Andreenko7-72/+155
expand the grammar for jit{,2}option to -jitoption [force] key=value
2017-09-27JIT: devirtualization support for EqualityComparer<T>.Default (#14125)Andy Ayers8-3/+69
Mark `EqualityComparer<T>.Default`'s getter as `[Intrinsic]` so the jit knows there is something special about it. Extend the jit's named intrinsic recognizer to recognize this method. Add a new jit interface method to determine the exact type returned by `EqualityComparer<T>.Default`, given `T`. Compute the return type by mirroring the logic used in the actual implementation. Bail out when `T` is not final as those cases won't simplify down much and lead to code bloat. Invoke this interface method when trying to devirtualize calls where the 'this' object in the call comes from `EqualityComparer<T>.Default`. The devirtualized methods can then be inlined. Since the specific comparer `Equal` and `GetHashCode` methods look more complicated in IL than they really are, mark them with AggressiveInlining attributes. If devirtualization and inlining happen, it is quite likely that the value of the comparer object itself is not used in the body of the comparer. This value comes from a static field cache on the comparer helper. When the comparer value is ignored, the jit removes the field access since it is non-faulting. It also removes the the class init helper that is there to ensure that the (no-longer accessed) field is properly initialized. This helper has relatively high overhead even in the fast case where the class has been initialized aready. Add a perf test. Closes #6688.
2017-09-27[GDBJIT] Provide full file names in generated DWARF (#14172)Igor Kulaychuk1-1/+1
* Fix compile unit info Provide full path to source in SequencePoints for GDBJIT Use source file and directory path for compile unit info in DWARF instead of module name. * Add a class for building Directory Table and File Table * Fix code inconsistencies and add comments
2017-09-21Merge pull request #14108 from jashook/spmi_get_helperJarret Shook1-2/+2
Fix superPMI getHelperFunction
2017-09-20Fix superPMI getHelperFunctionjashook1-2/+2
2017-09-18Change jit notifications so that they pass the native code address. (#14021)David Mason1-7/+34
* Change jit notifications so that they pass the native code address. This fixes !bpmd so that it will set the correct breakpoint on tiered jitted methods. * code review feedback * don't handle OnCodeGenerated
2017-09-15fix ilgen after: "Add the capability to specify JIT options from smpi ↵dotnet-bot1-3/+3
command line" [tfs-changeset: 1674327]
2017-09-14The !heapstat sos command emits difficult to read output as the "Percentage" ↵tvass831-8/+8
column is not aligned properly (#13856)
2017-09-11Merge changes from TFS (#13884)dotnet bot1-1/+1
Add new GetMethodNameFromMetadata interface member to ILGEN. Also fix warning in the build. [tfs-changeset: 1673078] [Hand edited to fix break in SPMI]
2017-09-08Merge pull request #13110 from pgavlin/SPMIJitOptionsPat Gavlin16-362/+185
Add the capability to specify JIT options on the SPMI command line.
2017-09-07Add the capability to specify JIT options on the SPMI command line.Pat Gavlin16-362/+185
This change adds two new flags, `-jitoption` and `-jit2option`, to the SuperPMI command line. These flags are cumulative, and are used to specify JIT config options (e.g. `COMPlus_JitDisasm`, albeit without the `COMPlus_` prefix) to the base and diff JITs, respectively. This change also removes Smarty-specific code and support for capturing and replaying environment variables. The former is no longer terribly useful and the latter has been obviated by the JIT host interface.
2017-09-07Make dumpmd work with tiered jitting. Now displays previous code addresses ↵David Mason1-14/+73
(#13805) * Make dumpmd work with tiered jitting. Now displays previous code addresses * add tier info and nativecodeversionnode ptr to dumpmd output * fix warnings on non-rejit platforms
2017-09-07New jit intrinsic support (#13815)Andy Ayers8-4/+141
Support for new-style intrinsics where corelib methods can have both IL implementations and optional jit-supplied implementations. Mark such methods with the [Intrinsic] attribute, then recognize the intrinsic methods by name in the jit. Jit currently has a placeholder for the Enum.HasFlag method.
2017-08-31spmi: fix prevEnviroment delete statement. (#13729)Sergey Andreenko1-2/+9
2017-08-28SuperPMI replay: fix enviroment variables initialization. (#13596)Sergey Andreenko7-1/+83
SuperPMI replay: fix enviroment variables initialization. If we have mch with mc files with different ENV_variables, we ran them with the set for the first mc.
2017-08-25Enable clrstack -f in ARM/LinuxJonghyun Park2-16/+24
2017-08-22Merge pull request #12216 from ellismg/fix-warningsWilliam Godbe1-6/+3
Fix warnings when building SOS.NETCore.csproj
2017-08-17Enable SuperPMI asm diffs using CoreDisToolsBruce Forstall6-27/+92
Change SuperPMI to dynamically load coredistools.dll on demand.
2017-08-16Fixed Android AMD64 build. (#13402)Mike McLaughlin1-4/+4
2017-08-15Implement out of context stack unwinder (#13302)Mike McLaughlin1-11/+152
Implement out of context stack unwinder Decode the eh frame info found in the in-memory module image and pass it back to the remote libunwind8 to do the unwind. Added remote-unwind.cpp for all the out of context unwind code. Added an all managed threads option -all the "clrstack" (sos ClrStack). The IDebugDataTarget4 feature needs to be enabled for OS X. Add libunwind license notice to third party notices file.
2017-08-09typo (#13287)John Doe1-1/+1
2017-08-08Merge pull request #12168 from gbalykov/remove-relocations-readonlyBruce Forstall9-21/+42
Partially remove relocations from SECTION_Readonly