Skip to content

Commit

Permalink
Delete unused md/hotdata code (dotnet#57987)
Browse files Browse the repository at this point in the history
Hot/cold data from this folder was only used in NGEN/Crossgen1 scenarios, so it's dead now.
  • Loading branch information
jkoritzinsky authored Aug 24, 2021
1 parent 07b85a7 commit 65f795f
Show file tree
Hide file tree
Showing 40 changed files with 2 additions and 1,520 deletions.
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscordac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ set(COREDAC_LIBRARIES
${END_WHOLE_ARCHIVE}
dbgutil
mdcompiler_dac
mdhotdata_dac
mdruntime_dac
mdruntimerw_dac
utilcode_dac
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/dlls/mscordbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ set(COREDBI_LIBRARIES
if(CLR_CMAKE_HOST_WIN32)

list(APPEND COREDBI_LIBRARIES
mdhotdata-staticcrt
kernel32.lib
advapi32.lib
ole32.lib
Expand All @@ -93,7 +92,6 @@ if(CLR_CMAKE_HOST_WIN32)
elseif(CLR_CMAKE_HOST_UNIX)

list(APPEND COREDBI_LIBRARIES
mdhotdata_full
palrt
# share the PAL in the dac module
mscordaccore
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ set(CORECLR_LIBRARIES
mdcompiler_wks
mdruntime_wks
mdruntimerw_wks
mdhotdata_full
bcltype
ceefgen
comfloat_wks
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/ilasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ set(ILASM_LINK_LIBRARIES
utilcodestaticnohost
mscorpe
${START_LIBRARY_GROUP} # Start group of libraries that have circular references
mdhotdata_ppdb
mdcompiler_ppdb
mdruntime_ppdb
mdruntimerw_ppdb
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/ildasm/exe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ add_executable_clr(ildasm
set(ILDASM_LINK_LIBRARIES
${START_LIBRARY_GROUP} # Start group of libraries that have circular references
utilcodestaticnohost
mdhotdata_full
mdcompiler_wks
mdruntime_wks
mdruntimerw_wks
Expand Down
32 changes: 0 additions & 32 deletions src/coreclr/inc/corcompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ struct CORCOMPILE_METHOD_PROFILE_LIST
{ return (CORBBTPROF_METHOD_HEADER *) (this+1); }
};

// see code:CorProfileData.GetHotTokens for how we determine what is in hot meta-data.
class CorProfileData
{
public:
Expand All @@ -376,37 +375,6 @@ class CorProfileData
return this->blobStream;
}


// see code:MetaData::HotMetaDataHeader for details on reading hot meta-data
//
// for detail on where we use the API to store the hot meta data
// * code:CMiniMdRW.SaveFullTablesToStream#WritingHotMetaData
// * code:CMiniMdRW.SaveHotPoolsToStream
// * code:CMiniMdRW.SaveHotPoolToStream#CallToGetHotTokens
//
ULONG GetHotTokens(int table, DWORD mask, DWORD hotValue, mdToken *tokenBuffer, ULONG maxCount)
{
ULONG count = 0;
SectionFormat format = (SectionFormat)(FirstTokenFlagSection + table);

CORBBTPROF_TOKEN_INFO *profilingData = profilingTokenFlagsData[format].data;
DWORD cProfilingData = profilingTokenFlagsData[format].count;

if (profilingData != NULL)
{
for (DWORD i = 0; i < cProfilingData; i++)
{
if ((profilingData[i].flags & mask) == hotValue)
{
if (tokenBuffer != NULL && count < maxCount)
tokenBuffer[count] = profilingData[i].token;
count++;
}
}
}
return count;
}

//
// Token lookup methods
//
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/inc/metadatatracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class MetaDataTracker
return address;
}

// See the comment above CMiniMdRW::GetHotMetadataTokensSearchAware
__forceinline static void NoteSearch(void *result)
{
WRAPPER_NO_CONTRACT;
Expand Down
9 changes: 1 addition & 8 deletions src/coreclr/inc/stgpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "ex.h"
#include "sarray.h"
#include "memoryrange.h"
#include "../md/hotdata/hotheap.h"
#include "../md/datablob.h"

//*****************************************************************************
// NOTE:
Expand Down Expand Up @@ -379,13 +379,6 @@ friend class VerifyLayoutsMD;
WRAPPER_NO_CONTRACT;
return GetDataReadOnly(nOffset, pData);
} // StgPoolReadOnly::GetData

private:
#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES)
// hot pool data
MetaData::HotHeap m_HotHeap;
#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES))

}; // class StgPoolReadOnly

//
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/md/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ endif()
add_subdirectory(compiler)
add_subdirectory(runtime)
add_subdirectory(enc)
add_subdirectory(hotdata)
add_subdirectory(ceefilegen)
add_subdirectory(datasource)
add_subdirectory(staticmd)
1 change: 0 additions & 1 deletion src/coreclr/md/compiler/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <cor.h>
#include <corpriv.h>

#include "../hotdata/hotheap.h"
#include <metamodelro.h>
#include <liteweightstgdb.h>

Expand Down
12 changes: 0 additions & 12 deletions src/coreclr/md/datasource/targettypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,12 @@ HRESULT Target_CGuidPoolHash::ReadFrom(DataTargetReader & reader)
return S_OK;
}

Target_HotHeap::Target_HotHeap() :
m_pHotHeapHeader(0)
{}

HRESULT Target_HotHeap::ReadFrom(DataTargetReader & reader)
{
HRESULT hr = S_OK;
IfFailRet(reader.ReadPointer(&m_pHotHeapHeader));
return S_OK;
}

HRESULT Target_StgPoolReadOnly::ReadFrom(DataTargetReader & reader)
{
HRESULT hr = S_OK;
IfFailRet(reader.SkipPointer()); // __vfptr
IfFailRet(Target_StgPoolSeg::ReadFrom(reader));
reader.AlignBase();
IfFailRet(reader.Read(&m_HotHeap));
return S_OK;
}

Expand Down
11 changes: 0 additions & 11 deletions src/coreclr/md/datasource/targettypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,10 @@ class Target_StgPoolSeg : public TargetObject
ULONG32 m_cbSegNext;
};

class Target_HotHeap : public TargetObject
{
public:
Target_HotHeap();
virtual HRESULT ReadFrom(DataTargetReader & reader);

CORDB_ADDRESS m_pHotHeapHeader;
};

class Target_StgPoolReadOnly : public Target_StgPoolSeg
{
public:
virtual HRESULT ReadFrom(DataTargetReader & reader);

Target_HotHeap m_HotHeap;
};

class Target_StgPool : public Target_StgPoolReadOnly
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/md/enc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ set(MDRUNTIMERW_HEADERS
../../inc/sstring.inl
../compiler/importhelper.h
../compiler/regmeta.h
../hotdata/hotdataformat.h
../inc/liteweightstgdb.h
../inc/mdinternalrw.h
../inc/mdlog.h
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/md/enc/metamodelrw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include "metadata.h"
#include "streamutil.h"

#include "../hotdata/hotdataformat.h"

#ifdef _MSC_VER
#pragma intrinsic(memcpy)
#endif
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/md/enc/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <cor.h>
#include <corpriv.h>

#include "../hotdata/hotheap.h"
#include <metamodelro.h>
#include <liteweightstgdb.h>

Expand Down
48 changes: 0 additions & 48 deletions src/coreclr/md/hotdata/CMakeLists.txt

This file was deleted.

24 changes: 0 additions & 24 deletions src/coreclr/md/hotdata/export.h

This file was deleted.

19 changes: 0 additions & 19 deletions src/coreclr/md/hotdata/external.h

This file was deleted.

67 changes: 0 additions & 67 deletions src/coreclr/md/hotdata/heapindex.h

This file was deleted.

Loading

0 comments on commit 65f795f

Please sign in to comment.