diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2018-10-16 16:42:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 16:42:33 -0700 |
commit | afb6185394511fb30c9278d40d6e6e2ca59cb6f8 (patch) | |
tree | a98a24851941c32785b891580bfd28574cac08d1 /src/vm/threadstatics.cpp | |
parent | 5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4 (diff) | |
download | coreclr-afb6185394511fb30c9278d40d6e6e2ca59cb6f8.tar.gz coreclr-afb6185394511fb30c9278d40d6e6e2ca59cb6f8.tar.bz2 coreclr-afb6185394511fb30c9278d40d6e6e2ca59cb6f8.zip |
Remove per-AppDomain TLB (#20423)
Since there is only one AppDomain, there is no need for a per-AppDomain
TLB table for each Thread. This change removes that table and thus gets
rid of the extra indirection needed to access the TLB.
Diffstat (limited to 'src/vm/threadstatics.cpp')
-rw-r--r-- | src/vm/threadstatics.cpp | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/vm/threadstatics.cpp b/src/vm/threadstatics.cpp index 7e9a9da987..dcfc082927 100644 --- a/src/vm/threadstatics.cpp +++ b/src/vm/threadstatics.cpp @@ -697,7 +697,7 @@ PTR_ThreadLocalModule ThreadStatics::GetTLM(MethodTable * pMT) //static return GetTLM(pModule->GetModuleIndex(), pModule); } -PTR_ThreadLocalBlock ThreadStatics::AllocateTLB(PTR_Thread pThread, ADIndex index) //static +PTR_ThreadLocalBlock ThreadStatics::AllocateTLB(PTR_Thread pThread) //static { CONTRACTL { @@ -709,22 +709,10 @@ PTR_ThreadLocalBlock ThreadStatics::AllocateTLB(PTR_Thread pThread, ADIndex inde CONTRACTL_END; _ASSERTE(pThread->m_pThreadLocalBlock == NULL); - // Grow the TLB table so that it has room to store the newly allocated - // ThreadLocalBlock. If this growing the table fails we cannot proceed. - ThreadStatics::EnsureADIndex(pThread, index); - // Allocate a new TLB and update this Thread's pointer to the current // ThreadLocalBlock. Constructor zeroes out everything for us. pThread->m_pThreadLocalBlock = new ThreadLocalBlock(); - // Store the newly allocated ThreadLocalBlock in the TLB table - if (pThread->m_pThreadLocalBlock != NULL) - { - // We grew the TLB table earlier, so it should have room - _ASSERTE(index.m_dwIndex >= 0 && index.m_dwIndex < pThread->m_TLBTableSize); - pThread->m_pTLBTable[index.m_dwIndex] = pThread->m_pThreadLocalBlock; - } - return pThread->m_pThreadLocalBlock; } @@ -758,24 +746,3 @@ PTR_ThreadLocalModule ThreadStatics::AllocateTLM(Module * pModule) } #endif - -PTR_ThreadLocalBlock ThreadStatics::GetTLBIfExists(PTR_Thread pThread, ADIndex index) //static -{ - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - SUPPORTS_DAC; - SO_TOLERANT; - } - CONTRACTL_END; - - // Check to see if we have a ThreadLocalBlock for the this AppDomain, - if (index.m_dwIndex < pThread->m_TLBTableSize) - { - return pThread->m_pTLBTable[index.m_dwIndex]; - } - - return NULL; -} |