summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2018-02-02 09:24:59 -0800
committer Alex Light <allight@google.com> 2018-02-02 09:29:31 -0800
commit2e40c1c2e9c8cfc2d41a8960247bfa48e2500889 (patch)
tree898b2521f571e5f1aa93d698fdcd75c157188caf
parent64e4c145e9301615a339a0981b1bc34fbe78c2f9 (diff)
Remove unneeded mutator_lock_ requires from fixed_up_dex_file
The REQUIRES_SHARED(art::Locks::mutator_lock_) is not required for the FixedUpDexFile functions. Remove them to allow callers to avoid a possible suspend point. Test: Build Change-Id: Id8e47f45026168f04be5df795766f6cfb5a69a16
-rw-r--r--openjdkjvmti/fixed_up_dex_file.cc7
-rw-r--r--openjdkjvmti/fixed_up_dex_file.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/openjdkjvmti/fixed_up_dex_file.cc b/openjdkjvmti/fixed_up_dex_file.cc
index 6c66f12bb1..85d69df71e 100644
--- a/openjdkjvmti/fixed_up_dex_file.cc
+++ b/openjdkjvmti/fixed_up_dex_file.cc
@@ -44,14 +44,13 @@
namespace openjdkjvmti {
-static void RecomputeDexChecksum(art::DexFile* dex_file)
- REQUIRES_SHARED(art::Locks::mutator_lock_) {
+static void RecomputeDexChecksum(art::DexFile* dex_file) {
reinterpret_cast<art::DexFile::Header*>(const_cast<uint8_t*>(dex_file->Begin()))->checksum_ =
dex_file->CalculateChecksum();
}
-static void DoDexUnquicken(const art::DexFile& new_dex_file, const art::DexFile& original_dex_file)
- REQUIRES_SHARED(art::Locks::mutator_lock_) {
+static void DoDexUnquicken(const art::DexFile& new_dex_file,
+ const art::DexFile& original_dex_file) {
const art::OatDexFile* oat_dex = original_dex_file.GetOatDexFile();
if (oat_dex == nullptr) {
return;
diff --git a/openjdkjvmti/fixed_up_dex_file.h b/openjdkjvmti/fixed_up_dex_file.h
index 7f05a2930a..594e8a7358 100644
--- a/openjdkjvmti/fixed_up_dex_file.h
+++ b/openjdkjvmti/fixed_up_dex_file.h
@@ -50,8 +50,7 @@ namespace openjdkjvmti {
class FixedUpDexFile {
public:
static std::unique_ptr<FixedUpDexFile> Create(const art::DexFile& original,
- const char* descriptor)
- REQUIRES_SHARED(art::Locks::mutator_lock_);
+ const char* descriptor);
const art::DexFile& GetDexFile() {
return *dex_file_;