Skip to content

Commit

Permalink
changed frequently used redhawk mentions. (#69962)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanta10 authored May 29, 2022
1 parent 1466e40 commit 4719135
Show file tree
Hide file tree
Showing 42 changed files with 402 additions and 402 deletions.
40 changes: 20 additions & 20 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4379,7 +4379,7 @@ class CObjectHeader : public Object
{
public:

#if defined(FEATURE_REDHAWK) || defined(BUILD_AS_STANDALONE)
#if defined(FEATURE_NATIVEAOT) || defined(BUILD_AS_STANDALONE)
// The GC expects the following methods that are provided by the Object class in the CLR but not provided
// by Redhawk's version of Object.
uint32_t GetNumComponents()
Expand Down Expand Up @@ -4410,7 +4410,7 @@ class CObjectHeader : public Object
_ASSERTE(IsStructAligned((uint8_t *)this, GetMethodTable()->GetBaseAlignment()));
#endif // FEATURE_STRUCTALIGN

#if defined(FEATURE_64BIT_ALIGNMENT) && !defined(FEATURE_REDHAWK)
#if defined(FEATURE_64BIT_ALIGNMENT) && !defined(FEATURE_NATIVEAOT)
if (pMT->RequiresAlign8())
{
_ASSERTE((((size_t)this) & 0x7) == (pMT->IsValueType() ? 4U : 0U));
Expand All @@ -4436,7 +4436,7 @@ class CObjectHeader : public Object
Validate(bDeep);
}

#endif //FEATURE_REDHAWK || BUILD_AS_STANDALONE
#endif //FEATURE_NATIVEAOT || BUILD_AS_STANDALONE

/////
//
Expand Down Expand Up @@ -6782,7 +6782,7 @@ void gc_heap::gc_thread_function ()

bool gc_heap::virtual_alloc_commit_for_heap (void* addr, size_t size, int h_number)
{
#if defined(MULTIPLE_HEAPS) && !defined(FEATURE_REDHAWK)
#if defined(MULTIPLE_HEAPS) && !defined(FEATURE_NATIVEAOT)
// Currently there is no way for us to specific the numa node to allocate on via hosting interfaces to
// a host. This will need to be added later.
#if !defined(FEATURE_CORECLR) && !defined(BUILD_AS_STANDALONE)
Expand All @@ -6796,9 +6796,9 @@ bool gc_heap::virtual_alloc_commit_for_heap (void* addr, size_t size, int h_numb
return true;
}
}
#else //MULTIPLE_HEAPS && !FEATURE_REDHAWK
#else //MULTIPLE_HEAPS && !FEATURE_NATIVEAOT
UNREFERENCED_PARAMETER(h_number);
#endif //MULTIPLE_HEAPS && !FEATURE_REDHAWK
#endif //MULTIPLE_HEAPS && !FEATURE_NATIVEAOT

//numa aware not enabled, or call failed --> fallback to VirtualCommit()
return GCToOSInterface::VirtualCommit(addr, size);
Expand Down Expand Up @@ -19433,7 +19433,7 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation,
if (n_original != max_generation &&
g_pConfig->GetGCStressLevel() && gc_can_use_concurrent)
{
#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
if (*blocking_collection_p)
{
// We call StressHeap() a lot for Concurrent GC Stress. However,
Expand All @@ -19442,7 +19442,7 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation,
GCStressPolicy::GlobalDisable();
}
else
#endif // !FEATURE_REDHAWK
#endif // !FEATURE_NATIVEAOT
{
gc_data_global.gen_to_condemn_reasons.set_condition(gen_joined_stress);
n = max_generation;
Expand Down Expand Up @@ -20731,10 +20731,10 @@ void gc_heap::gc1()
if (!settings.concurrent)
#endif //BACKGROUND_GC
{
#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
// GCToEEInterface::IsGCThread() always returns false on NativeAOT, but this assert is useful in CoreCLR.
assert(GCToEEInterface::IsGCThread());
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT
adjust_ephemeral_limits();
}

Expand Down Expand Up @@ -40195,11 +40195,11 @@ BOOL gc_heap::decide_on_compacting (int condemned_gen_number,
}
#endif //USE_REGIONS

#if defined(STRESS_HEAP) && !defined(FEATURE_REDHAWK)
#if defined(STRESS_HEAP) && !defined(FEATURE_NATIVEAOT)
// for GC stress runs we need compaction
if (GCStress<cfg_any>::IsEnabled() && !settings.concurrent)
should_compact = TRUE;
#endif //defined(STRESS_HEAP) && !defined(FEATURE_REDHAWK)
#endif //defined(STRESS_HEAP) && !defined(FEATURE_NATIVEAOT)

if (GCConfig::GetForceCompact())
should_compact = TRUE;
Expand Down Expand Up @@ -42606,14 +42606,14 @@ CFinalize* GCHeap::m_Finalize = 0;
BOOL GCHeap::GcCollectClasses = FALSE;
VOLATILE(int32_t) GCHeap::m_GCFLock = 0;

#ifndef FEATURE_REDHAWK // Redhawk forces relocation a different way
#ifndef FEATURE_NATIVEAOT // Redhawk forces relocation a different way
#ifdef STRESS_HEAP
#ifndef MULTIPLE_HEAPS
OBJECTHANDLE GCHeap::m_StressObjs[NUM_HEAP_STRESS_OBJS];
int GCHeap::m_CurStressObj = 0;
#endif // !MULTIPLE_HEAPS
#endif // STRESS_HEAP
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT

#endif //FEATURE_PREMORTEM_FINALIZATION

Expand Down Expand Up @@ -44118,7 +44118,7 @@ HRESULT GCHeap::Initialize()
return E_FAIL;
}

#ifndef FEATURE_REDHAWK // Redhawk forces relocation a different way
#ifndef FEATURE_NATIVEAOT // Redhawk forces relocation a different way
#if defined (STRESS_HEAP) && !defined (MULTIPLE_HEAPS)
if (GCStress<cfg_any>::IsEnabled())
{
Expand All @@ -44129,7 +44129,7 @@ HRESULT GCHeap::Initialize()
m_CurStressObj = 0;
}
#endif //STRESS_HEAP && !MULTIPLE_HEAPS
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT

initGCShadow(); // If we are debugging write barriers, initialize heap shadow

Expand Down Expand Up @@ -44636,7 +44636,7 @@ void GCHeap::Relocate (Object** ppObject, ScanContext* sc,
return size( pObj ) >= loh_size_threshold;
}

#ifndef FEATURE_REDHAWK // Redhawk forces relocation a different way
#ifndef FEATURE_NATIVEAOT // Redhawk forces relocation a different way
#ifdef STRESS_HEAP

void StressHeapDummy ();
Expand All @@ -44662,13 +44662,13 @@ int StressRNG(int iMaxValue)
return randValue % iMaxValue;
}
#endif // STRESS_HEAP
#endif // !FEATURE_REDHAWK
#endif // !FEATURE_NATIVEAOT

// free up object so that things will move and then do a GC
//return TRUE if GC actually happens, otherwise FALSE
bool GCHeap::StressHeap(gc_alloc_context * context)
{
#if defined(STRESS_HEAP) && !defined(FEATURE_REDHAWK)
#if defined(STRESS_HEAP) && !defined(FEATURE_NATIVEAOT)
alloc_context* acontext = static_cast<alloc_context*>(context);
assert(context != nullptr);

Expand Down Expand Up @@ -44809,7 +44809,7 @@ bool GCHeap::StressHeap(gc_alloc_context * context)
#else
UNREFERENCED_PARAMETER(context);
return FALSE;
#endif //STRESS_HEAP && !FEATURE_REDHAWK
#endif //STRESS_HEAP && !FEATURE_NATIVEAOT
}

#ifdef FEATURE_PREMORTEM_FINALIZATION
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/gc/gcdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class CGCDesc
}
}

