Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bc989ab authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue
Browse files

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
parent 96efbfe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
  }
}