summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Zimuzo Ezeozue <zezeozue@google.com> 2025-02-18 16:46:38 +0000
committer Zimuzo Ezeozue <zezeozue@google.com> 2025-02-18 16:46:38 +0000
commit1bc989aba8a2f0748b38798d518f72227945d01b (patch)
treed0417452e5370c75ca25448b2cf486c773fe983e
parent96efbfe8adeccd80ba301335036baef9d922cc40 (diff)
Reset arguments after emitting a perfetto event
We were always resetting arguments but this was left to the caller and was one more non-trivial JNI call. While we are in the library code we should just reset the arguments right away Test: atest PerfettoTraceTest Bug: 303199244 Flag: android.os.perfetto_sdk_tracing_v2 Change-Id: If093c436c24b5519a98d19f7ccf7171f1ded3793
-rw-r--r--libs/tracing_perfetto/tracing_sdk.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/tracing_perfetto/tracing_sdk.cpp b/libs/tracing_perfetto/tracing_sdk.cpp
index c97e900952..70b8be981b 100644
--- a/libs/tracing_perfetto/tracing_sdk.cpp
+++ b/libs/tracing_perfetto/tracing_sdk.cpp
@@ -38,7 +38,7 @@ void trace_event(int type, const PerfettoTeCategory* perfettoTeCategory,
PerfettoTeHlEmitImpl(perfettoTeCategory->impl, type,
type == PERFETTO_TE_TYPE_COUNTER ? nullptr : name,
extra->get());
- extra->pop_extra();
+ extra->clear_extras();
}
}