OSDN Git Service

Add bpf support for NetworkStatsFactory
authorChenbo Feng <fengc@google.com>
Tue, 21 Nov 2017 01:03:59 +0000 (17:03 -0800)
committerChenbo Feng <fengc@google.com>
Tue, 23 Jan 2018 08:34:53 +0000 (00:34 -0800)
commit828f1b45fb302f68b5eb8934bf474177fa249c7c
tree2a9daf59be1015dbb918617e0663a439c708cecc
parentaedd6a3bdcb0b63c0bd6c6f01b720cddfedd51b8
Add bpf support for NetworkStatsFactory

Add the native method used to read the detail information of network
stats from bpf maps. The native method of NetworkStatsFactory should
choose the correct implementation to get the stats detail depending on
the kernel version. Currently the bpf result is printed as a reference
and the actual behavior of NetworkStatsFactory should not change.

Test: NetworkStatsFactory related cts test should not fail.
Bug: 30950746
Change-Id: I4715a23559b5b2306bd556cea0431f0ed172a993
core/java/com/android/internal/net/NetworkStatsFactory.java
core/jni/Android.bp
core/jni/com_android_internal_net_NetworkStatsFactory.cpp
core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java