October 21, 2024
Chicago 12, Melborne City, USA
java

How to profile CPU cache miss/hit for Java apps?


I want to figure out the performance difference between two Java applications.
Both are tree-searching algorithms, but the faster one requires more pointer dereferences with less footprint (by static analysis).

I guess, the better performance derives from the better locality – higher CPU cache hit rate.
To verify my conjecture I tried to profile CPU cache performance with Intel VTune, however I found it is unsupported in the latest Intel VTune Profiler v2024.3.0:

Memory Access analysis is not supported inside a virtual machine since uncore events cannot be collected. For full functionality, consider using a bare-metal environment.

So, my question is: how can I profile the CPU cache performance for a Java app?
Or, is it silly to care about such low-level metrics for Java?

Really appreciate any suggestion or advice.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video