MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / lookupClassId

Function lookupClassId

src/objectSampler.cpp:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17static u32 lookupClassId(jvmtiEnv* jvmti, jclass cls) {
18 u32 class_id = 0;
19 char* class_name;
20 if (jvmti->GetClassSignature(cls, &class_name, NULL) == 0) {
21 if (class_name[0] == 'L') {
22 class_id = Profiler::instance()->classMap()->lookup(class_name + 1, strlen(class_name) - 2);
23 } else {
24 class_id = Profiler::instance()->classMap()->lookup(class_name);
25 }
26 jvmti->Deallocate((unsigned char*)class_name);
27 }
28 return class_id;
29}
30
31
32class LiveRefs {

Callers 2

dumpMethod · 0.85
recordAllocationMethod · 0.85

Calls 2

lookupMethod · 0.80
classMapMethod · 0.80

Tested by

no test coverage detected