Fix performance-unnecessary-value-param clang-tidy issues

Test: m tidy-art
Bug: 264654008
Change-Id: I78e5f65032daf9e486a963cc471b8e28369074e1
diff --git a/perfetto_hprof/perfetto_hprof.cc b/perfetto_hprof/perfetto_hprof.cc
index 792cc99..b13e5e1 100644
--- a/perfetto_hprof/perfetto_hprof.cc
+++ b/perfetto_hprof/perfetto_hprof.cc
@@ -893,11 +893,10 @@
   DEFERRED
 };
 
-void ForkAndRun(
-    art::Thread* self,
-    ResumeParentPolicy resume_parent_policy,
-    std::function<void(pid_t child)> parent_runnable,
-    std::function<void(pid_t parent, uint64_t timestamp)> child_runnable) {
+void ForkAndRun(art::Thread* self,
+                ResumeParentPolicy resume_parent_policy,
+                const std::function<void(pid_t child)>& parent_runnable,
+                const std::function<void(pid_t parent, uint64_t timestamp)>& child_runnable) {
   pid_t parent_pid = getpid();
   LOG(INFO) << "preparing to dump heap for " << parent_pid;
   // Need to take a heap dump while GC isn't running. See the comment in