I am trying to get the class name from jobject in jvmti, I tried get
(*jvmti)->GetClassSignature(jvmti, object_klass, &signature, &generic);
for code like this
public static void main(String arg[]) throws Exception {
Set<String> names = new HashSet<>();
names.add("foo");
names.add("bar");
System.out.println(names);
}
I am tracking all allocation of objects in jvmti, I don't get java.util.HashSet
in this hook
I get bunch of
Ljava/lang/String; Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/String;>;Ljava/lang/CharSequence;
Ljava/lang/reflect/Method; (null)
and some other classes, but I don't see new HashSet<>
initialization