コード例 #1
0
 /**
  * Saves this counter's configuration into the specified launch configuration.
  *
  * @param config the launch configuration
  */
 public void saveConfiguration(ILaunchConfigurationWorkingCopy config) {
   config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(_number), _enabled);
   if (_daemonEvent.getEvent() != null) {
     config.setAttribute(
         OprofileLaunchPlugin.ATTR_COUNTER_EVENT(_number), _daemonEvent.getEvent().getText());
     config.setAttribute(
         OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(_number),
         _daemonEvent.getEvent().getUnitMask().getMaskValue());
   }
   config.setAttribute(
       OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(_number), _daemonEvent.getProfileKernel());
   config.setAttribute(
       OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(_number), _daemonEvent.getProfileUser());
   config.setAttribute(
       OprofileLaunchPlugin.ATTR_COUNTER_COUNT(_number), _daemonEvent.getResetCount());
 }
コード例 #2
0
 /**
  * Method getCount.
  *
  * @return the number of events between samples for this counter
  */
 public int getCount() {
   return _daemonEvent.getResetCount();
 }