Merge "Dump no. of open fds correctly." into rvc-dev am: b63e5b27a0 am: 6f97394207 am: 494bcd9ddf
Change-Id: I28d07b54f9065f78ec5a08cd195fe71870d089fa
This commit is contained in:
@@ -346,6 +346,9 @@ class BlobMetadata {
|
|||||||
mRevocableFds.get(callingPackage);
|
mRevocableFds.get(callingPackage);
|
||||||
if (revocableFdsForPkg != null) {
|
if (revocableFdsForPkg != null) {
|
||||||
revocableFdsForPkg.remove(revocableFd);
|
revocableFdsForPkg.remove(revocableFd);
|
||||||
|
if (revocableFdsForPkg.isEmpty()) {
|
||||||
|
mRevocableFds.remove(callingPackage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -360,6 +363,9 @@ class BlobMetadata {
|
|||||||
|
|
||||||
fout.println("Committers:");
|
fout.println("Committers:");
|
||||||
fout.increaseIndent();
|
fout.increaseIndent();
|
||||||
|
if (mCommitters.isEmpty()) {
|
||||||
|
fout.println("<empty>");
|
||||||
|
} else {
|
||||||
for (int i = 0, count = mCommitters.size(); i < count; ++i) {
|
for (int i = 0, count = mCommitters.size(); i < count; ++i) {
|
||||||
final Committer committer = mCommitters.valueAt(i);
|
final Committer committer = mCommitters.valueAt(i);
|
||||||
fout.println("committer " + committer.toString());
|
fout.println("committer " + committer.toString());
|
||||||
@@ -367,10 +373,14 @@ class BlobMetadata {
|
|||||||
committer.dump(fout);
|
committer.dump(fout);
|
||||||
fout.decreaseIndent();
|
fout.decreaseIndent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fout.decreaseIndent();
|
fout.decreaseIndent();
|
||||||
|
|
||||||
fout.println("Leasees:");
|
fout.println("Leasees:");
|
||||||
fout.increaseIndent();
|
fout.increaseIndent();
|
||||||
|
if (mLeasees.isEmpty()) {
|
||||||
|
fout.println("<empty>");
|
||||||
|
} else {
|
||||||
for (int i = 0, count = mLeasees.size(); i < count; ++i) {
|
for (int i = 0, count = mLeasees.size(); i < count; ++i) {
|
||||||
final Leasee leasee = mLeasees.valueAt(i);
|
final Leasee leasee = mLeasees.valueAt(i);
|
||||||
fout.println("leasee " + leasee.toString());
|
fout.println("leasee " + leasee.toString());
|
||||||
@@ -378,9 +388,22 @@ class BlobMetadata {
|
|||||||
leasee.dump(mContext, fout);
|
leasee.dump(mContext, fout);
|
||||||
fout.decreaseIndent();
|
fout.decreaseIndent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fout.decreaseIndent();
|
fout.decreaseIndent();
|
||||||
|
|
||||||
fout.println("Open fds: #" + mRevocableFds.size());
|
fout.println("Open fds:");
|
||||||
|
fout.increaseIndent();
|
||||||
|
if (mRevocableFds.isEmpty()) {
|
||||||
|
fout.println("<empty>");
|
||||||
|
} else {
|
||||||
|
for (int i = 0, count = mRevocableFds.size(); i < count; ++i) {
|
||||||
|
final String packageName = mRevocableFds.keyAt(i);
|
||||||
|
final ArraySet<RevocableFileDescriptor> packageFds =
|
||||||
|
mRevocableFds.valueAt(i);
|
||||||
|
fout.println(packageName + "#" + packageFds.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fout.decreaseIndent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeToXml(XmlSerializer out) throws IOException {
|
void writeToXml(XmlSerializer out) throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user