Skip to content

Commit 1bc989a

Browse files
committed
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
1 parent 96efbfe commit 1bc989a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/tracing_perfetto/tracing_sdk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void trace_event(int type, const PerfettoTeCategory* perfettoTeCategory,
3838
PerfettoTeHlEmitImpl(perfettoTeCategory->impl, type,
3939
type == PERFETTO_TE_TYPE_COUNTER ? nullptr : name,
4040
extra->get());
41-
extra->pop_extra();
41+
extra->clear_extras();
4242
}
4343
}
4444

0 commit comments

Comments
 (0)