summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler/dex/ssa_transformation.cc2
-rw-r--r--compiler/oat_writer.cc2
-rw-r--r--runtime/stack.cc4
-rw-r--r--runtime/stack.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/compiler/dex/ssa_transformation.cc b/compiler/dex/ssa_transformation.cc
index 366d7f2..0ca5fd4 100644
--- a/compiler/dex/ssa_transformation.cc
+++ b/compiler/dex/ssa_transformation.cc
@@ -179,7 +179,7 @@ void MIRGraph::ComputeDomPostOrderTraversal(BasicBlock* bb) {
bb->visited = true;
work_stack.push_back(std::make_pair(bb, new (arena_) ArenaBitVector::Iterator(bb->i_dominated)));
while (!work_stack.empty()) {
- std::pair<BasicBlock*, ArenaBitVector::Iterator*> curr = work_stack.back();
+ const std::pair<BasicBlock*, ArenaBitVector::Iterator*>& curr = work_stack.back();
BasicBlock* curr_bb = curr.first;
ArenaBitVector::Iterator* curr_idom_iter = curr.second;
int bb_idx = curr_idom_iter->Next();
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc
index f9d6e41..f23b72b 100644
--- a/compiler/oat_writer.cc
+++ b/compiler/oat_writer.cc
@@ -667,7 +667,7 @@ size_t OatWriter::WriteCodeMethod(OutputStream& out, const size_t file_offset,
const CompiledMethod* compiled_method =
compiler_driver_->GetCompiledMethod(MethodReference(&dex_file, method_idx));
- OatMethodOffsets method_offsets =
+ const OatMethodOffsets& method_offsets =
oat_classes_[oat_class_index]->method_offsets_[class_def_method_index];
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 1715664..5d3a9a5 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -253,7 +253,7 @@ std::string StackVisitor::DescribeLocation() const {
return result;
}
-instrumentation::InstrumentationStackFrame StackVisitor::GetInstrumentationStackFrame(uint32_t depth) const {
+instrumentation::InstrumentationStackFrame& StackVisitor::GetInstrumentationStackFrame(uint32_t depth) const {
return thread_->GetInstrumentationStack()->at(depth);
}
@@ -309,7 +309,7 @@ void StackVisitor::WalkStack(bool include_transitions) {
// While profiling, the return pc is restored from the side stack, except when walking
// the stack for an exception where the side stack will be unwound in VisitFrame.
if (GetQuickInstrumentationExitPc() == return_pc) {
- instrumentation::InstrumentationStackFrame instrumentation_frame =
+ const instrumentation::InstrumentationStackFrame& instrumentation_frame =
GetInstrumentationStackFrame(instrumentation_stack_depth);
instrumentation_stack_depth++;
if (GetMethod() == Runtime::Current()->GetCalleeSaveMethod(Runtime::kSaveAll)) {
diff --git a/runtime/stack.h b/runtime/stack.h
index 700b7f1..a4b93bc 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -567,7 +567,7 @@ class StackVisitor {
static void DescribeStack(Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
private:
- instrumentation::InstrumentationStackFrame GetInstrumentationStackFrame(uint32_t depth) const;
+ instrumentation::InstrumentationStackFrame& GetInstrumentationStackFrame(uint32_t depth) const;
void SanityCheckFrame() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);