android_packages_modules_Co.../service-t/native/libs/libnetworkstats
Ryan Zuklie 619e801e5d Try to fix and diagnose Perfetto flush errors.
Around 10% of the traces with Nettrace have "traced_final_flush_failed"
errors. It is believed that Network Tracing isn't writing enough data to
fill one "Chunk" in Perfetto's buffer. Although this should still be
saved by Perfetto, it doesn't seem to be.

This change records the number of packets read from the ring buffer to
understand whether the error coincided with low-data cases. It also
tries to flush the data OnStop to potentially fix the issue.

Bug: 285411033
Test: flash and run trace
(cherry picked from https://android-review.googlesource.com/q/commit:80d705566be6ea8a822eebd088c1f37758fdf0f6)
Merged-In: I92c8d2d8d47d1ed123585e1cfdde802d286f120f
Change-Id: I92c8d2d8d47d1ed123585e1cfdde802d286f120f

Former-commit-id: 8e7e8a9284
2023-06-01 22:43:00 +00:00
..
include/netdbpf BpfNetworkStats: pass lines vector by reference in 2 more functions 2023-04-18 05:35:10 +00:00
Android.bp Try to fix and diagnose Perfetto flush errors. 2023-06-01 22:43:00 +00:00
BpfNetworkStats.cpp BpfNetworkStats: pass lines vector by reference in 2 more functions 2023-04-18 05:35:10 +00:00
BpfNetworkStatsTest.cpp BpfNetworkStats: pass lines vector by reference in 2 more functions 2023-04-18 05:35:10 +00:00
NetworkTraceHandler.cpp Try to fix and diagnose Perfetto flush errors. 2023-06-01 22:43:00 +00:00
NetworkTraceHandlerTest.cpp Prevent NetworkTraceHandlerTest from touching BPF. 2023-04-03 16:00:15 -07:00
NetworkTracePoller.cpp Try to fix and diagnose Perfetto flush errors. 2023-06-01 22:43:00 +00:00
NetworkTracePollerTest.cpp Attempt to fix NetworkTracePollerTest flake 2023-03-16 01:05:39 +00:00