Skip to content

Commit a09c14a

Browse files
committed
Minor cleanup with forceOutOfLineVMAccess()
As part of preparation for more usage in near future: - remove the assert it's used only for Concurrent Scavenger (the call sites will check if CS is enabled or not prior to calling) - remove #ifdefs, to not force call sites to use it too, hence resulting in easier to read code. The amount of code behind it is small and there is no real reason to hide it under ifdef even for non CS configuration. Signed-off-by: Aleksandar Micic <amicic@ca.ibm.com>
1 parent 32fb64b commit a09c14a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

runtime/gc_glue_java/EnvironmentDelegate.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2018 IBM Corp. and others
2+
* Copyright (c) 2017, 2019 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -248,15 +248,12 @@ MM_EnvironmentDelegate::reacquireCriticalHeapAccess(uintptr_t data)
248248
VM_VMAccess::clearPublicFlags(vmThread, J9_PUBLIC_FLAGS_NOT_AT_SAFE_POINT);
249249
}
250250

251-
#if defined(OMR_GC_CONCURRENT_SCAVENGER)
252251
void
253252
MM_EnvironmentDelegate::forceOutOfLineVMAccess()
254253
{
255-
Assert_MM_true(MM_GCExtensions::getExtensions(_env->getOmrVM())->concurrentScavenger);
256-
J9VMThread *vmThread = (J9VMThread *)_env->getOmrVMThread()->_language_vmthread;
254+
J9VMThread *vmThread = (J9VMThread *)_env->getLanguageVMThread();
257255
VM_VMAccess::setPublicFlags(vmThread, J9_PUBLIC_FLAGS_DISABLE_INLINE_VM_ACCESS_ACQUIRE);
258256
}
259-
#endif /* OMR_GC_CONCURRENT_SCAVENGER */
260257

261258
#if defined (J9VM_GC_THREAD_LOCAL_HEAP)
262259
/**

runtime/gc_glue_java/EnvironmentDelegate.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*******************************************************************************
3-
* Copyright (c) 2017, 2018 IBM Corp. and others
3+
* Copyright (c) 2017, 2019 IBM Corp. and others
44
*
55
* This program and the accompanying materials are made available under
66
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -151,9 +151,7 @@ class MM_EnvironmentDelegate
151151

152152
void reacquireCriticalHeapAccess(uintptr_t data);
153153

154-
#if defined(OMR_GC_CONCURRENT_SCAVENGER)
155154
void forceOutOfLineVMAccess();
156-
#endif /* OMR_GC_CONCURRENT_SCAVENGER */
157155

158156
#if defined (OMR_GC_THREAD_LOCAL_HEAP)
159157
/**

0 commit comments

Comments
 (0)