// This is a mixed C-C++ header file that has a global section at the start // and a C++ section at the end, because asm_support.h is a C header file and // cannot include any C++ syntax.
// Global (C) part.
// Uncomment one of the following two and the two fields in // Object.java (libcore) to enable baker, or // table-lookup read barriers.
#ifdef ART_USE_READ_BARRIER #if ART_READ_BARRIER_TYPE_IS_BAKER #define USE_BAKER_READ_BARRIER #elif ART_READ_BARRIER_TYPE_IS_TABLELOOKUP #define USE_TABLE_LOOKUP_READ_BARRIER #else #error"ART read barrier type must be set" #endif #endif// ART_USE_READ_BARRIER
// Reserve marking register (and its refreshing logic) for all GCs as nterp // requires it. In the future if and when nterp is made independent of // read-barrier, we can switch back to the current behavior by making this // definition conditional on USE_BAKER_READ_BARRIER and setting // kReserveMarkingRegister to kUseBakerReadBarrier. #define RESERVE_MARKING_REGISTER
// Only if read-barrier isn't forced (see build/art.go) but is selected, that we need // to see if we support userfaultfd GC. All the other cases can be constexpr here. #ifdef ART_FORCE_USE_READ_BARRIER
constexpr bool gUseReadBarrier = kUseBakerReadBarrier || kUseTableLookupReadBarrier;
constexpr bool gUseUserfaultfd = !gUseReadBarrier;
static_assert(!gUseUserfaultfd); #else #ifndef ART_USE_READ_BARRIER
constexpr bool gUseReadBarrier = false; #ifdef ART_DEFAULT_GC_TYPE_IS_CMC
constexpr bool gUseUserfaultfd = true; #else
constexpr bool gUseUserfaultfd = false; #endif #else
EXPORT externconstbool gUseReadBarrier;
EXPORT externconstbool gUseUserfaultfd; #endif #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.