Search in sources :

Example 1 with FileBinary

use of com.navercorp.pinpoint.profiler.util.FileBinary in project pinpoint by naver.

the class PlainClassLoaderHandler method defineJarClass.

private void defineJarClass(ClassLoader classLoader, ClassLoaderAttachment attachment) {
    if (isDebug) {
        logger.debug("define Jar:{}", pluginConfig.getPluginJarURLExternalForm());
    }
    List<FileBinary> fileBinaryList = readJar();
    Map<String, SimpleClassMetadata> classEntryMap = parse(fileBinaryList);
    for (Map.Entry<String, SimpleClassMetadata> entry : classEntryMap.entrySet()) {
        final SimpleClassMetadata classMetadata = entry.getValue();
        ClassLoadingChecker classLoadingChecker = new ClassLoadingChecker();
        classLoadingChecker.isFirstLoad(classMetadata.getClassName());
        define0(classLoader, attachment, classMetadata, classEntryMap, classLoadingChecker);
    }
}
Also used : SimpleClassMetadata(com.navercorp.pinpoint.profiler.instrument.classreading.SimpleClassMetadata) FileBinary(com.navercorp.pinpoint.profiler.util.FileBinary) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Map(java.util.Map) ConcurrentWeakHashMap(com.navercorp.pinpoint.common.profiler.concurrent.jsr166.ConcurrentWeakHashMap) ClassLoadingChecker(com.navercorp.pinpoint.profiler.plugin.ClassLoadingChecker)

Example 2 with FileBinary

use of com.navercorp.pinpoint.profiler.util.FileBinary in project pinpoint by naver.

the class PlainClassLoaderHandler method parse.

private Map<String, SimpleClassMetadata> parse(List<FileBinary> fileBinaryList) {
    Map<String, SimpleClassMetadata> parseMap = new HashMap<>();
    for (FileBinary fileBinary : fileBinaryList) {
        SimpleClassMetadata classNode = parseClass(fileBinary);
        parseMap.put(classNode.getClassName(), classNode);
    }
    return parseMap;
}
Also used : SimpleClassMetadata(com.navercorp.pinpoint.profiler.instrument.classreading.SimpleClassMetadata) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ConcurrentWeakHashMap(com.navercorp.pinpoint.common.profiler.concurrent.jsr166.ConcurrentWeakHashMap) FileBinary(com.navercorp.pinpoint.profiler.util.FileBinary)

Aggregations

ConcurrentWeakHashMap (com.navercorp.pinpoint.common.profiler.concurrent.jsr166.ConcurrentWeakHashMap)2 SimpleClassMetadata (com.navercorp.pinpoint.profiler.instrument.classreading.SimpleClassMetadata)2 FileBinary (com.navercorp.pinpoint.profiler.util.FileBinary)2 HashMap (java.util.HashMap)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ClassLoadingChecker (com.navercorp.pinpoint.profiler.plugin.ClassLoadingChecker)1 Map (java.util.Map)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1