static Map<String,Object> deepClone(Map<String,Object> map) {
        if (map==null) return null;
        Map<String,Object> mapClone=new HashMap<>(map.size());
        for (Map.Entry<String,Object> entry : map.entrySet())
            mapClone.put(entry.getKey(),QueryProfile.cloneIfNecessary(entry.getValue()));
        return mapClone;
    }
Deep clones a map - this handles all value types which can be found in a query profile
container-search/src/main/java/com/yahoo/search/query/profile/CopyOnWriteContent.java