Java has simplified programming multi-threaded applications. Unfortunately,
there are pitfalls that can create deadlocks, performance issues and incorrect
output. With the addition of the concurrency libraries in Java5, many of these
issues are resolved, but not all. This is where AMD CodeAnalyst comes
in giving us a view into how the hardware can affect the performance of the
Java Virtual Machine and applications running on the JVM. This walkthrough assumes
you are using at least Java5 or above and have two or more processor cores using
Windows XP or later.
In this article, we will use a sample application to demonstrate how CodeAnalyst
can profile your Java application. You will learn how to setup a CodeAnalyst
project to use Event Based Profiling to get an idea of what to investigate in
your own Java applications. Event-Based Profiling allows the developer to tie
in running code with hardware events such as a cache miss, locked instructions
or pipeline stalls. If you are new to CodeAnalyst, please see Using
AMD CodeAnalyst with Java.