Skip to content

Commit

Permalink
Remove unused global memoryAllocMonitor definition
Browse files Browse the repository at this point in the history
The global memoryAllocMonitor is no longer used by the persistent
allocator in OpenJ9, hence its definition in OMR can now be removed.

Signed-off-by: Alexey Khrabrov <khrabrov@cs.toronto.edu>
  • Loading branch information
AlexeyKhrabrov committed Apr 20, 2021
1 parent 840473a commit e822618
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion compiler/env/TRPersistentMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
namespace TR { class Compilation; }
namespace TR { class PersistentInfo; }

extern TR::Monitor *memoryAllocMonitor;
extern const char * objectName[];

namespace TR
Expand Down
4 changes: 1 addition & 3 deletions compiler/infra/OMRMonitor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2018 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -29,8 +29,6 @@

TR::MonitorTable *OMR::MonitorTable::_instance = 0;

TR::Monitor *memoryAllocMonitor = NULL;

void *
OMR::Monitor::operator new(size_t size)
{
Expand Down
7 changes: 1 addition & 6 deletions compiler/infra/OMRMonitorTable.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -46,7 +46,6 @@ class OMR_EXTENSIBLE MonitorTable
void free() { TR_UNIMPLEMENTED(); }
void removeAndDestroy(TR::Monitor *monitor) { TR_UNIMPLEMENTED(); }

TR::Monitor *getMemoryAllocMonitor() { return _memoryAllocMonitor; }
TR::Monitor *getScratchMemoryPoolMonitor() { return _scratchMemoryPoolMonitor; }

protected:
Expand All @@ -55,10 +54,6 @@ class OMR_EXTENSIBLE MonitorTable

static TR::MonitorTable *_instance;

// Used by TR_PersistentMemory
//
TR::Monitor *_memoryAllocMonitor;

// Used by SCRATCH segments allocations
// A copy of this goes into TR_PersistentMemory as well
//
Expand Down

0 comments on commit e822618

Please sign in to comment.