Remove superfluous 'virtual' specifiers in ART.
Remove 'virtual' specifier on methods already bearing the 'override'
specifier.
Test: mmma art
Change-Id: I114930969a5ca048d88de9ecd18e2c6403593e31
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index fd7a35f..21975de 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -971,7 +971,7 @@
public:
ResolveCatchBlockExceptionsClassVisitor() : classes_() {}
- virtual bool operator()(ObjPtr<mirror::Class> c) override REQUIRES_SHARED(Locks::mutator_lock_) {
+ bool operator()(ObjPtr<mirror::Class> c) override REQUIRES_SHARED(Locks::mutator_lock_) {
classes_.push_back(c);
return true;
}
@@ -1888,7 +1888,7 @@
VerifyClassVisitor(const ParallelCompilationManager* manager, verifier::HardFailLogMode log_level)
: manager_(manager), log_level_(log_level) {}
- virtual void Visit(size_t class_def_index) REQUIRES(!Locks::mutator_lock_) override {
+ void Visit(size_t class_def_index) REQUIRES(!Locks::mutator_lock_) override {
ScopedTrace trace(__FUNCTION__);
ScopedObjectAccess soa(Thread::Current());
const DexFile& dex_file = *manager_->GetDexFile();
@@ -2020,7 +2020,7 @@
public:
explicit SetVerifiedClassVisitor(const ParallelCompilationManager* manager) : manager_(manager) {}
- virtual void Visit(size_t class_def_index) REQUIRES(!Locks::mutator_lock_) override {
+ void Visit(size_t class_def_index) REQUIRES(!Locks::mutator_lock_) override {
ScopedTrace trace(__FUNCTION__);
ScopedObjectAccess soa(Thread::Current());
const DexFile& dex_file = *manager_->GetDexFile();
@@ -2470,7 +2470,7 @@
explicit InitializeArrayClassesAndCreateConflictTablesVisitor(VariableSizedHandleScope& hs)
: hs_(hs) {}
- virtual bool operator()(ObjPtr<mirror::Class> klass) override
+ bool operator()(ObjPtr<mirror::Class> klass) override
REQUIRES_SHARED(Locks::mutator_lock_) {
if (Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(klass)) {
return true;
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h
index e0c2992..e6130cf 100644
--- a/compiler/utils/jni_macro_assembler.h
+++ b/compiler/utils/jni_macro_assembler.h
@@ -299,7 +299,7 @@
JNIMacroLabelCommon() : JNIMacroLabel(kIsa) {
}
- virtual ~JNIMacroLabelCommon() override {}
+ ~JNIMacroLabelCommon() override {}
private:
PlatformLabel label_;
diff --git a/compiler/utils/x86/jni_macro_assembler_x86.cc b/compiler/utils/x86/jni_macro_assembler_x86.cc
index df946bd..540d72b 100644
--- a/compiler/utils/x86/jni_macro_assembler_x86.cc
+++ b/compiler/utils/x86/jni_macro_assembler_x86.cc
@@ -28,7 +28,7 @@
class X86ExceptionSlowPath final : public SlowPath {
public:
explicit X86ExceptionSlowPath(size_t stack_adjust) : stack_adjust_(stack_adjust) {}
- virtual void Emit(Assembler *sp_asm) override;
+ void Emit(Assembler *sp_asm) override;
private:
const size_t stack_adjust_;
};
diff --git a/compiler/utils/x86_64/jni_macro_assembler_x86_64.cc b/compiler/utils/x86_64/jni_macro_assembler_x86_64.cc
index d5c0878..5924a8b 100644
--- a/compiler/utils/x86_64/jni_macro_assembler_x86_64.cc
+++ b/compiler/utils/x86_64/jni_macro_assembler_x86_64.cc
@@ -577,7 +577,7 @@
class X86_64ExceptionSlowPath final : public SlowPath {
public:
explicit X86_64ExceptionSlowPath(size_t stack_adjust) : stack_adjust_(stack_adjust) {}
- virtual void Emit(Assembler *sp_asm) override;
+ void Emit(Assembler *sp_asm) override;
private:
const size_t stack_adjust_;
};
diff --git a/compiler/utils/x86_64/jni_macro_assembler_x86_64.h b/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
index 4411558..465ebbe 100644
--- a/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
+++ b/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
@@ -165,7 +165,7 @@
bool null_allowed) override;
// src holds a handle scope entry (Object**) load this into dst
- virtual void LoadReferenceFromHandleScope(ManagedRegister dst, ManagedRegister src) override;
+ void LoadReferenceFromHandleScope(ManagedRegister dst, ManagedRegister src) override;
// Heap::VerifyObject on src. In some cases (such as a reference to this) we
// know that src may not be null.
diff --git a/dex2oat/dex2oat_image_test.cc b/dex2oat/dex2oat_image_test.cc
index 60dba99..e047b4f 100644
--- a/dex2oat/dex2oat_image_test.cc
+++ b/dex2oat/dex2oat_image_test.cc
@@ -52,7 +52,7 @@
class Dex2oatImageTest : public CommonRuntimeTest {
public:
- virtual void TearDown() override {}
+ void TearDown() override {}
protected:
// Visitors take method and type references
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index 5fc3da4..b2fe441 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -55,7 +55,7 @@
class Dex2oatTest : public Dex2oatEnvironmentTest {
public:
- virtual void TearDown() override {
+ void TearDown() override {
Dex2oatEnvironmentTest::TearDown();
output_ = "";
diff --git a/dex2oat/linker/elf_writer_quick.cc b/dex2oat/linker/elf_writer_quick.cc
index 194a0e1..852293b 100644
--- a/dex2oat/linker/elf_writer_quick.cc
+++ b/dex2oat/linker/elf_writer_quick.cc
@@ -120,7 +120,7 @@
bool StripDebugInfo() override;
bool End() override;
- virtual OutputStream* GetStream() override;
+ OutputStream* GetStream() override;
size_t GetLoadedSize() override;
diff --git a/dex2oat/linker/image_writer.cc b/dex2oat/linker/image_writer.cc
index 97d82d9..6a13454 100644
--- a/dex2oat/linker/image_writer.cc
+++ b/dex2oat/linker/image_writer.cc
@@ -1022,7 +1022,7 @@
explicit PruneClassLoaderClassesVisitor(ImageWriter* image_writer)
: image_writer_(image_writer), removed_class_count_(0) {}
- virtual void Visit(ObjPtr<mirror::ClassLoader> class_loader) override
+ void Visit(ObjPtr<mirror::ClassLoader> class_loader) override
REQUIRES_SHARED(Locks::mutator_lock_) {
PruneClassesVisitor classes_visitor(image_writer_, class_loader);
ClassTable* class_table =
diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc
index 4748c15..e8f57f5 100644
--- a/dex2oat/linker/oat_writer.cc
+++ b/dex2oat/linker/oat_writer.cc
@@ -1248,7 +1248,7 @@
std::move(ordered_methods)) {
}
- virtual bool VisitComplete() override {
+ bool VisitComplete() override {
offset_ = writer_->relative_patcher_->ReserveSpaceEnd(offset_);
if (generate_debug_info_) {
std::vector<debug::MethodDebugInfo> thunk_infos =
@@ -1260,8 +1260,7 @@
return true;
}
- virtual bool VisitMethod(const OrderedMethodData& method_data)
- override
+ bool VisitMethod(const OrderedMethodData& method_data) override
REQUIRES_SHARED(Locks::mutator_lock_) {
OatClass* oat_class = method_data.oat_class;
CompiledMethod* compiled_method = method_data.compiled_method;
@@ -1652,7 +1651,7 @@
}
}
- virtual bool VisitStart() override {
+ bool VisitStart() override {
return true;
}
@@ -1681,7 +1680,7 @@
return true;
}
- virtual bool VisitMethod(const OrderedMethodData& method_data) override
+ bool VisitMethod(const OrderedMethodData& method_data) override
REQUIRES_SHARED(Locks::mutator_lock_) {
const MethodReference& method_ref = method_data.method_reference;
UpdateDexFileAndDexCache(method_ref.dex_file);
diff --git a/dexlayout/dex_ir.h b/dexlayout/dex_ir.h
index b02ae50..178a4d4 100644
--- a/dexlayout/dex_ir.h
+++ b/dexlayout/dex_ir.h
@@ -233,7 +233,7 @@
// Preallocate so that assignment does not invalidate pointers into the vector.
collection_.reserve(size);
}
- virtual ~CollectionVector() override { }
+ ~CollectionVector() override { }
template<class... Args>
T* CreateAndAddItem(Args&&... args) {
@@ -242,7 +242,7 @@
return object;
}
- virtual uint32_t Size() const override { return collection_.size(); }
+ uint32_t Size() const override { return collection_.size(); }
Iterator<ElementType> begin() const { return Iterator<ElementType>(collection_, 0U, Size()); }
Iterator<ElementType> end() const { return Iterator<ElementType>(collection_, Size(), Size()); }
diff --git a/dexlayout/dex_ir_builder.cc b/dexlayout/dex_ir_builder.cc
index 601d783..ca6ff9e 100644
--- a/dexlayout/dex_ir_builder.cc
+++ b/dexlayout/dex_ir_builder.cc
@@ -92,7 +92,7 @@
template<class T> class CollectionMap : public CollectionBase {
public:
CollectionMap() = default;
- virtual ~CollectionMap() override { }
+ ~CollectionMap() override { }
template <class... Args>
T* CreateAndAddItem(CollectionVector<T>& vector,
diff --git a/imgdiag/imgdiag.cc b/imgdiag/imgdiag.cc
index 420cd12..ebc18fc 100644
--- a/imgdiag/imgdiag.cc
+++ b/imgdiag/imgdiag.cc
@@ -347,9 +347,9 @@
begin_image_ptr_(begin_image_ptr),
dirty_pages_(dirty_pages) { }
- virtual ~ImgObjectVisitor() override { }
+ ~ImgObjectVisitor() override { }
- virtual void Visit(mirror::Object* object) override REQUIRES_SHARED(Locks::mutator_lock_) {
+ void Visit(mirror::Object* object) override REQUIRES_SHARED(Locks::mutator_lock_) {
// Sanity check that we are reading a real mirror::Object
CHECK(object->GetClass() != nullptr) << "Image object at address "
<< object
@@ -658,8 +658,8 @@
dirty_func_(std::move(dirty_func)),
begin_image_ptr_(begin_image_ptr),
dirty_pages_(dirty_pages) { }
- virtual ~ImgArtMethodVisitor() override { }
- virtual void Visit(ArtMethod* method) override {
+ ~ImgArtMethodVisitor() override { }
+ void Visit(ArtMethod* method) override {
dirty_func_(method, begin_image_ptr_, dirty_pages_);
}
@@ -1671,8 +1671,7 @@
protected:
using Base = CmdlineArgs;
- virtual ParseStatus ParseCustom(const StringPiece& option,
- std::string* error_msg) override {
+ ParseStatus ParseCustom(const StringPiece& option, std::string* error_msg) override {
{
ParseStatus base_parse = Base::ParseCustom(option, error_msg);
if (base_parse != kParseUnknownArgument) {
@@ -1703,7 +1702,7 @@
return kParseOk;
}
- virtual ParseStatus ParseChecks(std::string* error_msg) override {
+ ParseStatus ParseChecks(std::string* error_msg) override {
// Perform the parent checks.
ParseStatus parent_checks = Base::ParseChecks(error_msg);
if (parent_checks != kParseOk) {
diff --git a/imgdiag/imgdiag_test.cc b/imgdiag/imgdiag_test.cc
index c46aaf4..cb40c7d 100644
--- a/imgdiag/imgdiag_test.cc
+++ b/imgdiag/imgdiag_test.cc
@@ -57,7 +57,7 @@
boot_image_location_ = image_spaces[0]->GetImageLocation();
}
- virtual void SetUpRuntimeOptions(RuntimeOptions* options) override {
+ void SetUpRuntimeOptions(RuntimeOptions* options) override {
// Needs to live until CommonRuntimeTest::SetUp finishes, since we pass it a cstring.
runtime_args_image_ = android::base::StringPrintf("-Ximage:%s", GetCoreArtLocation().c_str());
options->push_back(std::make_pair(runtime_args_image_, nullptr));
diff --git a/libartbase/base/common_art_test.h b/libartbase/base/common_art_test.h
index 95f2cbb..d645fa1 100644
--- a/libartbase/base/common_art_test.h
+++ b/libartbase/base/common_art_test.h
@@ -209,11 +209,11 @@
virtual ~CommonArtTestBase() {}
protected:
- virtual void SetUp() override {
+ void SetUp() override {
CommonArtTestImpl::SetUp();
}
- virtual void TearDown() override {
+ void TearDown() override {
CommonArtTestImpl::TearDown();
}
};
diff --git a/libdexfile/dex/art_dex_file_loader.cc b/libdexfile/dex/art_dex_file_loader.cc
index f50bf1c..eb7d3d3 100644
--- a/libdexfile/dex/art_dex_file_loader.cc
+++ b/libdexfile/dex/art_dex_file_loader.cc
@@ -40,7 +40,7 @@
class MemMapContainer : public DexFileContainer {
public:
explicit MemMapContainer(MemMap&& mem_map) : mem_map_(std::move(mem_map)) { }
- virtual ~MemMapContainer() override { }
+ ~MemMapContainer() override { }
int GetPermissions() override {
if (!mem_map_.IsValid()) {
diff --git a/libdexfile/dex/compact_dex_file.h b/libdexfile/dex/compact_dex_file.h
index 6db68c0..8eade6d 100644
--- a/libdexfile/dex/compact_dex_file.h
+++ b/libdexfile/dex/compact_dex_file.h
@@ -253,15 +253,15 @@
// Returns true if the byte string points to the magic value.
static bool IsMagicValid(const uint8_t* magic);
- virtual bool IsMagicValid() const override;
+ bool IsMagicValid() const override;
// Returns true if the byte string after the magic is the correct value.
static bool IsVersionValid(const uint8_t* magic);
- virtual bool IsVersionValid() const override;
+ bool IsVersionValid() const override;
// TODO This is completely a guess. We really need to do better. b/72402467
// We ask for 64 megabytes which should be big enough for any realistic dex file.
- virtual size_t GetDequickenedSize() const override {
+ size_t GetDequickenedSize() const override {
return 64 * MB;
}
@@ -269,7 +269,7 @@
return down_cast<const Header&>(DexFile::GetHeader());
}
- virtual bool SupportsDefaultMethods() const override;
+ bool SupportsDefaultMethods() const override;
uint32_t GetCodeItemSize(const DexFile::CodeItem& item) const override;
@@ -281,7 +281,7 @@
size_t base_size,
const uint8_t* data_begin,
size_t data_size);
- virtual uint32_t CalculateChecksum() const override;
+ uint32_t CalculateChecksum() const override;
private:
CompactDexFile(const uint8_t* base,
diff --git a/libdexfile/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc
index d9e483d..400c32b 100644
--- a/libdexfile/dex/dex_file_loader.cc
+++ b/libdexfile/dex/dex_file_loader.cc
@@ -36,7 +36,7 @@
class VectorContainer : public DexFileContainer {
public:
explicit VectorContainer(std::vector<uint8_t>&& vector) : vector_(std::move(vector)) { }
- virtual ~VectorContainer() override { }
+ ~VectorContainer() override { }
int GetPermissions() override {
return 0;
diff --git a/libdexfile/dex/standard_dex_file.h b/libdexfile/dex/standard_dex_file.h
index a289635..fd7e78f 100644
--- a/libdexfile/dex/standard_dex_file.h
+++ b/libdexfile/dex/standard_dex_file.h
@@ -73,17 +73,17 @@
// Returns true if the byte string points to the magic value.
static bool IsMagicValid(const uint8_t* magic);
- virtual bool IsMagicValid() const override;
+ bool IsMagicValid() const override;
// Returns true if the byte string after the magic is the correct value.
static bool IsVersionValid(const uint8_t* magic);
- virtual bool IsVersionValid() const override;
+ bool IsVersionValid() const override;
- virtual bool SupportsDefaultMethods() const override;
+ bool SupportsDefaultMethods() const override;
uint32_t GetCodeItemSize(const DexFile::CodeItem& item) const override;
- virtual size_t GetDequickenedSize() const override {
+ size_t GetDequickenedSize() const override {
return Size();
}
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 5e56c9a..fdf43d7 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -1980,7 +1980,7 @@
public:
explicit DumpArtMethodVisitor(ImageDumper* image_dumper) : image_dumper_(image_dumper) {}
- virtual void Visit(ArtMethod* method) override REQUIRES_SHARED(Locks::mutator_lock_) {
+ void Visit(ArtMethod* method) override REQUIRES_SHARED(Locks::mutator_lock_) {
std::ostream& indent_os = image_dumper_->vios_.Stream();
indent_os << method << " " << " ArtMethod: " << ArtMethod::PrettyMethod(method) << "\n";
image_dumper_->DumpMethod(method, indent_os);
@@ -3350,8 +3350,7 @@
protected:
using Base = CmdlineArgs;
- virtual ParseStatus ParseCustom(const StringPiece& option,
- std::string* error_msg) override {
+ ParseStatus ParseCustom(const StringPiece& option, std::string* error_msg) override {
{
ParseStatus base_parse = Base::ParseCustom(option, error_msg);
if (base_parse != kParseUnknownArgument) {
@@ -3408,7 +3407,7 @@
return kParseOk;
}
- virtual ParseStatus ParseChecks(std::string* error_msg) override {
+ ParseStatus ParseChecks(std::string* error_msg) override {
// Infer boot image location from the image location if possible.
if (boot_image_location_ == nullptr) {
boot_image_location_ = image_location_;
@@ -3536,7 +3535,7 @@
};
struct OatdumpMain : public CmdlineMain<OatdumpArgs> {
- virtual bool NeedsRuntime() override {
+ bool NeedsRuntime() override {
CHECK(args_ != nullptr);
// If we are only doing the oat file, disable absolute_addresses. Keep them for image dumping.
@@ -3563,7 +3562,7 @@
!args_->symbolize_;
}
- virtual bool ExecuteWithoutRuntime() override {
+ bool ExecuteWithoutRuntime() override {
CHECK(args_ != nullptr);
CHECK(args_->oat_filename_ != nullptr);
diff --git a/runtime/arch/x86/instruction_set_features_x86.h b/runtime/arch/x86/instruction_set_features_x86.h
index acf13c4..6bd6263 100644
--- a/runtime/arch/x86/instruction_set_features_x86.h
+++ b/runtime/arch/x86/instruction_set_features_x86.h
@@ -53,7 +53,7 @@
bool HasAtLeast(const InstructionSetFeatures* other) const override;
- virtual InstructionSet GetInstructionSet() const override {
+ InstructionSet GetInstructionSet() const override {
return InstructionSet::kX86;
}
@@ -69,7 +69,7 @@
protected:
// Parse a string of the form "ssse3" adding these to a new InstructionSetFeatures.
- virtual std::unique_ptr<const InstructionSetFeatures>
+ std::unique_ptr<const InstructionSetFeatures>
AddFeaturesFromSplitString(const std::vector<std::string>& features,
std::string* error_msg) const override {
return AddFeaturesFromSplitString(features, false, error_msg);
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 52ddd13..ab7182a 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -450,7 +450,7 @@
class ClassLinkerMethodHandlesTest : public ClassLinkerTest {
protected:
- virtual void SetUpRuntimeOptions(RuntimeOptions* options) override {
+ void SetUpRuntimeOptions(RuntimeOptions* options) override {
CommonRuntimeTest::SetUpRuntimeOptions(options);
}
};
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index bf17e64..a5157df 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -157,11 +157,11 @@
virtual ~CommonRuntimeTestBase() {}
protected:
- virtual void SetUp() override {
+ void SetUp() override {
CommonRuntimeTestImpl::SetUp();
}
- virtual void TearDown() override {
+ void TearDown() override {
CommonRuntimeTestImpl::TearDown();
}
};
diff --git a/runtime/dex2oat_environment_test.h b/runtime/dex2oat_environment_test.h
index 0b99722..2cbf557 100644
--- a/runtime/dex2oat_environment_test.h
+++ b/runtime/dex2oat_environment_test.h
@@ -42,7 +42,7 @@
// Test class that provides some helpers to set a test up for compilation using dex2oat.
class Dex2oatEnvironmentTest : public CommonRuntimeTest {
public:
- virtual void SetUp() override {
+ void SetUp() override {
CommonRuntimeTest::SetUp();
const ArtDexFileLoader dex_file_loader;
@@ -106,7 +106,7 @@
ASSERT_NE(multi1[1]->GetLocationChecksum(), multi2[1]->GetLocationChecksum());
}
- virtual void SetUpRuntimeOptions(RuntimeOptions* options) override {
+ void SetUpRuntimeOptions(RuntimeOptions* options) override {
// options->push_back(std::make_pair("-verbose:oat", nullptr));
// Set up the image location.
@@ -117,7 +117,7 @@
callbacks_.reset();
}
- virtual void TearDown() override {
+ void TearDown() override {
ClearDirectory(odex_dir_.c_str());
ASSERT_EQ(0, rmdir(odex_dir_.c_str()));
diff --git a/runtime/dexopt_test.h b/runtime/dexopt_test.h
index b4e52ac..df7181a 100644
--- a/runtime/dexopt_test.h
+++ b/runtime/dexopt_test.h
@@ -26,11 +26,11 @@
class DexoptTest : public Dex2oatEnvironmentTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
virtual void PreRuntimeCreate();
- virtual void PostRuntimeCreate() override;
+ void PostRuntimeCreate() override;
// Generate an oat file for the purposes of test.
// The oat file will be generated for dex_location in the given oat_location
diff --git a/runtime/gc/accounting/mod_union_table.h b/runtime/gc/accounting/mod_union_table.h
index ec6f144..8c471bc 100644
--- a/runtime/gc/accounting/mod_union_table.h
+++ b/runtime/gc/accounting/mod_union_table.h
@@ -132,7 +132,7 @@
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(Locks::heap_bitmap_lock_);
- virtual void VisitObjects(ObjectCallback callback, void* arg) override
+ void VisitObjects(ObjectCallback callback, void* arg) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
@@ -145,13 +145,13 @@
// Function that tells whether or not to add a reference to the table.
virtual bool ShouldAddReference(const mirror::Object* ref) const = 0;
- virtual bool ContainsCardFor(uintptr_t addr) override;
+ bool ContainsCardFor(uintptr_t addr) override;
- virtual void Dump(std::ostream& os) override REQUIRES_SHARED(Locks::mutator_lock_);
+ void Dump(std::ostream& os) override REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void SetCards() override;
+ void SetCards() override;
- virtual void ClearTable() override;
+ void ClearTable() override;
protected:
// Cleared card array, used to update the mod-union table.
@@ -172,27 +172,27 @@
virtual ~ModUnionTableCardCache() {}
// Clear and store cards for a space.
- virtual void ProcessCards() override;
+ void ProcessCards() override;
// Mark all references to the alloc space(s).
- virtual void UpdateAndMarkReferences(MarkObjectVisitor* visitor) override
+ void UpdateAndMarkReferences(MarkObjectVisitor* visitor) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void VisitObjects(ObjectCallback callback, void* arg) override
+ void VisitObjects(ObjectCallback callback, void* arg) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
// Nothing to verify.
- virtual void Verify() override {}
+ void Verify() override {}
- virtual void Dump(std::ostream& os) override;
+ void Dump(std::ostream& os) override;
- virtual bool ContainsCardFor(uintptr_t addr) override;
+ bool ContainsCardFor(uintptr_t addr) override;
- virtual void SetCards() override;
+ void SetCards() override;
- virtual void ClearTable() override;
+ void ClearTable() override;
protected:
// Cleared card bitmap, used to update the mod-union table.
diff --git a/runtime/gc/accounting/mod_union_table_test.cc b/runtime/gc/accounting/mod_union_table_test.cc
index 5aa5550..2a382d7 100644
--- a/runtime/gc/accounting/mod_union_table_test.cc
+++ b/runtime/gc/accounting/mod_union_table_test.cc
@@ -97,13 +97,13 @@
class CollectVisitedVisitor : public MarkObjectVisitor {
public:
explicit CollectVisitedVisitor(std::set<mirror::Object*>* out) : out_(out) {}
- virtual void MarkHeapReference(mirror::HeapReference<mirror::Object>* ref,
- bool do_atomic_update ATTRIBUTE_UNUSED) override
+ void MarkHeapReference(mirror::HeapReference<mirror::Object>* ref,
+ bool do_atomic_update ATTRIBUTE_UNUSED) override
REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(ref != nullptr);
MarkObject(ref->AsMirrorPtr());
}
- virtual mirror::Object* MarkObject(mirror::Object* obj) override
+ mirror::Object* MarkObject(mirror::Object* obj) override
REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(obj != nullptr);
out_->insert(obj);
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index f73ecf1..3ea88d6 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -393,7 +393,7 @@
: concurrent_copying_(concurrent_copying), use_tlab_(use_tlab) {
}
- virtual void Run(Thread* thread) override REQUIRES_SHARED(Locks::mutator_lock_) {
+ void Run(Thread* thread) override REQUIRES_SHARED(Locks::mutator_lock_) {
// Note: self is not necessarily equal to thread since thread may be suspended.
Thread* self = Thread::Current();
CHECK(thread == self || thread->IsSuspended() || thread->GetState() == kWaitingPerformingGc)
@@ -467,7 +467,7 @@
: concurrent_copying_(concurrent_copying) {
}
- virtual void Run(Thread* thread) override REQUIRES(Locks::mutator_lock_) {
+ void Run(Thread* thread) override REQUIRES(Locks::mutator_lock_) {
ConcurrentCopying* cc = concurrent_copying_;
TimingLogger::ScopedTiming split("(Paused)FlipCallback", cc->GetTimings());
// Note: self is not necessarily equal to thread since thread may be suspended.
@@ -1457,7 +1457,7 @@
disable_weak_ref_access_(disable_weak_ref_access) {
}
- virtual void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
+ void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
// Note: self is not necessarily equal to thread since thread may be suspended.
Thread* self = Thread::Current();
CHECK(thread == self || thread->IsSuspended() || thread->GetState() == kWaitingPerformingGc)
diff --git a/runtime/gc/collector/concurrent_copying.h b/runtime/gc/collector/concurrent_copying.h
index a956d38..1a7464a 100644
--- a/runtime/gc/collector/concurrent_copying.h
+++ b/runtime/gc/collector/concurrent_copying.h
@@ -71,7 +71,7 @@
bool measure_read_barrier_slow_path = false);
~ConcurrentCopying();
- virtual void RunPhases() override
+ void RunPhases() override
REQUIRES(!immune_gray_stack_lock_,
!mark_stack_lock_,
!rb_slow_path_histogram_lock_,
@@ -87,15 +87,15 @@
void BindBitmaps() REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::heap_bitmap_lock_);
- virtual GcType GetGcType() const override {
+ GcType GetGcType() const override {
return (kEnableGenerationalConcurrentCopyingCollection && young_gen_)
? kGcTypeSticky
: kGcTypePartial;
}
- virtual CollectorType GetCollectorType() const override {
+ CollectorType GetCollectorType() const override {
return kCollectorTypeCC;
}
- virtual void RevokeAllThreadLocalBuffers() override;
+ void RevokeAllThreadLocalBuffers() override;
void SetRegionSpace(space::RegionSpace* region_space) {
DCHECK(region_space != nullptr);
region_space_ = region_space;
@@ -144,7 +144,7 @@
void RevokeThreadLocalMarkStack(Thread* thread) REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_);
- virtual mirror::Object* IsMarked(mirror::Object* from_ref) override
+ mirror::Object* IsMarked(mirror::Object* from_ref) override
REQUIRES_SHARED(Locks::mutator_lock_);
private:
@@ -166,21 +166,22 @@
void Process(mirror::Object* obj, MemberOffset offset)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_ , !skipped_blocks_lock_, !immune_gray_stack_lock_);
- virtual void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info)
- override REQUIRES_SHARED(Locks::mutator_lock_)
+ void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) override
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_, !skipped_blocks_lock_, !immune_gray_stack_lock_);
template<bool kGrayImmuneObject>
void MarkRoot(Thread* const self, mirror::CompressedReference<mirror::Object>* root)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_, !skipped_blocks_lock_, !immune_gray_stack_lock_);
- virtual void VisitRoots(mirror::CompressedReference<mirror::Object>** roots, size_t count,
- const RootInfo& info)
- override REQUIRES_SHARED(Locks::mutator_lock_)
+ void VisitRoots(mirror::CompressedReference<mirror::Object>** roots,
+ size_t count,
+ const RootInfo& info) override
+ REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_, !skipped_blocks_lock_, !immune_gray_stack_lock_);
void VerifyNoFromSpaceReferences() REQUIRES(Locks::mutator_lock_);
accounting::ObjectStack* GetAllocationStack();
accounting::ObjectStack* GetLiveStack();
- virtual void ProcessMarkStack() override REQUIRES_SHARED(Locks::mutator_lock_)
+ void ProcessMarkStack() override REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_);
bool ProcessMarkStackOnce() REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!mark_stack_lock_);
void ProcessMarkStackRef(mirror::Object* to_ref) REQUIRES_SHARED(Locks::mutator_lock_)
@@ -204,21 +205,21 @@
void SwitchToSharedMarkStackMode() REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_);
void SwitchToGcExclusiveMarkStackMode() REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void DelayReferenceReferent(ObjPtr<mirror::Class> klass,
- ObjPtr<mirror::Reference> reference) override
+ void DelayReferenceReferent(ObjPtr<mirror::Class> klass,
+ ObjPtr<mirror::Reference> reference) override
REQUIRES_SHARED(Locks::mutator_lock_);
void ProcessReferences(Thread* self) REQUIRES_SHARED(Locks::mutator_lock_);
- virtual mirror::Object* MarkObject(mirror::Object* from_ref) override
+ mirror::Object* MarkObject(mirror::Object* from_ref) override
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_, !skipped_blocks_lock_, !immune_gray_stack_lock_);
- virtual void MarkHeapReference(mirror::HeapReference<mirror::Object>* from_ref,
- bool do_atomic_update) override
+ void MarkHeapReference(mirror::HeapReference<mirror::Object>* from_ref,
+ bool do_atomic_update) override
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!mark_stack_lock_, !skipped_blocks_lock_, !immune_gray_stack_lock_);
bool IsMarkedInUnevacFromSpace(mirror::Object* from_ref)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* field,
- bool do_atomic_update) override
+ bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* field,
+ bool do_atomic_update) override
REQUIRES_SHARED(Locks::mutator_lock_);
void SweepSystemWeaks(Thread* self)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::heap_bitmap_lock_);
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index 840a4b0..23b2719 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -1109,8 +1109,7 @@
public:
explicit VerifySystemWeakVisitor(MarkSweep* mark_sweep) : mark_sweep_(mark_sweep) {}
- virtual mirror::Object* IsMarked(mirror::Object* obj)
- override
+ mirror::Object* IsMarked(mirror::Object* obj) override
REQUIRES_SHARED(Locks::mutator_lock_, Locks::heap_bitmap_lock_) {
mark_sweep_->VerifyIsLive(obj);
return obj;
@@ -1161,7 +1160,7 @@
}
}
- virtual void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
+ void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
ScopedTrace trace("Marking thread roots");
// Note: self is not necessarily equal to thread since thread may be suspended.
Thread* const self = Thread::Current();
diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h
index 012e179..ff9597c 100644
--- a/runtime/gc/collector/mark_sweep.h
+++ b/runtime/gc/collector/mark_sweep.h
@@ -57,7 +57,7 @@
~MarkSweep() {}
- virtual void RunPhases() override REQUIRES(!mark_stack_lock_);
+ void RunPhases() override REQUIRES(!mark_stack_lock_);
void InitializePhase();
void MarkingPhase() REQUIRES(!mark_stack_lock_) REQUIRES_SHARED(Locks::mutator_lock_);
void PausePhase() REQUIRES(Locks::mutator_lock_) REQUIRES(!mark_stack_lock_);
@@ -72,11 +72,11 @@
return is_concurrent_;
}
- virtual GcType GetGcType() const override {
+ GcType GetGcType() const override {
return kGcTypeFull;
}
- virtual CollectorType GetCollectorType() const override {
+ CollectorType GetCollectorType() const override {
return is_concurrent_ ? kCollectorTypeCMS : kCollectorTypeMS;
}
@@ -187,25 +187,25 @@
void VerifyIsLive(const mirror::Object* obj)
REQUIRES_SHARED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
- virtual bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* ref,
- bool do_atomic_update) override
+ bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* ref,
+ bool do_atomic_update) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) override
+ void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void VisitRoots(mirror::CompressedReference<mirror::Object>** roots,
- size_t count,
- const RootInfo& info) override
+ void VisitRoots(mirror::CompressedReference<mirror::Object>** roots,
+ size_t count,
+ const RootInfo& info) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
// Marks an object.
- virtual mirror::Object* MarkObject(mirror::Object* obj) override
+ mirror::Object* MarkObject(mirror::Object* obj) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
@@ -215,8 +215,8 @@
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void MarkHeapReference(mirror::HeapReference<mirror::Object>* ref,
- bool do_atomic_update) override
+ void MarkHeapReference(mirror::HeapReference<mirror::Object>* ref,
+ bool do_atomic_update) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
@@ -231,7 +231,7 @@
protected:
// Returns object if the object is marked in the heap bitmap, otherwise null.
- virtual mirror::Object* IsMarked(mirror::Object* object) override
+ mirror::Object* IsMarked(mirror::Object* object) override
REQUIRES_SHARED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
void MarkObjectNonNull(mirror::Object* obj,
@@ -278,8 +278,7 @@
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
- virtual void ProcessMarkStack()
- override
+ void ProcessMarkStack() override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_) {
diff --git a/runtime/gc/collector/partial_mark_sweep.h b/runtime/gc/collector/partial_mark_sweep.h
index 308699b..76c44a3 100644
--- a/runtime/gc/collector/partial_mark_sweep.h
+++ b/runtime/gc/collector/partial_mark_sweep.h
@@ -26,7 +26,7 @@
class PartialMarkSweep : public MarkSweep {
public:
// Virtual as overridden by StickyMarkSweep.
- virtual GcType GetGcType() const override {
+ GcType GetGcType() const override {
return kGcTypePartial;
}
@@ -37,7 +37,7 @@
// Bind the live bits to the mark bits of bitmaps for spaces that aren't collected for partial
// collections, ie the Zygote space. Also mark this space is immune. Virtual as overridden by
// StickyMarkSweep.
- virtual void BindBitmaps() override REQUIRES_SHARED(Locks::mutator_lock_);
+ void BindBitmaps() override REQUIRES_SHARED(Locks::mutator_lock_);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PartialMarkSweep);
diff --git a/runtime/gc/collector/semi_space.h b/runtime/gc/collector/semi_space.h
index 49cd02e..bb42be6 100644
--- a/runtime/gc/collector/semi_space.h
+++ b/runtime/gc/collector/semi_space.h
@@ -63,7 +63,7 @@
~SemiSpace() {}
- virtual void RunPhases() override NO_THREAD_SAFETY_ANALYSIS;
+ void RunPhases() override NO_THREAD_SAFETY_ANALYSIS;
virtual void InitializePhase();
virtual void MarkingPhase() REQUIRES(Locks::mutator_lock_)
REQUIRES(!Locks::heap_bitmap_lock_);
@@ -72,10 +72,10 @@
virtual void FinishPhase() REQUIRES(Locks::mutator_lock_);
void MarkReachableObjects()
REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
- virtual GcType GetGcType() const override {
+ GcType GetGcType() const override {
return kGcTypePartial;
}
- virtual CollectorType GetCollectorType() const override {
+ CollectorType GetCollectorType() const override {
return generational_ ? kCollectorTypeGSS : kCollectorTypeSS;
}
@@ -106,11 +106,11 @@
void MarkObjectIfNotInToSpace(CompressedReferenceType* obj_ptr)
REQUIRES(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
- virtual mirror::Object* MarkObject(mirror::Object* root) override
+ mirror::Object* MarkObject(mirror::Object* root) override
REQUIRES(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
- virtual void MarkHeapReference(mirror::HeapReference<mirror::Object>* obj_ptr,
- bool do_atomic_update) override
+ void MarkHeapReference(mirror::HeapReference<mirror::Object>* obj_ptr,
+ bool do_atomic_update) override
REQUIRES(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
void ScanObject(mirror::Object* obj)
@@ -145,11 +145,12 @@
void SweepSystemWeaks()
REQUIRES_SHARED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
- virtual void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) override
+ void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) override
REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
- virtual void VisitRoots(mirror::CompressedReference<mirror::Object>** roots, size_t count,
- const RootInfo& info) override
+ void VisitRoots(mirror::CompressedReference<mirror::Object>** roots,
+ size_t count,
+ const RootInfo& info) override
REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
virtual mirror::Object* MarkNonForwardedObject(mirror::Object* obj)
@@ -162,12 +163,12 @@
protected:
// Returns null if the object is not marked, otherwise returns the forwarding address (same as
// object for non movable things).
- virtual mirror::Object* IsMarked(mirror::Object* object) override
+ mirror::Object* IsMarked(mirror::Object* object) override
REQUIRES(Locks::mutator_lock_)
REQUIRES_SHARED(Locks::heap_bitmap_lock_);
- virtual bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* object,
- bool do_atomic_update) override
+ bool IsNullOrMarkedHeapReference(mirror::HeapReference<mirror::Object>* object,
+ bool do_atomic_update) override
REQUIRES(Locks::mutator_lock_)
REQUIRES_SHARED(Locks::heap_bitmap_lock_);
diff --git a/runtime/gc/collector/sticky_mark_sweep.h b/runtime/gc/collector/sticky_mark_sweep.h
index f92a103..f65413d 100644
--- a/runtime/gc/collector/sticky_mark_sweep.h
+++ b/runtime/gc/collector/sticky_mark_sweep.h
@@ -33,8 +33,7 @@
StickyMarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = "");
~StickyMarkSweep() {}
- virtual void MarkConcurrentRoots(VisitRootFlags flags)
- override
+ void MarkConcurrentRoots(VisitRootFlags flags) override
REQUIRES(Locks::heap_bitmap_lock_)
REQUIRES(!mark_stack_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 16fd786..b74071b 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -1327,7 +1327,7 @@
public:
explicit TrimIndirectReferenceTableClosure(Barrier* barrier) : barrier_(barrier) {
}
- virtual void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
+ void Run(Thread* thread) override NO_THREAD_SAFETY_ANALYSIS {
thread->GetJniEnv()->TrimLocals();
// If thread is a running mutator, then act on behalf of the trim thread.
// See the code in ThreadList::RunCheckpoint.
@@ -2826,7 +2826,7 @@
root->AsMirrorPtr(), RootInfo(kRootVMInternal));
}
- virtual void VisitRoot(mirror::Object* root, const RootInfo& root_info) override
+ void VisitRoot(mirror::Object* root, const RootInfo& root_info) override
REQUIRES_SHARED(Locks::mutator_lock_) {
if (root == nullptr) {
LOG(ERROR) << "Root is null with info " << root_info.GetType();
@@ -3259,10 +3259,10 @@
}
struct IdentityMarkHeapReferenceVisitor : public MarkObjectVisitor {
- virtual mirror::Object* MarkObject(mirror::Object* obj) override {
+ mirror::Object* MarkObject(mirror::Object* obj) override {
return obj;
}
- virtual void MarkHeapReference(mirror::HeapReference<mirror::Object>*, bool) override {
+ void MarkHeapReference(mirror::HeapReference<mirror::Object>*, bool) override {
}
};
@@ -3633,7 +3633,7 @@
public:
ConcurrentGCTask(uint64_t target_time, GcCause cause, bool force_full)
: HeapTask(target_time), cause_(cause), force_full_(force_full) {}
- virtual void Run(Thread* self) override {
+ void Run(Thread* self) override {
gc::Heap* heap = Runtime::Current()->GetHeap();
heap->ConcurrentGC(self, cause_, force_full_);
heap->ClearConcurrentGCRequest();
@@ -3691,7 +3691,7 @@
public:
explicit CollectorTransitionTask(uint64_t target_time) : HeapTask(target_time) {}
- virtual void Run(Thread* self) override {
+ void Run(Thread* self) override {
gc::Heap* heap = Runtime::Current()->GetHeap();
heap->DoPendingCollectorTransition();
heap->ClearPendingCollectorTransition(self);
@@ -3733,7 +3733,7 @@
class Heap::HeapTrimTask : public HeapTask {
public:
explicit HeapTrimTask(uint64_t delta_time) : HeapTask(NanoTime() + delta_time) { }
- virtual void Run(Thread* self) override {
+ void Run(Thread* self) override {
gc::Heap* heap = Runtime::Current()->GetHeap();
heap->Trim(self);
heap->ClearPendingTrim(self);
diff --git a/runtime/gc/space/dlmalloc_space.h b/runtime/gc/space/dlmalloc_space.h
index 09f3970..c63ff71 100644
--- a/runtime/gc/space/dlmalloc_space.h
+++ b/runtime/gc/space/dlmalloc_space.h
@@ -50,27 +50,30 @@
size_t capacity, uint8_t* requested_begin, bool can_move_objects);
// Virtual to allow MemoryToolMallocSpace to intercept.
- virtual mirror::Object* AllocWithGrowth(Thread* self, size_t num_bytes, size_t* bytes_allocated,
- size_t* usable_size,
- size_t* bytes_tl_bulk_allocated)
- override REQUIRES(!lock_);
+ mirror::Object* AllocWithGrowth(Thread* self,
+ size_t num_bytes,
+ size_t* bytes_allocated,
+ size_t* usable_size,
+ size_t* bytes_tl_bulk_allocated) override REQUIRES(!lock_);
// Virtual to allow MemoryToolMallocSpace to intercept.
- virtual mirror::Object* Alloc(Thread* self, size_t num_bytes, size_t* bytes_allocated,
- size_t* usable_size, size_t* bytes_tl_bulk_allocated)
- override REQUIRES(!lock_) {
+ mirror::Object* Alloc(Thread* self,
+ size_t num_bytes,
+ size_t* bytes_allocated,
+ size_t* usable_size,
+ size_t* bytes_tl_bulk_allocated) override REQUIRES(!lock_) {
return AllocNonvirtual(self, num_bytes, bytes_allocated, usable_size,
bytes_tl_bulk_allocated);
}
// Virtual to allow MemoryToolMallocSpace to intercept.
- virtual size_t AllocationSize(mirror::Object* obj, size_t* usable_size) override {
+ size_t AllocationSize(mirror::Object* obj, size_t* usable_size) override {
return AllocationSizeNonvirtual(obj, usable_size);
}
// Virtual to allow MemoryToolMallocSpace to intercept.
- virtual size_t Free(Thread* self, mirror::Object* ptr) override
+ size_t Free(Thread* self, mirror::Object* ptr) override
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
// Virtual to allow MemoryToolMallocSpace to intercept.
- virtual size_t FreeList(Thread* self, size_t num_ptrs, mirror::Object** ptrs) override
+ size_t FreeList(Thread* self, size_t num_ptrs, mirror::Object** ptrs) override
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
@@ -133,7 +136,7 @@
uint64_t GetBytesAllocated() override;
uint64_t GetObjectsAllocated() override;
- virtual void Clear() override;
+ void Clear() override;
bool IsDlMallocSpace() const override {
return true;
diff --git a/runtime/gc/space/large_object_space.h b/runtime/gc/space/large_object_space.h
index 39ff2c3..26c6463 100644
--- a/runtime/gc/space/large_object_space.h
+++ b/runtime/gc/space/large_object_space.h
@@ -76,7 +76,7 @@
return this;
}
collector::ObjectBytePair Sweep(bool swap_bitmaps);
- virtual bool CanMoveObjects() const override {
+ bool CanMoveObjects() const override {
return false;
}
// Current address at which the space begins, which may vary as the space is filled.
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index 2fe1f82..545e3d8 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -352,7 +352,7 @@
return mark_bitmap_.get();
}
- virtual bool IsDiscontinuousSpace() const override {
+ bool IsDiscontinuousSpace() const override {
return true;
}
diff --git a/runtime/gc/task_processor_test.cc b/runtime/gc/task_processor_test.cc
index caa8802..7cb678b 100644
--- a/runtime/gc/task_processor_test.cc
+++ b/runtime/gc/task_processor_test.cc
@@ -33,7 +33,7 @@
: HeapTask(NanoTime() + MsToNs(10)), task_processor_(task_processor), counter_(counter),
max_recursion_(max_recursion) {
}
- virtual void Run(Thread* self) override {
+ void Run(Thread* self) override {
if (max_recursion_ > 0) {
task_processor_->AddTask(self,
new RecursiveTask(task_processor_, counter_, max_recursion_ - 1));
@@ -52,7 +52,7 @@
WorkUntilDoneTask(TaskProcessor* task_processor, Atomic<bool>* done_running)
: task_processor_(task_processor), done_running_(done_running) {
}
- virtual void Run(Thread* self) override {
+ void Run(Thread* self) override {
task_processor_->RunAllTasks(self);
done_running_->store(true, std::memory_order_seq_cst);
}
@@ -105,7 +105,7 @@
TestOrderTask(uint64_t expected_time, size_t expected_counter, size_t* counter)
: HeapTask(expected_time), expected_counter_(expected_counter), counter_(counter) {
}
- virtual void Run(Thread* thread ATTRIBUTE_UNUSED) override {
+ void Run(Thread* thread ATTRIBUTE_UNUSED) override {
ASSERT_EQ(*counter_, expected_counter_);
++*counter_;
}
diff --git a/runtime/jni/java_vm_ext_test.cc b/runtime/jni/java_vm_ext_test.cc
index fe1c168..4049c6e 100644
--- a/runtime/jni/java_vm_ext_test.cc
+++ b/runtime/jni/java_vm_ext_test.cc
@@ -34,7 +34,7 @@
}
- virtual void TearDown() override {
+ void TearDown() override {
CommonRuntimeTest::TearDown();
}
diff --git a/runtime/jni/jni_internal_test.cc b/runtime/jni/jni_internal_test.cc
index a4b151a..3040b90 100644
--- a/runtime/jni/jni_internal_test.cc
+++ b/runtime/jni/jni_internal_test.cc
@@ -84,7 +84,7 @@
}
}
- virtual void TearDown() override {
+ void TearDown() override {
CleanUpJniEnv();
CommonCompilerTest::TearDown();
}
diff --git a/runtime/mirror/dex_cache_test.cc b/runtime/mirror/dex_cache_test.cc
index 528740b..e9e7ca8 100644
--- a/runtime/mirror/dex_cache_test.cc
+++ b/runtime/mirror/dex_cache_test.cc
@@ -34,7 +34,7 @@
class DexCacheMethodHandlesTest : public DexCacheTest {
protected:
- virtual void SetUpRuntimeOptions(RuntimeOptions* options) override {
+ void SetUpRuntimeOptions(RuntimeOptions* options) override {
CommonRuntimeTest::SetUpRuntimeOptions(options);
}
};
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 6e5786a..72eced2 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -1574,7 +1574,7 @@
public:
MonitorDeflateVisitor() : self_(Thread::Current()), deflate_count_(0) {}
- virtual mirror::Object* IsMarked(mirror::Object* object) override
+ mirror::Object* IsMarked(mirror::Object* object) override
REQUIRES_SHARED(Locks::mutator_lock_) {
if (Monitor::Deflate(self_, object)) {
DCHECK_NE(object->GetLockWord(true).GetState(), LockWord::kFatLocked);
diff --git a/runtime/runtime_callbacks_test.cc b/runtime/runtime_callbacks_test.cc
index e1e0e23..aaedb23 100644
--- a/runtime/runtime_callbacks_test.cc
+++ b/runtime/runtime_callbacks_test.cc
@@ -252,14 +252,14 @@
}
struct Callback : public ClassLoadCallback {
- virtual void ClassPreDefine(const char* descriptor,
- Handle<mirror::Class> klass ATTRIBUTE_UNUSED,
- Handle<mirror::ClassLoader> class_loader ATTRIBUTE_UNUSED,
- const DexFile& initial_dex_file,
- const DexFile::ClassDef& initial_class_def ATTRIBUTE_UNUSED,
- /*out*/DexFile const** final_dex_file ATTRIBUTE_UNUSED,
- /*out*/DexFile::ClassDef const** final_class_def ATTRIBUTE_UNUSED)
- override REQUIRES_SHARED(Locks::mutator_lock_) {
+ void ClassPreDefine(const char* descriptor,
+ Handle<mirror::Class> klass ATTRIBUTE_UNUSED,
+ Handle<mirror::ClassLoader> class_loader ATTRIBUTE_UNUSED,
+ const DexFile& initial_dex_file,
+ const DexFile::ClassDef& initial_class_def ATTRIBUTE_UNUSED,
+ /*out*/DexFile const** final_dex_file ATTRIBUTE_UNUSED,
+ /*out*/DexFile::ClassDef const** final_class_def ATTRIBUTE_UNUSED) override
+ REQUIRES_SHARED(Locks::mutator_lock_) {
const std::string& location = initial_dex_file.GetLocation();
std::string event =
std::string("PreDefine:") + descriptor + " <" +
diff --git a/runtime/verifier/reg_type.h b/runtime/verifier/reg_type.h
index 04a7dfb..3099b23 100644
--- a/runtime/verifier/reg_type.h
+++ b/runtime/verifier/reg_type.h
@@ -699,7 +699,7 @@
class DoubleHiType final : public Cat2Type {
public:
std::string Dump() const override REQUIRES_SHARED(Locks::mutator_lock_);
- virtual bool IsDoubleHi() const override { return true; }
+ bool IsDoubleHi() const override { return true; }
static const DoubleHiType* CreateInstance(ObjPtr<mirror::Class> klass,
const StringPiece& descriptor,
uint16_t cache_id)
@@ -772,7 +772,7 @@
ConstantValue() >= std::numeric_limits<int16_t>::min() &&
ConstantValue() <= std::numeric_limits<int16_t>::max();
}
- virtual bool IsConstantTypes() const override { return true; }
+ bool IsConstantTypes() const override { return true; }
AssignmentType GetAssignmentTypeImpl() const override {
return AssignmentType::kNotAssignable;
@@ -993,7 +993,7 @@
CheckConstructorInvariants(this);
}
- virtual bool IsUninitializedThisReference() const override { return true; }
+ bool IsUninitializedThisReference() const override { return true; }
bool HasClassVirtual() const override { return true; }
diff --git a/test/common/stack_inspect.cc b/test/common/stack_inspect.cc
index 97a589f..d74d2ef 100644
--- a/test/common/stack_inspect.cc
+++ b/test/common/stack_inspect.cc
@@ -77,7 +77,7 @@
prev_was_runtime_(true),
require_deoptable_(require_deoptable) {}
- virtual bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) {
if (goal_ == GetMethod()) {
method_is_interpreted_ = (require_deoptable_ && prev_was_runtime_) || IsShadowFrame();
method_found_ = true;
diff --git a/tools/art_verifier/art_verifier.cc b/tools/art_verifier/art_verifier.cc
index 500c1c5..bb43e67 100644
--- a/tools/art_verifier/art_verifier.cc
+++ b/tools/art_verifier/art_verifier.cc
@@ -92,8 +92,7 @@
protected:
using Base = CmdlineArgs;
- virtual ParseStatus ParseCustom(const StringPiece& option,
- std::string* error_msg) override {
+ ParseStatus ParseCustom(const StringPiece& option, std::string* error_msg) override {
{
ParseStatus base_parse = Base::ParseCustom(option, error_msg);
if (base_parse != kParseUnknownArgument) {
@@ -119,7 +118,7 @@
return kParseOk;
}
- virtual ParseStatus ParseChecks(std::string* error_msg) override {
+ ParseStatus ParseChecks(std::string* error_msg) override {
// Perform the parent checks.
ParseStatus parent_checks = Base::ParseChecks(error_msg);
if (parent_checks != kParseOk) {