summaryrefslogtreecommitdiff
path: root/src/zap/zapimage.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-07-27Zapper::CompileAssembly: save NI file atomicallyKonstantin Baladurin1-2/+2
It can get rid of possible problems with corrupted NI files if crossgen will be killed during image saving.
2018-07-06Remove relocations for vtable chunks (#17147)Gleb Balykov1-1/+2
* Separate sections READONLY_VCHUNKS and READONLY_DICTIONARY * Remove relocations for second-level indirection of Vtable in case FEATURE_NGEN_RELOCS_OPTIMIZATIONS is enabled. Introduce FEATURE_NGEN_RELOCS_OPTIMIZATIONS, under which NGEN specific relocations optimizations are enabled * Replace push/pop of R11 in stubs with - str/ldr of R4 in space reserved in epilog for non-tail calls - usage of R4 with hybrid-tail calls (same as for EmitShuffleThunk) * Replace push/pop of R11 for function epilog with usage of LR as helper register right before its restore from stack
2018-02-28Replace ambiguous _WIN64 and BIT64 with _TARGET_64BIT_ macroEgor Chesakov1-5/+5
2017-12-08Fix typo `_TARGET_ARM` to `_TARGET_ARM_`. This happens mostly in comments ↵Egor Chesakov1-1/+1
except lsra.cpp.
2017-09-29Enable hardware intrinsic in debug and reflectionFei Peng1-0/+6
2017-09-04Print zapper stats on verbose mode (#13774)Hanjoung Lee1-0/+4
2017-08-08Merge pull request #12168 from gbalykov/remove-relocations-readonlyBruce Forstall1-0/+1
Partially remove relocations from SECTION_Readonly
2017-07-12Improvements in the Zapper to VM interface, no longer throw exceptions ↵Brian Sullivan1-72/+67
across the interface. Catch the exception on the VM side of the interface call and report the error to the zapper using an Error() function call rather than letting the exception go across tyhe interface call. The interface methods LoadIBCTypeHelper and LoadIBCMethodHelper no longer need a ThrowsViolation in their contracts. Instead oif using BAD_FORMAT exceptions for a failures to load IBC data type and methods, we now throw TypeLoad exception.
2017-07-10Move ITEM_DICTIONARY and ITEM_VTABLE_CHUNK to separate subsection of ↵Gleb Balykov1-0/+1
SECTION_Readonly
2017-06-14Crossgen - Disable the Target-dependent SIMD vector types warningBrian Sullivan1-1/+10
When a SIMD type is referenced during CEEPreloader instead of loading it we throw a type load exception with a unique resource ID and message. This commit changed the ICorCompileDataStore interface to allow us to pass the unique resource ID over to the zapper from the VM. The Zapper can then demote certain resource ID warnings down to the lowest informational level, so that they aren't printed out during crossgen. With this commit we currently are demoting IDS_EE_SIMD_NGEN_DISALLOWED
2017-05-09Fix static analysis issues (#11466)Koundinya Veluri1-0/+6
Fix static analysis issues
2017-04-24Remove PAL FileAlignment restriction (#10959)Steve MacLean1-2/+2
* Remove PAL FileAlignment restriction * Address PR #10959 feedback * Fix amd64 crossgen error * Respond to review feedback * Fix arm32 regression * Prepare to remove VIRTUAL_PAGE_* from map.cpp Also simplify previous section code * Rename function to GetVirtualPageSize()
2017-03-31Added DisableInlining flag to the ProfileData.Brian Sullivan1-20/+20
Extended CompileStatus to have both COMPILE_HOT_EXCLUDED and COMPILE_COLD_EXCLUDED. Fixes the IsNull implementation Fixes getBBProfileData to handle the case where pos can now be zero
2017-03-29Added two new profile data flags: ExcludeHotMethodCode and ExcludeColdMethodCodeBrian Sullivan1-61/+200
Refactored zapimage CompileProfileData into four new methods: CompileHotRegion, CompileColdRegion, PlaceMethodIL and ProfileDisableInlining Preserve the CompileStatus and methodProfilingDataFlags used when we compile methods during CompileHotRegion() Then during CompileColdRegion retrieve these value and exclude the method from the AOT native image if the status is COMPILE_EXCLUDED.
2017-03-13Work for IBC profiling with ReadyToRun imagesBrian Sullivan1-0/+1
Incremented ReadyToRun version to 2.2 Implemented caching for IsInstrumented using IS_INSTRUMENTED_UNSET Added method Module::InitializeForProfiling() Added full support for method profile counts in ReadyToRun image
2017-02-24Fix segmentation fault when using ZapImage::PrintStats() (#9731)Sujin Kim1-30/+40
Currently, ZapImage::PrintStats is not used anywhere. But I want to get detailed informations about Native Image(ni.dll) components. So I just used ZapImage::PrintStats when called ZapImage::SaveImage. After that I met the segmentation fault likes #9680. I found the reason for this issue is accessing the null pointer to get sizes.
2017-02-13Rejit support for R2R imagesnoahfalk1-0/+1
Two changes: a) R2R code wasn't being reported to the Rejit Manager when it was used, this is a simple fix in prestub.cpp. This makes the ReJit API work. b) The bulk of the changes handle adding support for an inlining table to R2R so that ICorProfilerInfo6::EnumNgenMethodsInliningThisMethod can supply that information to profilers. This was only tested on Windows thus far, but there is no apparent reason this change would be OS specific.
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft1-94/+0
2017-02-11Revert "Remove always defined FEATURE_CORESYSTEM"danmosemsft1-1/+1
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-98/+1
2017-02-10Remove always defined FEATURE_CORESYSTEMdanmosemsft1-1/+1
2016-10-28Ensure the module slot in R2R image can be located (#7875)John Chen1-0/+6
Each Ready-to-Run image has a slot for storing a pointer to the Module object associated with this image. However, if the image contains no code (e.g., facade assemblies), the import table needed to locate this slot wasn't written out, so the runtime couldn't find this slot. This casued "crossgen /createpdb" command to fail on facade assemblies after PR #7809, and required a workaround (commit c4d8994). This commit ensures writing the import table needed to locate the slot for module. It also removes the workaround in commit c4d8994, which is no longer necessary.
2016-10-27Introduce new CORJIT_FLAGS typeBruce Forstall1-14/+15
The "JIT flags" currently passed between the EE and the JIT have traditionally been bit flags in a 32-bit word. Recently, a second 32-bit word was added to accommodate additional flags, but that set of flags is definitely "2nd class": they are not universally passed, and require using a separate set of bit definitions, and comparing those bits against the proper, 2nd word. This change replaces all uses of bare DWORD or 'unsigned int' types representing flags with CORJIT_FLAGS, which is now an opaque type. All flag names were renamed from CORJIT_FLG_* to CORJIT_FLAG_* to ensure all cases were changed to use the new names, which are also scoped within the CORJIT_FLAGS type itself. Another motivation to do this, besides cleaner code, is to allow enabling the SSE/AVX flags for x86. For x86, we had fewer bits available in the "first word", so would have to either put them in the "second word", which, as stated, was very much 2nd class and not plumbed through many usages, or we could move other bits to the "second word", with the same issues. Neither was a good option. RyuJIT compiles with both COR_JIT_EE_VERSION > 460 and <= 460. I introduced a JitFlags adapter class in jitee.h to handle both JIT flag types. All JIT code uses this JitFlags type, which operates identically to the new CORJIT_FLAGS type. In addition to introducing the new CORJIT_FLAGS type, the SSE/AVX flags are enabled for x86. The JIT-EE interface GUID is changed, as this is a breaking change.
2016-09-26Check PAL first, and then Windows Phone (#7354)Jonghyun Park1-4/+4
2016-09-22Generate CrossGen Pdbs as part of bulid (#7298)Vance Morrison1-0/+8
This change has two parts. The first part changes build.cmd and the pkgproj so that as part of generating a .NET Core package we also generate the PDBS for the Native System.Private.Corelib.ni.dll. The second part changes crossgen so that it marks the Native Images as having a list of 0 exports. This is important because we want the generated PDBs to be naturally published on the symbol server, and currently the symbol server skips DLLs what are 'resource only' (no imports or exports). Because native images don't use 'normal' PE imports and exports, they get optimized away by the symbol server. Making a empy list of exports fixes this.
2016-05-13Initial implementation of generic dictionary access for R2R. (#4519)Fadi Hanna1-26/+36
For now, only TypeHandle dictionary entry slots are supported and encoded in a R2R version resilient format (the rest to come soon). Support is only limited for x64 Windows platforms (rest is still TODO) The basic idea: each dictionary access is initally a call to a DynamicHelper R2R cell that computes the dictionary signature, and patches the R2R cell address with an assembly stub that performs the dictionary lookup.
2016-04-30Support generic methods without generic dictionaryJohn Chen (CLR)1-2/+4
2016-03-23Title: Hashtable of types for R2R modulesFadi Hanna1-0/+8
Description: This change replaces the hashtable of types that we dynamically build at module load time with a statically built hashtable at crossgen time, for R2R modules. Typedef tokens and exported type tokens are stored in that hashtable, hashed by their full type name. Changes include: - Adding support for NativeFormat hashtables (NativeFormat hashtable reader and writer + supporting functionalities) - Changes to prevent the allocation and building of m_pAvailableClasses and m_pAvailableClassesCaseIns for a R2R module - Logic in crossgen to build the hashtable of types, using the NativeFormat (table saved to a new section) - Refactoring the type lookup functions to return results in a HashedTypeEntry data structure, which supports token based results, as well as EEClassHashEntry_t* based results - Changes/Cleanup to the ClassLoader::GetClassValue to support the new lookup type - Fixed small bugs in the std implementation - Fallback to old hashtable lookup algorithm supported for: 1) Case insensitive type loading 2) R2R image built with older version of crossgen (not having static hashtable) Tested following scenarios: - Token based lookups - Type name based lookups (Type.GetType API), including case insensitive scenarios - Nested types - Forwarded types (and forwarded nested types), up to 2 levels of forwarding - Old R2R image created with previous version of crossgen
2016-03-09Delete dead codeJan Kotas1-1671/+26
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
2016-02-03Integrate changes from full .NET FrameworkJan Kotas1-4/+5
- Custom attribute to suppress NGen with method granularity - Static contract fixes - GC fix [tfs-changeset: 1571860]
2016-02-01Fix OACR errors for ProjectKdotnet-bot1-1/+1
[tfs-changeset: 1570939]
2016-01-28Modify crossgen to always set DLL bit in PE headerJohn Chen (CLR)1-0/+7
2016-01-27Update license headersdotnet-bot1-4/+3
2015-05-19Fix potential null pointer dereferenceJan Kotas1-0/+4
Calling WriteFile with both lpOverlapped and lpNumberOfBytesWritten set to null is invalid combination on Windows 7 [tfs-changeset: 1472978]
2015-04-29Fix warnings introduced by crossgenJohn Chen (CLR)1-2/+4
2015-04-28Build crossgen for LinuxJohn Chen (JOCHEN7)1-1/+4
- Crossgen is now built as part of coreclr - Crossgen successfully compiles mscorlib.dll - Resulting mscorlib.ni.dll not yet usable
2015-04-07Merge changes from parent branchdotnet-bot1-0/+74
[tfs-changeset: 1448103]
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+5325
[tfs-changeset: 1407945]