Initial commit
This commit is contained in:
26
sources/com/squareup/haha/perflib/HahaSpy.java
Normal file
26
sources/com/squareup/haha/perflib/HahaSpy.java
Normal file
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user