27 lines
808 B
Java
27 lines
808 B
Java
package com.squareup.haha.perflib;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.Set;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class HahaSpy {
|
|
private HahaSpy() {
|
|
throw new AssertionError();
|
|
}
|
|
|
|
public static Set<RootObj> allGcRoots(Snapshot snapshot) {
|
|
HashSet hashSet = new HashSet();
|
|
Iterator<Heap> it = snapshot.getHeaps().iterator();
|
|
while (it.hasNext()) {
|
|
hashSet.addAll(it.next().mRoots);
|
|
}
|
|
return hashSet;
|
|
}
|
|
|
|
public static Instance allocatingThread(Instance instance) {
|
|
Snapshot snapshot = instance.mHeap.mSnapshot;
|
|
return snapshot.findInstance(snapshot.getThread(instance instanceof RootObj ? ((RootObj) instance).mThread : instance.mStack.mThreadSerialNumber).mId);
|
|
}
|
|
}
|