/** * Constructs all of the counters in the given launch configuration. * * @param config the launch configuration * @return an array of all counters */ public static OprofileCounter[] getCounters(ILaunchConfiguration config) { OprofileCounter[] ctrs = new OprofileCounter[Oprofile.getNumberOfCounters()]; for (int i = 0; i < ctrs.length; i++) { ctrs[i] = new OprofileCounter(i); if (config != null) ctrs[i].loadConfiguration(config); } return ctrs; }