prefetch instructions in Hotspot
Mahmood Naderan
nt_mahmood at yahoo.com
Wed Apr 2 17:15:40 UTC 2014
Right... got it.
Since I am more familiar with C++ than Java, just want to know if I have to recompile/rebuild or update the jdk since I have modified Unsafe.java. Here is my simple code which fails
$ cat Arr.java
public class Arr
{
public static void main(String[] args)
{
int [] a = new int[3];
a[0] = 10; a[1] = 20; a[2] = 30;
for (int i = 0; i < 3; i++)
{
sun.misc.Unsafe.prefetchRead(a[i]);
System.out.println(a[i]);
}
}
}
$ javac Arr.java
Arr.java:11: warning: sun.misc.Unsafe is internal proprietary API and may be removed in a future release
sun.misc.Unsafe.prefetchRead(a[i]);
^
Arr.java:11: cannot find symbol
symbol : method prefetchRead(int)
location: class sun.misc.Unsafe
sun.misc.Unsafe.prefetchRead(a[i]);
^
1 error
1 warning
What did I miss?
Regards,
Mahmood
On Wednesday, April 2, 2014 8:54 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>You need to download Hotspot JVM sources too that is where library_call.cpp.
>
>Vladimir
More information about the hotspot-dev
mailing list