Fix some camelCase.
These are the files that are mostly right but contain a few
orthographic errors.
Change-Id: I2ca1b5fad71c24f911fd55cfc91f7031af66be99
diff --git a/src/card_table.cc b/src/card_table.cc
index 24c616a..0f295b2 100644
--- a/src/card_table.cc
+++ b/src/card_table.cc
@@ -106,14 +106,14 @@
}
void CardTable::CheckAddrIsInCardTable(const byte* addr) const {
- byte* cardAddr = biased_begin_ + ((uintptr_t)addr >> GC_CARD_SHIFT);
- if (!IsValidCard(cardAddr)) {
+ byte* card_addr = biased_begin_ + ((uintptr_t)addr >> GC_CARD_SHIFT);
+ if (!IsValidCard(card_addr)) {
byte* begin = mem_map_->Begin() + offset_;
byte* end = mem_map_->End();
LOG(FATAL) << "Cardtable - begin: " << reinterpret_cast<void*>(begin)
<< " end: " << reinterpret_cast<void*>(end)
<< " addr: " << reinterpret_cast<const void*>(addr)
- << " cardAddr: " << reinterpret_cast<void*>(cardAddr);
+ << " card_addr: " << reinterpret_cast<void*>(card_addr);
}
}
diff --git a/src/card_table.h b/src/card_table.h
index 0a031b8..6ef6ced 100644
--- a/src/card_table.h
+++ b/src/card_table.h
@@ -43,8 +43,8 @@
// Set the card associated with the given address to GC_CARD_DIRTY.
void MarkCard(const void *addr) {
- byte* cardAddr = CardFromAddr(addr);
- *cardAddr = GC_CARD_DIRTY;
+ byte* card_addr = CardFromAddr(addr);
+ *card_addr = GC_CARD_DIRTY;
}
// Is the object on a dirty card?
@@ -77,28 +77,28 @@
// Returns the address of the relevant byte in the card table, given an address on the heap.
byte* CardFromAddr(const void *addr) const {
- byte *cardAddr = biased_begin_ + ((uintptr_t)addr >> GC_CARD_SHIFT);
+ byte *card_addr = biased_begin_ + ((uintptr_t)addr >> GC_CARD_SHIFT);
// Sanity check the caller was asking for address covered by the card table
- DCHECK(IsValidCard(cardAddr)) << "addr: " << addr
- << " cardAddr: " << reinterpret_cast<void*>(cardAddr);
- return cardAddr;
+ DCHECK(IsValidCard(card_addr)) << "addr: " << addr
+ << " card_addr: " << reinterpret_cast<void*>(card_addr);
+ return card_addr;
}
// Returns the first address in the heap which maps to this card.
- void* AddrFromCard(const byte *cardAddr) const {
- DCHECK(IsValidCard(cardAddr))
- << " cardAddr: " << reinterpret_cast<const void*>(cardAddr)
+ void* AddrFromCard(const byte *card_addr) const {
+ DCHECK(IsValidCard(card_addr))
+ << " card_addr: " << reinterpret_cast<const void*>(card_addr)
<< " begin: " << reinterpret_cast<void*>(mem_map_->Begin() + offset_)
<< " end: " << reinterpret_cast<void*>(mem_map_->End());
- uintptr_t offset = cardAddr - biased_begin_;
+ uintptr_t offset = card_addr - biased_begin_;
return reinterpret_cast<void*>(offset << GC_CARD_SHIFT);
}
// Returns true iff the card table address is within the bounds of the card table.
- bool IsValidCard(const byte* cardAddr) const {
+ bool IsValidCard(const byte* card_addr) const {
byte* begin = mem_map_->Begin() + offset_;
byte* end = mem_map_->End();
- return cardAddr >= begin && cardAddr < end;
+ return card_addr >= begin && card_addr < end;
}
// Verifies that all gray objects are on a dirty card.
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 8f30c73..4d244fd 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -594,16 +594,16 @@
while (max >= min) {
int32_t mid = (min + max) / 2;
- const TryItem* pTry = DexFile::GetTryItems(code_item, mid);
- uint32_t start = pTry->start_addr_;
+ const TryItem* try_item = DexFile::GetTryItems(code_item, mid);
+ uint32_t start = try_item->start_addr_;
if (address < start) {
max = mid - 1;
} else {
- uint32_t end = start + pTry->insn_count_;
+ uint32_t end = start + try_item->insn_count_;
if (address >= end) {
min = mid + 1;
} else { // We have a winner!
- return (int32_t) pTry->handler_off_;
+ return (int32_t) try_item->handler_off_;
}
}
}
diff --git a/src/dex_file.h b/src/dex_file.h
index 9fcdeb0..708e9fd 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -688,8 +688,8 @@
// Callback for "new locals table entry". "signature" is an empty string
// if no signature is available for an entry.
typedef void (*DexDebugNewLocalCb)(void* context, uint16_t reg,
- uint32_t startAddress,
- uint32_t endAddress,
+ uint32_t start_address,
+ uint32_t end_address,
const char* name,
const char* descriptor,
const char* signature);
diff --git a/src/heap.cc b/src/heap.cc
index 7261670..888c75d 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -514,7 +514,6 @@
// Try harder, growing the heap if necessary.
ptr = space->AllocWithGrowth(alloc_size);
if (ptr != NULL) {
- //size_t new_footprint = dvmHeapSourceGetIdealFootprint();
size_t new_footprint = space->GetFootprintLimit();
// OLD-TODO: may want to grow a little bit more so that the amount of
// free space is equal to the old free space + the
@@ -603,7 +602,7 @@
is_gc_running_ = true;
TimingLogger timings("CollectGarbageInternal");
- uint64_t t0 = NanoTime(), rootEnd = 0, dirtyBegin = 0, dirtyEnd = 0;
+ uint64_t t0 = NanoTime(), root_end = 0, dirty_begin = 0, dirty_end = 0;
ThreadList* thread_list = Runtime::Current()->GetThreadList();
thread_list->SuspendAll();
@@ -638,7 +637,7 @@
// heap lock would re-suspend since we have not yet called ResumeAll.
thread_list->ResumeAll();
Unlock();
- rootEnd = NanoTime();
+ root_end = NanoTime();
timings.AddSplit("RootEnd");
}
@@ -647,7 +646,7 @@
timings.AddSplit("RecursiveMark");
if (concurrent) {
- dirtyBegin = NanoTime();
+ dirty_begin = NanoTime();
Lock();
thread_list->SuspendAll();
timings.AddSplit("ReSuspend");
@@ -683,7 +682,7 @@
GrowForUtilization();
timings.AddSplit("GrowForUtilization");
thread_list->ResumeAll();
- dirtyEnd = NanoTime();
+ dirty_end = NanoTime();
EnqueueClearedReferences(&cleared_references);
RequestHeapTrim();
@@ -699,14 +698,14 @@
// lose low nanoseconds in duration. TODO: make this part of PrettyDuration
duration_ns = (duration_ns / 1000) * 1000;
if (concurrent) {
- uint64_t pauseRootsTime = (rootEnd - t0) / 1000 * 1000;
- uint64_t pauseDirtyTime = (dirtyEnd - dirtyBegin) / 1000 * 1000;
+ uint64_t pause_roots_time = (root_end - t0) / 1000 * 1000;
+ uint64_t pause_dirty_time = (dirty_end - dirty_begin) / 1000 * 1000;
LOG(INFO) << "GC freed " << PrettySize(bytes_freed) << ", " << GetPercentFree() << "% free, "
<< PrettySize(num_bytes_allocated_) << "/" << PrettySize(GetTotalMemory()) << ", "
- << "paused " << PrettyDuration(pauseRootsTime) << "+" << PrettyDuration(pauseDirtyTime)
+ << "paused " << PrettyDuration(pause_roots_time) << "+" << PrettyDuration(pause_dirty_time)
<< ", total " << PrettyDuration(duration_ns);
} else {
- uint64_t markSweepTime = (dirtyEnd - t0) / 1000 * 1000;
+ uint64_t markSweepTime = (dirty_end - t0) / 1000 * 1000;
LOG(INFO) << "GC freed " << PrettySize(bytes_freed) << ", " << GetPercentFree() << "% free, "
<< PrettySize(num_bytes_allocated_) << "/" << PrettySize(GetTotalMemory()) << ", "
<< "paused " << PrettyDuration(markSweepTime)
diff --git a/src/heap_bitmap.h b/src/heap_bitmap.h
index 70684b9..aaa764a 100644
--- a/src/heap_bitmap.h
+++ b/src/heap_bitmap.h
@@ -53,7 +53,7 @@
typedef void ScanCallback(Object* obj, void* finger, void* arg);
- typedef void SweepCallback(size_t numPtrs, Object** ptrs, void* arg);
+ typedef void SweepCallback(size_t ptr_count, Object** ptrs, void* arg);
// Initialize a HeapBitmap so that it points to a bitmap large enough to cover a heap at
// heap_begin of heap_capacity bytes, where objects are guaranteed to be kAlignment-aligned.
diff --git a/src/logging.cc b/src/logging.cc
index 86c8bdf..30063a1 100644
--- a/src/logging.cc
+++ b/src/logging.cc
@@ -164,14 +164,14 @@
size_t byte_count = byte_count_;
int gap = static_cast<int>(offset & 0x0f);
while (byte_count) {
- unsigned int lineOffset = offset & ~0x0f;
+ unsigned int line_offset = offset & ~0x0f;
char* hex = out;
char* asc = out + 59;
for (int i = 0; i < 8; i++) {
- *hex++ = gHexDigit[lineOffset >> 28];
- lineOffset <<= 4;
+ *hex++ = gHexDigit[line_offset >> 28];
+ line_offset <<= 4;
}
hex++;
hex++;
diff --git a/src/verifier/method_verifier.h b/src/verifier/method_verifier.h
index 75dcbc7..afbfa16 100644
--- a/src/verifier/method_verifier.h
+++ b/src/verifier/method_verifier.h
@@ -347,11 +347,11 @@
// into an exception handler, but it's valid to do so as long as the target isn't a
// "move-exception" instruction. We verify that in a later stage.
// The dex format forbids certain instructions from branching to themselves.
- // Updates "insnFlags", setting the "branch target" flag.
+ // Updates "insn_flags_", setting the "branch target" flag.
bool CheckBranchTarget(uint32_t cur_offset);
// Verify a switch table. "cur_offset" is the offset of the switch instruction.
- // Updates "insnFlags", setting the "branch target" flag.
+ // Updates "insn_flags_", setting the "branch target" flag.
bool CheckSwitchTargets(uint32_t cur_offset);
// Check the register indices used in a "vararg" instruction, such as invoke-virtual or
diff --git a/src/zip_archive.cc b/src/zip_archive.cc
index 70a6261..18a2f30 100644
--- a/src/zip_archive.cc
+++ b/src/zip_archive.cc
@@ -207,10 +207,10 @@
zerr = inflate(&zstream->Get(), Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
LOG(WARNING) << "Zip: inflate zerr=" << zerr
- << " (nIn=" << zstream->Get().next_in
- << " aIn=" << zstream->Get().avail_in
- << " nOut=" << zstream->Get().next_out
- << " aOut=" << zstream->Get().avail_out
+ << " (next_in=" << zstream->Get().next_in
+ << " avail_in=" << zstream->Get().avail_in
+ << " next_out=" << zstream->Get().next_out
+ << " avail_out=" << zstream->Get().avail_out
<< ")";
return false;
}