summaryrefslogtreecommitdiff
path: root/runtime/reference_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/reference_table.cc')
-rw-r--r--runtime/reference_table.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/reference_table.cc b/runtime/reference_table.cc
index 6f65bff899..b5ef735059 100644
--- a/runtime/reference_table.cc
+++ b/runtime/reference_table.cc
@@ -59,7 +59,7 @@ void ReferenceTable::Remove(mirror::Object* obj) {
// If "obj" is an array, return the number of elements in the array.
// Otherwise, return zero.
-static size_t GetElementCount(const mirror::Object* obj) {
+static size_t GetElementCount(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (obj == NULL || obj == kClearedJniWeakGlobal || !obj->IsArrayInstance()) {
return 0;
}
@@ -67,7 +67,7 @@ static size_t GetElementCount(const mirror::Object* obj) {
}
struct ObjectComparator {
- bool operator()(const mirror::Object* obj1, const mirror::Object* obj2)
+ bool operator()(mirror::Object* obj1, mirror::Object* obj2)
// TODO: enable analysis when analysis can work with the STL.
NO_THREAD_SAFETY_ANALYSIS {
Locks::mutator_lock_->AssertSharedHeld(Thread::Current());
@@ -105,7 +105,7 @@ struct ObjectComparator {
// Pass in the number of elements in the array (or 0 if this is not an
// array object), and the number of additional objects that are identical
// or equivalent to the original.
-static void DumpSummaryLine(std::ostream& os, const mirror::Object* obj, size_t element_count,
+static void DumpSummaryLine(std::ostream& os, mirror::Object* obj, size_t element_count,
int identical, int equiv)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (obj == NULL) {
@@ -159,7 +159,7 @@ void ReferenceTable::Dump(std::ostream& os, const Table& entries) {
}
os << " Last " << (count - first) << " entries (of " << count << "):\n";
for (int idx = count - 1; idx >= first; --idx) {
- const mirror::Object* ref = entries[idx];
+ mirror::Object* ref = entries[idx];
if (ref == NULL) {
continue;
}
@@ -212,8 +212,8 @@ void ReferenceTable::Dump(std::ostream& os, const Table& entries) {
size_t equiv = 0;
size_t identical = 0;
for (size_t idx = 1; idx < count; idx++) {
- const mirror::Object* prev = sorted_entries[idx-1];
- const mirror::Object* current = sorted_entries[idx];
+ mirror::Object* prev = sorted_entries[idx-1];
+ mirror::Object* current = sorted_entries[idx];
size_t element_count = GetElementCount(prev);
if (current == prev) {
// Same reference, added more than once.