Fix some performance-unnecessary-value-param tidy and performance-for-range warnings.

art/profman/profile_assistant_test.cc:119:54: error: the const qualified parameter 'hot_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
                         const std::vector<uint32_t> hot_methods,
                                                     ^
                                                    &
art/profman/profile_assistant_test.cc:120:54: error: the const qualified parameter 'startup_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
                         const std::vector<uint32_t> startup_methods,
                                                     ^
                                                    &
art/profman/profile_assistant_test.cc:121:54: error: the const qualified parameter 'post_startup_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
                         const std::vector<uint32_t> post_startup_methods,
                                                     ^
                                                    &
art/runtime/subtype_check_info_test.cc:134:56: error: the parameter 'sc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
  static SubtypeCheckInfo CopyCleared(SubtypeCheckInfo sc) {
                                      ~~~~~~~~~~~~~~~~ ^
                                      const &
art/runtime/class_linker.cc:6451:62: error: the parameter 'to_process' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
                          std::vector<ObjPtr<mirror::Class>> to_process)
                          ~~~                                ^
                          const                             &
art/runtime/trace.cc:1127:13: error: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy,-warnings-as-errors]
  for (auto it : exited_threads_) {
       ~~~~ ^
       const &
art/runtime/oat_file_manager.cc:154:41: error: the parameter 'spaces' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
    std::vector<gc::space::ImageSpace*> spaces) {
    ~~~                                 ^
    const                              &
art/test/004-JniTest/jni_test.cc:707:72: error: the parameter 'methods' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
  void TestCalls(const char* declaring_class, std::vector<const char*> methods) {
                                              ~~~                      ^
                                              const                   &
art/compiler/optimizing/optimizing_compiler.cc:1409:89: error: the parameter 'info' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method, debug::MethodDebugInfo info) {
                                                                 ~~~~~                  ^
                                                                 const                 &

Bug: http://b/32619234
Bug: http://b/110779387
Test: Build using WITH_TIDY=1
Change-Id: I911d838b8c26ddab3d6a64024f3220000f078cba
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 9ae025b..3a550ef 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -399,7 +399,8 @@
                             PassObserver* pass_observer,
                             VariableSizedHandleScope* handles) const;
 
-  void GenerateJitDebugInfo(ArtMethod* method, debug::MethodDebugInfo method_debug_info)
+  void GenerateJitDebugInfo(ArtMethod* method,
+                            const debug::MethodDebugInfo& method_debug_info)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
   std::unique_ptr<OptimizingCompilerStats> compilation_stats_;
@@ -1406,7 +1407,8 @@
   return true;
 }
 
-void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method, debug::MethodDebugInfo info) {
+void OptimizingCompiler::GenerateJitDebugInfo(
+    ArtMethod* method, const debug::MethodDebugInfo& info) {
   const CompilerOptions& compiler_options = GetCompilerDriver()->GetCompilerOptions();
   DCHECK(compiler_options.GenerateAnyDebugInfo());