remove TrafficController::dump
Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I399ac8dfc4992f4c604f1d32c2f1b8ae06710808
This commit is contained in:
@@ -187,15 +187,6 @@ static void native_setPermissionForUids(JNIEnv* env, jobject self, jint permissi
|
||||
mTc.setPermissionForUids(permission, data);
|
||||
}
|
||||
|
||||
static void native_dump(JNIEnv* env, jobject self, jobject javaFd, jboolean verbose) {
|
||||
int fd = netjniutils::GetNativeFileDescriptor(env, javaFd);
|
||||
if (fd < 0) {
|
||||
jniThrowExceptionFmt(env, "java/io/IOException", "Invalid file descriptor");
|
||||
return;
|
||||
}
|
||||
mTc.dump(fd, verbose);
|
||||
}
|
||||
|
||||
static jint native_synchronizeKernelRCU(JNIEnv* env, jobject self) {
|
||||
return -bpf::synchronizeKernelRCU();
|
||||
}
|
||||
@@ -232,8 +223,6 @@ static const JNINativeMethod gMethods[] = {
|
||||
(void*)native_swapActiveStatsMap},
|
||||
{"native_setPermissionForUids", "(I[I)V",
|
||||
(void*)native_setPermissionForUids},
|
||||
{"native_dump", "(Ljava/io/FileDescriptor;Z)V",
|
||||
(void*)native_dump},
|
||||
{"native_synchronizeKernelRCU", "()I",
|
||||
(void*)native_synchronizeKernelRCU},
|
||||
};
|
||||
|
||||
@@ -576,13 +576,5 @@ void TrafficController::setPermissionForUids(int permission, const std::vector<u
|
||||
}
|
||||
}
|
||||
|
||||
void TrafficController::dump(int fd, bool verbose __unused) {
|
||||
std::lock_guard guard(mMutex);
|
||||
DumpWriter dw(fd);
|
||||
|
||||
ScopedIndent indentTop(dw);
|
||||
dw.println("TrafficController");
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
} // namespace android
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "android-base/thread_annotations.h"
|
||||
#include "bpf/BpfMap.h"
|
||||
#include "netd.h"
|
||||
#include "netdutils/DumpWriter.h"
|
||||
#include "netdutils/NetlinkListener.h"
|
||||
#include "netdutils/StatusOr.h"
|
||||
|
||||
@@ -55,8 +54,6 @@ class TrafficController {
|
||||
netdutils::Status updateOwnerMapEntry(UidOwnerMatchType match, uid_t uid, FirewallRule rule,
|
||||
FirewallType type) EXCLUDES(mMutex);
|
||||
|
||||
void dump(int fd, bool verbose) EXCLUDES(mMutex);
|
||||
|
||||
netdutils::Status replaceRulesInMap(UidOwnerMatchType match, const std::vector<int32_t>& uids)
|
||||
EXCLUDES(mMutex);
|
||||
|
||||
|
||||
@@ -295,13 +295,6 @@ public class BpfNetMaps {
|
||||
return ConnectivityStatsLog.buildStatsEvent(NETWORK_BPF_MAP_INFO, cookieTagMapSize,
|
||||
uidOwnerMapSize, uidPermissionMapSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call native_dump
|
||||
*/
|
||||
public void nativeDump(final FileDescriptor fd, final boolean verbose) {
|
||||
native_dump(fd, verbose);
|
||||
}
|
||||
}
|
||||
|
||||
/** Constructor used after T that doesn't need to use netd anymore. */
|
||||
@@ -1030,7 +1023,8 @@ public class BpfNetMaps {
|
||||
EOPNOTSUPP, "dumpsys connectivity trafficcontroller dump not available on pre-T"
|
||||
+ " devices, use dumpsys netd trafficcontroller instead.");
|
||||
}
|
||||
mDeps.nativeDump(fd, verbose);
|
||||
|
||||
pw.println("TrafficController"); // required by CTS testDumpBpfNetMaps
|
||||
|
||||
pw.println();
|
||||
pw.println("sEnableJavaBpfMap: " + sEnableJavaBpfMap);
|
||||
@@ -1105,9 +1099,6 @@ public class BpfNetMaps {
|
||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||
private native void native_setPermissionForUids(int permissions, int[] uids);
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||
private static native void native_dump(FileDescriptor fd, boolean verbose);
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||
private static native int native_synchronizeKernelRCU();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user