Skip to content

Commit

Permalink
Merge pull request #7128 from kangyining/reinitRestore
Browse files Browse the repository at this point in the history
Add reinitializeForRestore to GCExtBase
  • Loading branch information
babsingh authored Oct 10, 2023
2 parents 83cb598 + 18f006e commit 15a53fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions gc/base/GCExtensionsBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ MM_GCExtensionsBase::computeDefaultMaxHeap(MM_EnvironmentBase* env)
memoryMax = MM_Math::roundToFloor(heapAlignment, (uintptr_t)memoryToRequest);
}

void
MM_GCExtensionsBase::reinitializeForRestore(MM_EnvironmentBase* env)
{
OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary());
usablePhysicalMemory = omrsysinfo_get_addressable_physical_memory();
parSweepChunkSize = 0;
}

bool
MM_GCExtensionsBase::isSATBBarrierActive()
{
Expand Down
2 changes: 1 addition & 1 deletion gc/base/GCExtensionsBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ class MM_GCExtensionsBase : public MM_BaseVirtual {
virtual bool initialize(MM_EnvironmentBase* env);
virtual void tearDown(MM_EnvironmentBase* env);
virtual void computeDefaultMaxHeap(MM_EnvironmentBase* env);

virtual void reinitializeForRestore(MM_EnvironmentBase* env);
public:
static MM_GCExtensionsBase* newInstance(MM_EnvironmentBase* env);
virtual void kill(MM_EnvironmentBase* env);
Expand Down
1 change: 1 addition & 0 deletions gc/verbose/VerboseHandlerOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ MM_VerboseHandlerOutput::outputInitializedStanza(MM_EnvironmentBase *env, MM_Ver
buffer->formatAndOutput(env, 1, "<system>");
buffer->formatAndOutput(env, 2, "<attribute name=\"physicalMemory\" value=\"%llu\" />", omrsysinfo_get_physical_memory());
buffer->formatAndOutput(env, 2, "<attribute name=\"numCPUs\" value=\"%zu\" />", omrsysinfo_get_number_CPUs_by_type(OMRPORT_CPU_ONLINE));
buffer->formatAndOutput(env, 2, "<attribute name=\"numCPUs active\" value=\"%zu\" />", omrsysinfo_get_number_CPUs_by_type(OMRPORT_CPU_TARGET));
buffer->formatAndOutput(env, 2, "<attribute name=\"architecture\" value=\"%s\" />", omrsysinfo_get_CPU_architecture());
buffer->formatAndOutput(env, 2, "<attribute name=\"os\" value=\"%s\" />", omrsysinfo_get_OS_type());
buffer->formatAndOutput(env, 2, "<attribute name=\"osVersion\" value=\"%s\" />", omrsysinfo_get_OS_version());
Expand Down

0 comments on commit 15a53fa

Please sign in to comment.