#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
if (pMT->Collectible())
{
NumOfPointers += 1;
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/gc/gcee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ void GCHeap::UpdatePostGCCounters()
size_t promoted_finalization_mem = 0;
size_t total_num_pinned_objects = gc_heap::get_total_pinned_objects();

#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
// if a max gen garbage collection was performed, resync the GC Handle counter;
// if threads are currently suspended, we do not need to obtain a lock on each handle table
if (condemned_gen == max_generation)
total_num_gc_handles = HndCountAllHandles(!IsGCInProgress());
#endif //FEATURE_REDHAWK
#endif //FEATURE_NATIVEAOT

// per generation calculation.
for (int gen_index = 0; gen_index < total_generation_count; gen_index++)
Expand Down Expand Up @@ -330,7 +330,7 @@ void gc_heap::fire_etw_allocation_event (size_t allocation_amount,
uint8_t* object_address,
size_t object_size)
{
#ifdef FEATURE_REDHAWK
#ifdef FEATURE_NATIVEAOT
FIRE_EVENT(GCAllocationTick_V1, (uint32_t)allocation_amount, (uint32_t)gen_to_oh (gen_number));
#else
FIRE_EVENT(GCAllocationTick_V4,
Expand All @@ -339,7 +339,7 @@ void gc_heap::fire_etw_allocation_event (size_t allocation_amount,
heap_number,
object_address,
object_size);
#endif //FEATURE_REDHAWK
#endif //FEATURE_NATIVEAOT
}

void gc_heap::fire_etw_pin_object_event (uint8_t* object, uint8_t** ppObject)
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/gc/gchandletable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ IGCHandleStore* GCHandleManager::GetGlobalHandleStore()

IGCHandleStore* GCHandleManager::CreateHandleStore()
{
#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
GCHandleStore* store = new (nothrow) GCHandleStore();
if (store == nullptr)
{
Expand All @@ -99,7 +99,7 @@ IGCHandleStore* GCHandleManager::CreateHandleStore()

return store;
#else
assert(!"CreateHandleStore is not implemented when FEATURE_REDHAWK is defined!");
assert(!"CreateHandleStore is not implemented when FEATURE_NATIVEAOT is defined!");
return nullptr;
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/gc/gcimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class GCHeap : public IGCHeapInternal
//return TRUE if GC actually happens, otherwise FALSE
bool StressHeap(gc_alloc_context * acontext);

#ifndef FEATURE_REDHAWK // Redhawk forces relocation a different way
#ifndef FEATURE_NATIVEAOT // Redhawk forces relocation a different way
#ifdef STRESS_HEAP
protected:

Expand All @@ -292,7 +292,7 @@ class GCHeap : public IGCHeapInternal
PER_HEAP int m_CurStressObj;
#endif // !defined(MULTIPLE_HEAPS)
#endif // STRESS_HEAP
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT

virtual void DiagDescrGenerations (gen_walk_fn fn, void *context);

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/gc/gcload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ GC_Initialize(
// various components may want to query the current configuration.
GCConfig::Initialize();

#ifndef FEATURE_REDHAWK // GCToOSInterface is initialized directly
#ifndef FEATURE_NATIVEAOT // GCToOSInterface is initialized directly
if (!GCToOSInterface::Initialize())
{
return E_FAIL;
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ inline void FATAL_GC_ERROR()
// This means any empty regions can be freely used for any generation. For
// Server GC we will balance regions between heaps.
// For now disable regions for StandAlone GC, NativeAOT and MacOS builds
#if defined (HOST_64BIT) && !defined (BUILD_AS_STANDALONE) && !defined(__APPLE__) && !defined(FEATURE_REDHAWK)
#if defined (HOST_64BIT) && !defined (BUILD_AS_STANDALONE) && !defined(__APPLE__) && !defined(FEATURE_NATIVEAOT)
#define USE_REGIONS
#endif //HOST_64BIT && BUILD_AS_STANDALONE

Expand Down Expand Up @@ -92,10 +92,10 @@ inline void FATAL_GC_ERROR()
#define DOUBLY_LINKED_FL
#endif //HOST_64BIT

#ifndef FEATURE_REDHAWK
#ifndef FEATURE_NATIVEAOT
#define HEAP_ANALYZE
#define COLLECTIBLE_CLASS
#endif // !FEATURE_REDHAWK
#endif // !FEATURE_NATIVEAOT

#ifdef HEAP_ANALYZE
#define initial_internal_roots (1024*16)
Expand Down Expand Up @@ -269,12 +269,12 @@ void GCLog (const char *fmt, ... );
#define dprintf(l,x)
#endif //TRACE_GC

#if !defined(FEATURE_REDHAWK) && !defined(BUILD_AS_STANDALONE)
#if !defined(FEATURE_NATIVEAOT) && !defined(BUILD_AS_STANDALONE)
#undef assert
#define assert _ASSERTE
#undef ASSERT
#define ASSERT _ASSERTE
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT

struct GCDebugSpinLock {
VOLATILE(int32_t) lock; // -1 if free, 0 if held
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/gc/gcscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ size_t GCScan::AskForMoreReservedMemory (size_t old_size, size_t need_size)
{
LIMITED_METHOD_CONTRACT;

#if !defined(FEATURE_CORECLR) && !defined(FEATURE_REDHAWK)
#if !defined(FEATURE_CORECLR) && !defined(FEATURE_NATIVEAOT)
// call the host....

IGCHostControl *pGCHostControl = CorHost::GetGCHostControl();
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/gc/handletablescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,13 @@ void CALLBACK BlockResetAgeMapForBlocks(TableSegment *pSegment, uint32_t uBlock,

static void VerifyObject(_UNCHECKED_OBJECTREF from, _UNCHECKED_OBJECTREF obj)
{
#if defined(FEATURE_REDHAWK) || defined(BUILD_AS_STANDALONE)
#if defined(FEATURE_NATIVEAOT) || defined(BUILD_AS_STANDALONE)
UNREFERENCED_PARAMETER(from);
MethodTable* pMT = (MethodTable*)(obj->GetGCSafeMethodTable());
pMT->SanityCheck();
#else
obj->ValidateHeap();
#endif // FEATURE_REDHAWK
#endif // FEATURE_NATIVEAOT
}

static void VerifyObjectAndAge(_UNCHECKED_OBJECTREF from, _UNCHECKED_OBJECTREF obj, uint8_t minAge)
Expand Down
Loading

0 comments on commit 4719135

Please sign in to comment.