List of usage examples for android.os Debug dumpHprofData
public static void dumpHprofData(String fileName) throws IOException
From source file:Main.java
public static void dumpHprof(String path) { try {// w w w. ja va2 s . c o m String name = getDate() + OOM_SUFFIX; path = path + File.separator + name; File file = path != null ? new File(path) : null; if (!file.getParentFile().exists()) file.getParentFile().mkdirs(); Debug.dumpHprofData(path); } catch (Throwable t) { t.printStackTrace(); } }
From source file:com.anysoftkeyboard.ui.dev.DeveloperUtils.java
public static File createMemoryDump() throws IOException, UnsupportedOperationException { File extFolder = Environment.getExternalStorageDirectory(); File target = new File(extFolder, ASK_MEM_DUMP_FILENAME); target.delete();// w ww .j a v a 2s .c om Debug.dumpHprofData(target.getAbsolutePath()); return target; }