I am trying to profile a simple algorithm: "Insertion Sort". The code takes the number of elements to sort and then randomly creates those many elements after which the sorting starts.
I am using Visual VM for profiling. However when I start profiling I see the below warning messages on the console:
objc[62944]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java (0x10004f4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1078054e0). One of the two will be used. Which one is undefined.
Profiler Agent: Waiting for connection on port 5140 (Protocol version: 15)
Profiler Agent: Established connection with the tool
Profiler Agent: Local accelerated session
Profiler Agent Warning: JVMTI classLoadHook: class name is null.
Profiler Agent Warning: JVMTI classLoadHook: class name is null.
Profiler engine warning: class
sun.reflect.GeneratedSerializationConstructorAccessor29 that should be instrumented is not loaded by target VM
*** Requested classloader: sun.reflect.DelegatingClassLoader@21497e21, its class = class sun.reflect.DelegatingClassLoader, index = 39, hashcode = 558464545
*** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor29
*** probably it has been unloaded recently
*** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor28 that should be instrumented is not loaded by target VM
*** Requested classloader: sun.reflect.DelegatingClassLoader@3b0cf023, its class = class sun.reflect.DelegatingClassLoader, index = 40, hashcode = 990703651
*** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor28
*** probably it has been unloaded recently
*** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor27 that should be instrumented is not loaded by target VM
*** Requested classloader: sun.reflect.DelegatingClassLoader@23a0a147, its class = class sun.reflect.DelegatingClassLoader, index = 41, hashcode = 597729607
*** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor27
*** probably it has been unloaded recently
*** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor26 that should be instrumented is not loaded by target VM
*** Requested classloader: sun.reflect.DelegatingClassLoader@61aaeaa4, its class = class sun.reflect.DelegatingClassLoader, index = 42, hashcode = 1638591140
*** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor26
*** probably it has been unloaded recently
I am not sure if the profile data is correct or not.