aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Vaage <vaage@google.com>2024-05-13 21:36:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-13 21:36:43 +0000
commit5c9c5ff842509ea71a2f79a37bb4ebe930c2e9ba (patch)
treee8efcbd57dd222fb1ca056bc5c10364c8d168e09
parent887bfb079414695383a377823386d00add266775 (diff)
parentd54f6b20b81f4a7ff3b4879c0305a1ffee948689 (diff)
downloadperfetto-5c9c5ff842509ea71a2f79a37bb4ebe930c2e9ba.tar.gz
Merge "Trace Redaction - Avoid passing decoder by value" into main
-rw-r--r--src/trace_redaction/collect_timeline_events.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/trace_redaction/collect_timeline_events.cc b/src/trace_redaction/collect_timeline_events.cc
index aac9752a2..70f92f587 100644
--- a/src/trace_redaction/collect_timeline_events.cc
+++ b/src/trace_redaction/collect_timeline_events.cc
@@ -37,7 +37,7 @@ using SchedProcessFreeFtraceEvent = protos::pbzero::SchedProcessFreeFtraceEvent;
using TaskNewtaskFtraceEvent = protos::pbzero::TaskNewtaskFtraceEvent;
void MarkOpen(uint64_t ts,
- ProcessTree::Process::Decoder process,
+ const ProcessTree::Process::Decoder& process,
ProcessThreadTimeline* timeline) {
// The uid in the process tree is a int32_t, but in the package list, the uid
// is a uint64_t.
@@ -48,14 +48,14 @@ void MarkOpen(uint64_t ts,
}
void MarkOpen(uint64_t ts,
- ProcessTree::Thread::Decoder thread,
+ const ProcessTree::Thread::Decoder& thread,
ProcessThreadTimeline* timeline) {
auto e = ProcessThreadTimeline::Event::Open(ts, thread.tid(), thread.tgid());
timeline->Append(e);
}
void MarkClose(const FtraceEvent::Decoder& event,
- SchedProcessFreeFtraceEvent::Decoder process_free,
+ const SchedProcessFreeFtraceEvent::Decoder process_free,
ProcessThreadTimeline* timeline) {
auto e = ProcessThreadTimeline::Event::Close(event.timestamp(),
process_free.pid());
@@ -63,7 +63,7 @@ void MarkClose(const FtraceEvent::Decoder& event,
}
void MarkOpen(const FtraceEvent::Decoder& event,
- TaskNewtaskFtraceEvent::Decoder new_task,
+ const TaskNewtaskFtraceEvent::Decoder new_task,
ProcessThreadTimeline* timeline) {
// Event though pid() is uint32_t. all other pid values use int32_t, so it's
// assumed to be safe to narrow-cast it.
@@ -74,7 +74,7 @@ void MarkOpen(const FtraceEvent::Decoder& event,
}
void AppendEvents(uint64_t ts,
- ProcessTree::Decoder tree,
+ const ProcessTree::Decoder& tree,
ProcessThreadTimeline* timeline) {
for (auto it = tree.processes(); it; ++it) {
MarkOpen(ts, ProcessTree::Process::Decoder(*it), timeline);
@@ -85,7 +85,7 @@ void AppendEvents(uint64_t ts,
}
}
-void AppendEvents(FtraceEventBundle::Decoder ftrace_events,
+void AppendEvents(const FtraceEventBundle::Decoder& ftrace_events,
ProcessThreadTimeline* timeline) {
for (auto it = ftrace_events.event(); it; ++it) {
FtraceEvent::Decoder event(*it);