I recently had to fix a lag in my application, and I knew it was related to some file I/O stuff (because of a slow NFS server), but had a hard time finding where exactly.
Until I had the idea to add a few items to my .walltime. GREAT feature

The default "values" (see http://www.yourkit.com/docs/70/help/times.jsp) include methods from RandomAccessFile and socket in/out streams.
I just added those :
File.isFile()
File.isDirectory()
File.listFiles(...)
And I also found that sun.awt.X11.XClipboard.getContents(Object) can be slow in certain circumstances.
So here are my additions:
Code: Select all
java.io.File listFiles *
java.io.File isFile ()V
java.io.File isDirectory ()V
sun.awt.X11.XClipboard getContents (Ljava/lang/Object)Ljava/awt/datatransfer/Transferable

Also, there is a bunch of other I/O-bound methods in the File class, which I did not need, but others may. Even if all methods are not I/O-bound, it may be simpler to just include "java.io.File * *" inside the .walltime file.
Cheers,
Hugues