Skip to content

Commit 4f01044

Browse files
Removal of IBC infrastructure (#68717)
* Removal of IBC infrastructure * Crossgen2 - remove tuning flag.
1 parent e71a46b commit 4f01044

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+194
-5354
lines changed

src/coreclr/classlibnative/bcltype/arraynative.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,9 +1081,6 @@ FCIMPL2_IV(void, ArrayNative::InitializeArray, ArrayBase* pArrayRef, FCALLRuntim
10811081
if (!pField->IsRVA())
10821082
COMPlusThrow(kArgumentException);
10831083

1084-
// Report the RVA field to the logger.
1085-
g_IBCLogger.LogRVADataAccess(pField);
1086-
10871084
// Note that we do not check that the field is actually in the PE file that is initializing
10881085
// the array. Basically the data being published is can be accessed by anyone with the proper
10891086
// permissions (C# marks these as assembly visibility, and thus are protected from outside
@@ -1161,9 +1158,6 @@ FCIMPL3_VVI(void*, ArrayNative::GetSpanDataFrom, FCALLRuntimeFieldHandle structF
11611158
DWORD totalSize = pField->LoadSize();
11621159
DWORD targetTypeSize = targetTypeHandle.GetSize();
11631160

1164-
// Report the RVA field to the logger.
1165-
g_IBCLogger.LogRVADataAccess(pField);
1166-
11671161
data = pField->GetStaticAddressHandle(NULL);
11681162
_ASSERTE(data != NULL);
11691163
_ASSERTE(count != NULL);

src/coreclr/inc/corbbtprof.h

Lines changed: 0 additions & 596 deletions
This file was deleted.

src/coreclr/inc/corcompile.h

Lines changed: 0 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
* *
1212
* *
1313
\*****************************************************************************/
14-
// See code:CorProfileData for information on Hot Cold splitting using profile data.
15-
1614

1715
#ifndef _COR_COMPILE_H_
1816
#define _COR_COMPILE_H_
@@ -24,7 +22,6 @@
2422
#include <sstring.h>
2523
#include <shash.h>
2624
#include <daccess.h>
27-
#include <corbbtprof.h>
2825
#include <clrtypes.h>
2926

3027
typedef DPTR(struct CORCOMPILE_EXCEPTION_LOOKUP_TABLE)
@@ -55,9 +52,6 @@ typedef DPTR(RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION;
5552

5653
#endif // TARGET_X86
5754

58-
59-
typedef DPTR(struct CORCOMPILE_METHOD_PROFILE_LIST)
60-
PTR_CORCOMPILE_METHOD_PROFILE_LIST;
6155
typedef DPTR(struct CORCOMPILE_RUNTIME_DLL_INFO)
6256
PTR_CORCOMPILE_RUNTIME_DLL_INFO;
6357
typedef DPTR(struct COR_ILMETHOD) PTR_COR_ILMETHOD;
@@ -290,167 +284,6 @@ struct CORCOMPILE_EXCEPTION_CLAUSE
290284
};
291285
};
292286

293-
294-
/*********************************************************************************/
295-
// The layout of this struct is required to be
296-
// a 'next' pointer followed by a CORBBTPROF_METHOD_HEADER
297-
//
298-
struct CORCOMPILE_METHOD_PROFILE_LIST
299-
{
300-
CORCOMPILE_METHOD_PROFILE_LIST * next;
301-
// CORBBTPROF_METHOD_HEADER info;
302-
303-
CORBBTPROF_METHOD_HEADER * GetInfo()
304-
{ return (CORBBTPROF_METHOD_HEADER *) (this+1); }
305-
};
306-
307-
class CorProfileData
308-
{
309-
public:
310-
CorProfileData(void * rawProfileData); // really of type ZapImage::ProfileDataSection*
311-
312-
struct CORBBTPROF_TOKEN_INFO * GetTokenFlagsData(SectionFormat section)
313-
{
314-
return this->profilingTokenFlagsData[section].data;
315-
}
316-
317-
DWORD GetTokenFlagsCount(SectionFormat section)
318-
{
319-
return this->profilingTokenFlagsData[section].count;
320-
}
321-
322-
CORBBTPROF_BLOB_ENTRY * GetBlobStream()
323-
{
324-
return this->blobStream;
325-
}
326-
327-
//
328-
// Token lookup methods
329-
//
330-
ULONG GetTypeProfilingFlagsOfToken(mdToken token)
331-
{
332-
_ASSERTE(TypeFromToken(token) == mdtTypeDef);
333-
return GetProfilingFlagsOfToken(token);
334-
}
335-
336-
CORBBTPROF_BLOB_PARAM_SIG_ENTRY *GetBlobSigEntry(mdToken token)
337-
{
338-
_ASSERTE((TypeFromToken(token) == ibcTypeSpec) || (TypeFromToken(token) == ibcMethodSpec));
339-
340-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = GetBlobEntry(token);
341-
if (pBlobEntry == NULL)
342-
return NULL;
343-
344-
_ASSERTE(pBlobEntry->token == token);
345-
_ASSERTE((pBlobEntry->type == ParamTypeSpec) || (pBlobEntry->type == ParamMethodSpec));
346-
347-
return (CORBBTPROF_BLOB_PARAM_SIG_ENTRY *) pBlobEntry;
348-
}
349-
350-
CORBBTPROF_BLOB_NAMESPACE_DEF_ENTRY *GetBlobExternalNamespaceDef(mdToken token)
351-
{
352-
_ASSERTE(TypeFromToken(token) == ibcExternalNamespace);
353-
354-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = GetBlobEntry(token);
355-
if (pBlobEntry == NULL)
356-
return NULL;
357-
358-
_ASSERTE(pBlobEntry->token == token);
359-
_ASSERTE(pBlobEntry->type == ExternalNamespaceDef);
360-
361-
return (CORBBTPROF_BLOB_NAMESPACE_DEF_ENTRY *) pBlobEntry;
362-
}
363-
364-
CORBBTPROF_BLOB_TYPE_DEF_ENTRY *GetBlobExternalTypeDef(mdToken token)
365-
{
366-
_ASSERTE(TypeFromToken(token) == ibcExternalType);
367-
368-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = GetBlobEntry(token);
369-
if (pBlobEntry == NULL)
370-
return NULL;
371-
372-
_ASSERTE(pBlobEntry->token == token);
373-
_ASSERTE(pBlobEntry->type == ExternalTypeDef);
374-
375-
return (CORBBTPROF_BLOB_TYPE_DEF_ENTRY *) pBlobEntry;
376-
}
377-
378-
CORBBTPROF_BLOB_SIGNATURE_DEF_ENTRY *GetBlobExternalSignatureDef(mdToken token)
379-
{
380-
_ASSERTE(TypeFromToken(token) == ibcExternalSignature);
381-
382-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = GetBlobEntry(token);
383-
if (pBlobEntry == NULL)
384-
return NULL;
385-
386-
_ASSERTE(pBlobEntry->token == token);
387-
_ASSERTE(pBlobEntry->type == ExternalSignatureDef);
388-
389-
return (CORBBTPROF_BLOB_SIGNATURE_DEF_ENTRY *) pBlobEntry;
390-
}
391-
392-
CORBBTPROF_BLOB_METHOD_DEF_ENTRY *GetBlobExternalMethodDef(mdToken token)
393-
{
394-
_ASSERTE(TypeFromToken(token) == ibcExternalMethod);
395-
396-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = GetBlobEntry(token);
397-
if (pBlobEntry == NULL)
398-
return NULL;
399-
400-
_ASSERTE(pBlobEntry->token == token);
401-
_ASSERTE(pBlobEntry->type == ExternalMethodDef);
402-
403-
return (CORBBTPROF_BLOB_METHOD_DEF_ENTRY *) pBlobEntry;
404-
}
405-
406-
private:
407-
ULONG GetProfilingFlagsOfToken(mdToken token)
408-
{
409-
SectionFormat section = (SectionFormat)((TypeFromToken(token) >> 24) + FirstTokenFlagSection);
410-
411-
CORBBTPROF_TOKEN_INFO *profilingData = this->profilingTokenFlagsData[section].data;
412-
DWORD cProfilingData = this->profilingTokenFlagsData[section].count;
413-
414-
if (profilingData != NULL)
415-
{
416-
for (DWORD i = 0; i < cProfilingData; i++)
417-
{
418-
if (profilingData[i].token == token)
419-
return profilingData[i].flags;
420-
}
421-
}
422-
return 0;
423-
}
424-
425-
CORBBTPROF_BLOB_ENTRY *GetBlobEntry(idTypeSpec token)
426-
{
427-
CORBBTPROF_BLOB_ENTRY * pBlobEntry = this->GetBlobStream();
428-
if (pBlobEntry == NULL)
429-
return NULL;
430-
431-
while (pBlobEntry->TypeIsValid())
432-
{
433-
if (pBlobEntry->token == token)
434-
{
435-
return pBlobEntry;
436-
}
437-
pBlobEntry = pBlobEntry->GetNextEntry();
438-
}
439-
440-
return NULL;
441-
}
442-
443-
private:
444-
struct
445-
{
446-
struct CORBBTPROF_TOKEN_INFO *data;
447-
DWORD count;
448-
}
449-
profilingTokenFlagsData[SectionFormatCount];
450-
451-
CORBBTPROF_BLOB_ENTRY* blobStream;
452-
};
453-
454287
/*********************************************************************************/
455288
// When NGEN install /Profile is run, the ZapProfilingHandleImport fixup table contains
456289
// these 5 values per MethodDesc

src/coreclr/inc/mdcommon.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ enum MAPPINGTYPE
3737
#define COMPRESSED_MODEL_STREAM_A "#~"
3838
#define ENC_MODEL_STREAM_A "#-"
3939
#define MINIMAL_MD_STREAM_A "#JTD"
40-
#define HOT_MODEL_STREAM_A "#!"
4140
#ifdef FEATURE_METADATA_EMIT_PORTABLE_PDB
4241
#define PDB_STREAM_A "#Pdb"
4342
#endif // FEATURE_METADATA_EMIT_PORTABLE_PDB
@@ -50,7 +49,6 @@ enum MAPPINGTYPE
5049
#define COMPRESSED_MODEL_STREAM W("#~")
5150
#define ENC_MODEL_STREAM W("#-")
5251
#define MINIMAL_MD_STREAM W("#JTD")
53-
#define HOT_MODEL_STREAM W("#!")
5452
#ifdef FEATURE_METADATA_EMIT_PORTABLE_PDB
5553
#define PDB_STREAM W("#Pdb")
5654
#endif // FEATURE_METADATA_EMIT_PORTABLE_PDB

src/coreclr/inc/metadata.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "ex.h"
1717

18-
class CorProfileData;
1918
class IMetaModelCommon;
2019
class MDInternalRW;
2120
class UTSemReadWrite;

src/coreclr/inc/stgpool.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const int DFT_CODE_HEAP_SIZE = 8192;
4949
class StgStringPool;
5050
class StgBlobPool;
5151
class StgCodePool;
52-
class CorProfileData;
5352

5453
// Perform binary search on index table.
5554
//

src/coreclr/md/compiler/regmeta.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ RegMeta::RegMeta() :
6767
m_SetAPICaller(EXTERNAL_CALLER),
6868
m_ModuleType(ValidatorModuleTypeInvalid),
6969
m_bKeepKnownCa(false),
70-
m_pCorProfileData(NULL),
7170
m_ReorderingOptions(NoReordering)
7271
#ifdef FEATURE_METADATA_RELEASE_MEMORY_ON_REOPEN
7372
, m_safeToDeleteStgdb(true)

src/coreclr/md/compiler/regmeta.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,8 +2059,6 @@ class RegMeta :
20592059

20602060
bool m_bKeepKnownCa; // Should all known CA's be kept?
20612061

2062-
CorProfileData *m_pCorProfileData;
2063-
20642062
MetaDataReorderingOptions m_ReorderingOptions;
20652063

20662064
#ifdef FEATURE_METADATA_RELEASE_MEMORY_ON_REOPEN

src/coreclr/md/compiler/regmeta_emit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ HRESULT RegMeta::_SaveToStream( // S_OK or error.
172172
HRESULT hr=S_OK;
173173

174174
IfFailGo(PreSave());
175-
IfFailGo( m_pStgdb->SaveToStream(pIStream, m_ReorderingOptions, m_pCorProfileData) );
175+
IfFailGo( m_pStgdb->SaveToStream(pIStream, m_ReorderingOptions) );
176176

177177
// Reset m_bSaveOptimized, this is to handle the incremental and ENC
178178
// scenerios where one may do multiple saves.
@@ -281,7 +281,7 @@ STDMETHODIMP RegMeta::GetSaveSize( // S_OK or error.
281281

282282
IfFailGo(PreSave());
283283

284-
hr = m_pStgdb->GetSaveSize(fSave, (UINT32 *)pdwSaveSize, m_ReorderingOptions, m_pCorProfileData);
284+
hr = m_pStgdb->GetSaveSize(fSave, (UINT32 *)pdwSaveSize, m_ReorderingOptions);
285285

286286
ErrExit:
287287
STOP_MD_PERF(GetSaveSize);
@@ -792,7 +792,7 @@ HRESULT RegMeta::PreSave() // Return code.
792792
m_bSaveOptimized = true;
793793

794794
// call get save size to trigger the PreSaveXXX on MetaModelRW class.
795-
IfFailGo(m_pStgdb->m_MiniMd.PreSave(m_ReorderingOptions, m_pCorProfileData));
795+
IfFailGo(m_pStgdb->m_MiniMd.PreSave(m_ReorderingOptions));
796796

797797
ErrExit:
798798
m_bRemap = bRemapOld;

0 commit comments

Comments
 (0)