Skip to content

Instantly share code, notes, and snippets.

View zaki50's full-sized avatar

Makoto Yamazaki zaki50

View GitHub Profile
compileOptions {
encoding = "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
@zaki50
zaki50 / RealmUtil.java
Last active January 31, 2018 21:28
create `io.realm` package and then put following `RealmUtil` class into the package. `Log.d("RealmCount", RealmUtil.dumpRealmCount());` dumps the information.
package io.realm;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.EnumMap;
import java.util.Map;
public class RealmUtil {
2017-08-08 21:30:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.141-b15 mixed mode):
"Attach Listener" #207 daemon prio=9 os_prio=31 tid=0x00007f9dcb89d800 nid=0x5907 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"process reaper" #89 daemon prio=10 os_prio=31 tid=0x00007f9dcaa17800 nid=0x9f0b waiting on condition [0x0000700005e4f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000739227228> (a java.util.concurrent.SynchronousQueue$TransferStack)