- Profiling frameworks like JVMTI are not available for the Blu-ray Java platform.
- Using System.out may not be feasible for some players are known to
hinder the application performance when it's used.
- The system clock on the players is too slow to measure anything
meaningful on non-PS3 players.
Our team at Sun have developed an innovative way of profiling of Blu-ray Java
applications. I will refer to it as hdcookbook profiler as it's
made available through our open source project at: https://hdcookbook.dev.java.net
More about hdcookbook profiler:
- The execution time is measured using PC's clock, not the player's clock.
This enables logging of nanoseconds instead of milliseconds.
- The profiling data is collected with minimum heap data and time overhead.
- The profiler does not generate any profiling information on its own. This is totally
under user's control. The user explcitly adds the profiling points of interest
to the application.
- The profiling events (start/stop timer) are communicated to the PC by means of UDP packets.
The profiling events can be debug messages as well.
- For viewing the profiled data, we have two UI applications available, one of them
was developed for immediate use and the second one came out later.
A screen shot of the ProfileBrowser (second one) is shown here:
- The vertical bars represent the execution times for each method. The RED
stretches indicate the execution times that are out side the standard window of
execution times for a given method.
If you see many red colored stretches, you can increase the deviation factor
say by: 2 ( i.e 2 \* standard deviation) or more to identify execution times
that are taking way too longer than the standard execution times for that method.
- You can select the time unit that is convenient for analyzing the data at hand.
We have set Microseconds as a default time unit. You can switch between micro, nano,
millis and secs without resulting in any loss of precision during switching.
- The range slider (right side bar; looks like scroll bar but with arrows pointing
in opposite directions) allows zoom-in and zoom-out (narrowing down)
of the time scale with up and down mouse dragging.
That means you could zoom into a time range of interest by just dragging the mouse.
- Method Filtering: You can provide an expression to filter the data on the display
(the editable box is on the left at the bottom) and get the timeline for selected
method/s. For example, you could type in an expression: a | b
This will only plot methods names starting with letters a or b.
This is useful for focussing on the individual method/s of interest to see how the
timeline looks for them.
Also see this write up about profiler