docs: public ArrayList getPerfLevelDescriptors(boolean jmxBased) {
          ArrayList res = new ArrayList();
          if (instance == null) {
              res.add(new PerfLevelDescriptor(new String[] { "pmi" }, level));
          } else {
              PmiModule instance = getInstance();
              if (jmxBased) {
                  if (instance.getMBeanName() != null) {
                      int level = instance.getInstrumentationLevel();
                      MBeanLevelSpec spec = new MBeanLevelSpec(instance.getMBeanName(), instance.getMSD_StatDescriptor(), level);
  
                      if (level == LEVEL_FINEGRAIN)
                          spec.setEnabled(instance.getEnabled());
  
                      res.add(spec);
                  }
  
                  //instance.getEnabledSync()));
                  else
                      return res;
              } else {
                  PerfLevelDescriptor pld;
                  String[] path = instance.getPath();
                  pld = new PerfLevelDescriptor(path, instance.getInstrumentationLevel(), instance.getModuleID());
                  res.add(pld);
              }
  
          }
  
          // recursively get from children
          ModuleItem[] items = children();
          if (items == null)
              return res;
  
          for (int i = 0; i < items.length; i++) {
              ArrayList childrenLevels = items[i].getPerfLevelDescriptors(jmxBased);
              if (childrenLevels == null || childrenLevels.size() == 0)
                  continue;
  
              for (int j = 0; j < childrenLevels.size(); j++)
                  res.add(childrenLevels.get(j));
          }
  
          return res;
      }