For the server side, DTrace -- available in Solaris (10 and above) -- allows probing of almost every system (I/O, network, scheduling, memory) operation, as well as tracing user native and Java programming language code. On the client cide, the Mozilla DTrace project at OpenSolaris offers JavaScript tracing capabilities using DTrace.
In my simplistic environment, I run both the browser and the application server (a servlet engine) on the same machine. This allows me to use one DTrace script to trace both, and easily see one combined sequence of JavaScript functions and Java methods. You might DTrace JavaScript on a client machine and DTrace the back-end on another server machine, as long as they both run Solaris (10 and above) for Java (server), Solaris Express build 63 or higher for the browser (client).
Read the complete post: http://developers.sun.com/solaris/articles/dtrace_ajax.html