com-sun-tools-visualvm-sampler

16:34:01.920 INFO  jd.cli.Main - Decompiling com-sun-tools-visualvm-sampler.jar
package com.sun.tools.visualvm.sampler;

public abstract class AbstractSamplerSupport$Refresher
{
  private static final long REFRESH_THRESHOLD = 100L;
  private long lastRefresh;
  
  public final synchronized void refresh()
  {
    if (checkRefresh())
    {
      long currentTime = System.currentTimeMillis();
      if (currentTime - lastRefresh >= 100L)
      {
        lastRefresh = currentTime;
        doRefresh();
      }
    }
  }
  
  public abstract void setRefreshRate(int paramInt);
  
  public abstract int getRefreshRate();
  
  protected abstract boolean checkRefresh();
  
  protected abstract void doRefresh();
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.AbstractSamplerSupport.Refresher
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.core.ui.components.DataViewComponent.DetailsView;
import java.util.Timer;
import org.netbeans.lib.profiler.common.ProfilingSettings;

public abstract class AbstractSamplerSupport
{
  public abstract DataViewComponent.DetailsView[] getDetailsView();
  
  public abstract boolean startSampling(ProfilingSettings paramProfilingSettings, int paramInt1, int paramInt2);
  
  public abstract void stopSampling();
  
  public abstract void terminate();
  
  protected abstract Timer getTimer();
  
  public static abstract class Refresher
  {
    private static final long REFRESH_THRESHOLD = 100L;
    private long lastRefresh;
    
    public final synchronized void refresh()
    {
      if (checkRefresh())
      {
        long currentTime = System.currentTimeMillis();
        if (currentTime - lastRefresh >= 100L)
        {
          lastRefresh = currentTime;
          doRefresh();
        }
      }
    }
    
    public abstract void setRefreshRate(int paramInt);
    
    public abstract int getRefreshRate();
    
    protected abstract boolean checkRefresh();
    
    protected abstract void doRefresh();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.AbstractSamplerSupport
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;

class ApplicationSamplerView$1
  extends ApplicationSamplerView.ApplicationListener
{
  ApplicationSamplerView$1(ApplicationSamplerView paramApplicationSamplerView)
  {
    super(null);
  }
  
  public void dataRemoved(Application application)
  {
    ApplicationSamplerView.access$100(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.ApplicationSamplerView.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasupport.DataRemovedListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

abstract class ApplicationSamplerView$ApplicationListener
  implements DataRemovedListener<Application>, PropertyChangeListener
{
  public abstract void dataRemoved(Application paramApplication);
  
  public void propertyChange(PropertyChangeEvent evt)
  {
    dataRemoved(null);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.ApplicationSamplerView.ApplicationListener
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
null
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.ui.DataSourceView;
import com.sun.tools.visualvm.core.ui.DataSourceViewProvider;
import com.sun.tools.visualvm.core.ui.DataSourceViewsManager;

final class ApplicationSamplerViewProvider
  extends DataSourceViewProvider<Application>
{
  protected boolean supportsViewFor(Application application)
  {
    return true;
  }
  
  protected DataSourceView createView(Application application)
  {
    return new ApplicationSamplerView(application);
  }
  
  DataSourceView view(Application application)
  {
    return super.getView(application);
  }
  
  void initialize()
  {
    DataSourceViewsManager.sharedInstance().addViewProvider(this, Application.class);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.ApplicationSamplerViewProvider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.modules.ModuleInstall;

final class Installer
  extends ModuleInstall
{
  public void restored()
  {
    SamplerSupport.getInstance();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.Installer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.ui.actions.SingleDataSourceAction;
import java.awt.event.ActionEvent;
import org.openide.util.NbBundle;

final class SampleApplicationAction
  extends SingleDataSourceAction<Application>
{
  private static SampleApplicationAction instance;
  
  public static synchronized SampleApplicationAction instance()
  {
    if (instance == null) {
      instance = new SampleApplicationAction();
    }
    return instance;
  }
  
  protected void actionPerformed(Application application, ActionEvent actionEvent)
  {
    SamplerSupport.getInstance().selectSamplerView(application);
  }
  
  protected boolean isEnabled(Application application)
  {
    return true;
  }
  
  private SampleApplicationAction()
  {
    super(Application.class);
    putValue("Name", NbBundle.getMessage(SampleApplicationAction.class, "MSG_Sample"));
    putValue("ShortDescription", NbBundle.getMessage(SampleApplicationAction.class, "DESCR_Sample"));
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SampleApplicationAction
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.profiling.presets.PresetSelector;
import com.sun.tools.visualvm.sampler.cpu.CPUSettingsSupport;
import com.sun.tools.visualvm.sampler.memory.MemorySettingsSupport;

class SamplerImpl$1
  extends CPUSettingsSupport
{
  SamplerImpl$1(SamplerImpl paramSamplerImpl) {}
  
  public boolean presetValid()
  {
    return (SamplerImpl.access$000(this$0).settingsValid()) && (SamplerImpl.access$100(this$0).settingsValid());
  }
  
  public PresetSelector createSelector(Runnable presetSynchronizer)
  {
    return SamplerImpl.access$200(this$0, presetSynchronizer);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

class SamplerImpl$10
  implements Runnable
{
  SamplerImpl$10(SamplerImpl paramSamplerImpl) {}
  
  public void run()
  {
    SamplerImpl.access$1200(this$0).stopSampling();
    SamplerImpl.access$1100(this$0, SamplerImpl.State.INACTIVE);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.10
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

class SamplerImpl$11$1
  implements Runnable
{
  SamplerImpl$11$1(SamplerImpl.11 param11, String paramString) {}
  
  public void run()
  {
    SamplerImpl.access$1402(this$1.this$0, val$status);
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot.NoDataAvailableException;
import org.netbeans.lib.profiler.results.cpu.StackTraceSnapshotBuilder;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;

class SamplerImpl$11$2$1
  implements Runnable
{
  SamplerImpl$11$2$1(SamplerImpl.11.2 param2, StackTraceSnapshotBuilder paramStackTraceSnapshotBuilder, boolean paramBoolean) {}
  
  public void run()
  {
    LoadedSnapshot ls = null;
    DataOutputStream dos = null;
    try
    {
      long time = System.currentTimeMillis();
      CPUResultsSnapshot snapshot = val$builderF.createSnapshot(time);
      ls = new LoadedSnapshot(snapshot, ProfilingSettingsPresets.createCPUPreset(), null);
      File file = Utils.getUniqueFile(SamplerImpl.access$1300(this$2.this$1.this$0).getStorage().getDirectory(), Long.toString(time), ".nps");
      
      dos = new DataOutputStream(new FileOutputStream(file));
      ls.save(dos);
      ls.setFile(file);
      ls.setSaved(true);
      try
      {
        if (dos != null) {
          dos.close();
        }
      }
      catch (IOException e)
      {
        SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
      }
      if (ls == null) {
        return;
      }
    }
    catch (CPUResultsSnapshot.NoDataAvailableException e)
    {
      DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(SamplerImpl.class, "MSG_No_save_data_cpu"), 2));
    }
    catch (Throwable t)
    {
      SamplerImpl.access$1600().log(Level.WARNING, "Failed to save profiler snapshot for " + SamplerImpl.access$1300(this$2.this$1.this$0), t);
    }
    finally
    {
      try
      {
        if (dos != null) {
          dos.close();
        }
      }
      catch (IOException e)
      {
        SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
      }
    }
    ProfilerSnapshot ps = new ProfilerSnapshot(ls, SamplerImpl.access$1300(this$2.this$1.this$0));
    SamplerImpl.access$1300(this$2.this$1.this$0).getRepository().addDataSource(ps);
    if (val$openView) {
      DataSourceWindowManager.sharedInstance().openDataSource(ps);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.2.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.SnapshotDumper;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot.NoDataAvailableException;
import org.netbeans.lib.profiler.results.cpu.StackTraceSnapshotBuilder;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;
import org.openide.util.RequestProcessor;

class SamplerImpl$11$2
  extends CPUSamplerSupport.SnapshotDumper
{
  SamplerImpl$11$2(SamplerImpl.11 param11) {}
  
  public void takeSnapshot(final boolean openView)
  {
    final StackTraceSnapshotBuilder builderF = builder;
    RequestProcessor.getDefault().post(new Runnable()
    {
      public void run()
      {
        LoadedSnapshot ls = null;
        DataOutputStream dos = null;
        try
        {
          long time = System.currentTimeMillis();
          CPUResultsSnapshot snapshot = builderF.createSnapshot(time);
          ls = new LoadedSnapshot(snapshot, ProfilingSettingsPresets.createCPUPreset(), null);
          File file = Utils.getUniqueFile(SamplerImpl.access$1300(this$1.this$0).getStorage().getDirectory(), Long.toString(time), ".nps");
          
          dos = new DataOutputStream(new FileOutputStream(file));
          ls.save(dos);
          ls.setFile(file);
          ls.setSaved(true);
          try
          {
            if (dos != null) {
              dos.close();
            }
          }
          catch (IOException e)
          {
            SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
          }
          if (ls == null) {
            return;
          }
        }
        catch (CPUResultsSnapshot.NoDataAvailableException e)
        {
          DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(SamplerImpl.class, "MSG_No_save_data_cpu"), 2));
        }
        catch (Throwable t)
        {
          SamplerImpl.access$1600().log(Level.WARNING, "Failed to save profiler snapshot for " + SamplerImpl.access$1300(this$1.this$0), t);
        }
        finally
        {
          try
          {
            if (dos != null) {
              dos.close();
            }
          }
          catch (IOException e)
          {
            SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
          }
        }
        ProfilerSnapshot ps = new ProfilerSnapshot(ls, SamplerImpl.access$1300(this$1.this$0));
        SamplerImpl.access$1300(this$1.this$0).getRepository().addDataSource(ps);
        if (openView) {
          DataSourceWindowManager.sharedInstance().openDataSource(ps);
        }
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.ThreadDumper;
import com.sun.tools.visualvm.threaddump.ThreadDumpSupport;

class SamplerImpl$11$3
  extends CPUSamplerSupport.ThreadDumper
{
  SamplerImpl$11$3(SamplerImpl.11 param11, ThreadDumpSupport paramThreadDumpSupport) {}
  
  public void takeThreadDump(boolean openView)
  {
    val$tds.takeThreadDump(SamplerImpl.access$1300(this$1.this$0), openView);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.SnapshotDumper;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.ThreadDumper;
import com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider;
import java.util.Timer;

class SamplerImpl$11$4
  extends CPUSamplerSupport
{
  SamplerImpl$11$4(SamplerImpl.11 param11, ThreadInfoProvider x0, CPUSamplerSupport.SnapshotDumper x1, CPUSamplerSupport.ThreadDumper x2)
  {
    super(x0, x1, x2);
  }
  
  protected Timer getTimer()
  {
    return SamplerImpl.access$1700(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$11$5
  implements Runnable
{
  SamplerImpl$11$5(SamplerImpl.11 param11, String paramString) {}
  
  public void run()
  {
    String avail = val$noThreadDump == null ? NbBundle.getMessage(SamplerImpl.class, "MSG_Available") : NbBundle.getMessage(SamplerImpl.class, "MSG_Available_details", val$noThreadDump);
    
    SamplerImpl.access$1402(this$1.this$0, avail + " " + NbBundle.getMessage(SamplerImpl.class, "MSG_Press_cpu"));
    SamplerImpl.access$1802(this$1.this$0, true);
    SamplerImpl.access$1500(this$1.this$0);
    SamplerImpl.access$800(this$1.this$0);
    SamplerImpl.access$700(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.SnapshotDumper;
import com.sun.tools.visualvm.sampler.cpu.CPUSamplerSupport.ThreadDumper;
import com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider;
import com.sun.tools.visualvm.threaddump.ThreadDumpSupport;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Timer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.SwingUtilities;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot;
import org.netbeans.lib.profiler.results.cpu.CPUResultsSnapshot.NoDataAvailableException;
import org.netbeans.lib.profiler.results.cpu.StackTraceSnapshotBuilder;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;
import org.openide.util.RequestProcessor;

class SamplerImpl$11
  implements Runnable
{
  SamplerImpl$11(SamplerImpl paramSamplerImpl) {}
  
  public void run()
  {
    ThreadInfoProvider ti = new ThreadInfoProvider(SamplerImpl.access$1300(this$0));
    final String status = ti.getStatus();
    if (status != null)
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1402(this$0, status);
          SamplerImpl.access$1500(this$0);
        }
      });
      return;
    }
    CPUSamplerSupport.SnapshotDumper snapshotDumper = new CPUSamplerSupport.SnapshotDumper()
    {
      public void takeSnapshot(final boolean openView)
      {
        final StackTraceSnapshotBuilder builderF = builder;
        RequestProcessor.getDefault().post(new Runnable()
        {
          public void run()
          {
            LoadedSnapshot ls = null;
            DataOutputStream dos = null;
            try
            {
              long time = System.currentTimeMillis();
              CPUResultsSnapshot snapshot = builderF.createSnapshot(time);
              ls = new LoadedSnapshot(snapshot, ProfilingSettingsPresets.createCPUPreset(), null);
              File file = Utils.getUniqueFile(SamplerImpl.access$1300(this$0).getStorage().getDirectory(), Long.toString(time), ".nps");
              
              dos = new DataOutputStream(new FileOutputStream(file));
              ls.save(dos);
              ls.setFile(file);
              ls.setSaved(true);
              try
              {
                if (dos != null) {
                  dos.close();
                }
              }
              catch (IOException e)
              {
                SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
              }
              if (ls == null) {
                return;
              }
            }
            catch (CPUResultsSnapshot.NoDataAvailableException e)
            {
              DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(SamplerImpl.class, "MSG_No_save_data_cpu"), 2));
            }
            catch (Throwable t)
            {
              SamplerImpl.access$1600().log(Level.WARNING, "Failed to save profiler snapshot for " + SamplerImpl.access$1300(this$0), t);
            }
            finally
            {
              try
              {
                if (dos != null) {
                  dos.close();
                }
              }
              catch (IOException e)
              {
                SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
              }
            }
            ProfilerSnapshot ps = new ProfilerSnapshot(ls, SamplerImpl.access$1300(this$0));
            SamplerImpl.access$1300(this$0).getRepository().addDataSource(ps);
            if (openView) {
              DataSourceWindowManager.sharedInstance().openDataSource(ps);
            }
          }
        });
      }
    };
    final ThreadDumpSupport tds = ThreadDumpSupport.getInstance();
    final String noThreadDump = tds.supportsThreadDump(SamplerImpl.access$1300(this$0)) ? null : NbBundle.getMessage(SamplerImpl.class, "MSG_Thread_dump_unsupported");
    
    CPUSamplerSupport.ThreadDumper threadDumper = noThreadDump != null ? null : new CPUSamplerSupport.ThreadDumper()
    {
      public void takeThreadDump(boolean openView)
      {
        tds.takeThreadDump(SamplerImpl.access$1300(this$0), openView);
      }
    };
    SamplerImpl.access$902(this$0, new CPUSamplerSupport(ti, snapshotDumper, threadDumper)
    {
      protected Timer getTimer()
      {
        return SamplerImpl.access$1700(this$0);
      }
    });
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        String avail = noThreadDump == null ? NbBundle.getMessage(SamplerImpl.class, "MSG_Available") : NbBundle.getMessage(SamplerImpl.class, "MSG_Available_details", noThreadDump);
        
        SamplerImpl.access$1402(this$0, avail + " " + NbBundle.getMessage(SamplerImpl.class, "MSG_Press_cpu"));
        SamplerImpl.access$1802(this$0, true);
        SamplerImpl.access$1500(this$0);
        SamplerImpl.access$800(this$0);
        SamplerImpl.access$700(this$0);
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.11
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$1
  implements Runnable
{
  SamplerImpl$12$1(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$10
  implements Runnable
{
  SamplerImpl$12$10(SamplerImpl.12 param12, String paramString1, String paramString2) {}
  
  public void run()
  {
    String avail = NbBundle.getMessage(SamplerImpl.class, "MSG_Available");
    if ((val$noPerformGC != null) || (val$noHeapDump != null)) {
      if (val$noPerformGC == null) {
        avail = NbBundle.getMessage(SamplerImpl.class, "MSG_Available_details", val$noHeapDump);
      } else if (val$noHeapDump == null) {
        avail = NbBundle.getMessage(SamplerImpl.class, "MSG_Available_details", val$noPerformGC);
      } else {
        avail = NbBundle.getMessage(SamplerImpl.class, "MSG_Available_details2", val$noHeapDump, val$noPerformGC);
      }
    }
    SamplerImpl.access$1902(this$1.this$0, avail + " " + NbBundle.getMessage(SamplerImpl.class, "MSG_Press_mem"));
    
    SamplerImpl.access$2002(this$1.this$0, true);
    SamplerImpl.access$1500(this$1.this$0);
    SamplerImpl.access$800(this$1.this$0);
    SamplerImpl.access$700(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.10
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$2
  implements Runnable
{
  SamplerImpl$12$2(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_remote"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$3
  implements Runnable
{
  SamplerImpl$12$3(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_connect_jdk"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$4
  implements Runnable
{
  SamplerImpl$12$4(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_connect_log"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$5
  implements Runnable
{
  SamplerImpl$12$5(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_read_log"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import org.openide.util.NbBundle;

class SamplerImpl$12$6
  implements Runnable
{
  SamplerImpl$12$6(SamplerImpl.12 param12) {}
  
  public void run()
  {
    SamplerImpl.access$1902(this$1.this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_read_log"));
    
    SamplerImpl.access$1500(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.SnapshotDumper;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.memory.AllocMemoryResultsSnapshot;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;

class SamplerImpl$12$7$1
  implements Runnable
{
  SamplerImpl$12$7$1(SamplerImpl.12.7 param7, MemorySamplerSupport.SnapshotDumper paramSnapshotDumper, boolean paramBoolean) {}
  
  public void run()
  {
    LoadedSnapshot ls = null;
    DataOutputStream dos = null;
    try
    {
      long time = System.currentTimeMillis();
      AllocMemoryResultsSnapshot snapshot = val$dumper.createSnapshot(time);
      if (snapshot == null)
      {
        DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(SamplerImpl.class, "MSG_No_save_data_memory"), 2));
      }
      else
      {
        ls = new LoadedSnapshot(snapshot, ProfilingSettingsPresets.createMemoryPreset(), null);
        File file = Utils.getUniqueFile(SamplerImpl.access$1300(this$2.this$1.this$0).getStorage().getDirectory(), Long.toString(time), ".nps");
        
        dos = new DataOutputStream(new FileOutputStream(file));
        ls.save(dos);
        ls.setFile(file);
        ls.setSaved(true);
      }
      try
      {
        if (dos != null) {
          dos.close();
        }
      }
      catch (IOException e)
      {
        SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
      }
      if (ls == null) {
        return;
      }
    }
    catch (Throwable t)
    {
      SamplerImpl.access$1600().log(Level.WARNING, "Failed to save profiler snapshot for " + SamplerImpl.access$1300(this$2.this$1.this$0), t);
    }
    finally
    {
      try
      {
        if (dos != null) {
          dos.close();
        }
      }
      catch (IOException e)
      {
        SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
      }
    }
    ProfilerSnapshot ps = new ProfilerSnapshot(ls, SamplerImpl.access$1300(this$2.this$1.this$0));
    SamplerImpl.access$1300(this$2.this$1.this$0).getRepository().addDataSource(ps);
    if (val$openView) {
      DataSourceWindowManager.sharedInstance().openDataSource(ps);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.7.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.SnapshotDumper;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.memory.AllocMemoryResultsSnapshot;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;
import org.openide.util.RequestProcessor;

class SamplerImpl$12$7
  extends MemorySamplerSupport.SnapshotDumper
{
  SamplerImpl$12$7(SamplerImpl.12 param12) {}
  
  public void takeSnapshot(final boolean openView)
  {
    final MemorySamplerSupport.SnapshotDumper dumper = this;
    RequestProcessor.getDefault().post(new Runnable()
    {
      public void run()
      {
        LoadedSnapshot ls = null;
        DataOutputStream dos = null;
        try
        {
          long time = System.currentTimeMillis();
          AllocMemoryResultsSnapshot snapshot = dumper.createSnapshot(time);
          if (snapshot == null)
          {
            DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(NbBundle.getMessage(SamplerImpl.class, "MSG_No_save_data_memory"), 2));
          }
          else
          {
            ls = new LoadedSnapshot(snapshot, ProfilingSettingsPresets.createMemoryPreset(), null);
            File file = Utils.getUniqueFile(SamplerImpl.access$1300(this$1.this$0).getStorage().getDirectory(), Long.toString(time), ".nps");
            
            dos = new DataOutputStream(new FileOutputStream(file));
            ls.save(dos);
            ls.setFile(file);
            ls.setSaved(true);
          }
          try
          {
            if (dos != null) {
              dos.close();
            }
          }
          catch (IOException e)
          {
            SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
          }
          if (ls == null) {
            return;
          }
        }
        catch (Throwable t)
        {
          SamplerImpl.access$1600().log(Level.WARNING, "Failed to save profiler snapshot for " + SamplerImpl.access$1300(this$1.this$0), t);
        }
        finally
        {
          try
          {
            if (dos != null) {
              dos.close();
            }
          }
          catch (IOException e)
          {
            SamplerImpl.access$1600().log(Level.WARNING, "Problem closing output stream for  " + dos, e);
          }
        }
        ProfilerSnapshot ps = new ProfilerSnapshot(ls, SamplerImpl.access$1300(this$1.this$0));
        SamplerImpl.access$1300(this$1.this$0).getRepository().addDataSource(ps);
        if (openView) {
          DataSourceWindowManager.sharedInstance().openDataSource(ps);
        }
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.heapdump.HeapDumpSupport;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.HeapDumper;

class SamplerImpl$12$8
  extends MemorySamplerSupport.HeapDumper
{
  SamplerImpl$12$8(SamplerImpl.12 param12, boolean paramBoolean, HeapDumpSupport paramHeapDumpSupport) {}
  
  public void takeHeapDump(boolean openView)
  {
    if (val$local) {
      val$hds.takeHeapDump(SamplerImpl.access$1300(this$1.this$0), openView);
    } else {
      val$hds.takeRemoteHeapDump(SamplerImpl.access$1300(this$1.this$0), null, openView);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.HeapDumper;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.SnapshotDumper;
import com.sun.tools.visualvm.tools.attach.AttachModel;
import java.lang.management.MemoryMXBean;
import java.util.Timer;

class SamplerImpl$12$9
  extends MemorySamplerSupport
{
  SamplerImpl$12$9(SamplerImpl.12 param12, AttachModel x0, MemoryMXBean x1, MemorySamplerSupport.SnapshotDumper x2, MemorySamplerSupport.HeapDumper x3)
  {
    super(x0, x1, x2, x3);
  }
  
  protected Timer getTimer()
  {
    return SamplerImpl.access$1700(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.sampler.SamplerImpl.12.9
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.sampler;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.application.jvm.Jvm;
import com.sun.tools.visualvm.application.jvm.JvmFactory;
import com.sun.tools.visualvm.core.datasource.DataSourceContainer;
import com.sun.tools.visualvm.core.datasource.Storage;
import com.sun.tools.visualvm.core.datasupport.Utils;
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
import com.sun.tools.visualvm.heapdump.HeapDumpSupport;
import com.sun.tools.visualvm.profiling.snapshot.ProfilerSnapshot;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.HeapDumper;
import com.sun.tools.visualvm.sampler.memory.MemorySamplerSupport.SnapshotDumper;
import com.sun.tools.visualvm.tools.attach.AttachModel;
import com.sun.tools.visualvm.tools.attach.AttachModelFactory;
import com.sun.tools.visualvm.tools.jmx.JmxModel;
import com.sun.tools.visualvm.tools.jmx.JmxModel.ConnectionState;
import com.sun.tools.visualvm.tools.jmx.JmxModelFactory;
import com.sun.tools.visualvm.tools.jmx.JvmMXBeans;
import com.sun.tools.visualvm.tools.jmx.JvmMXBeansFactory;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.management.MemoryMXBean;
import java.util.Timer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.SwingUtilities;
import org.netbeans.lib.profiler.common.ProfilingSettingsPresets;
import org.netbeans.lib.profiler.results.memory.AllocMemoryResultsSnapshot;
import org.netbeans.modules.profiler.LoadedSnapshot;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor.Message;
import org.openide.util.NbBundle;
import org.openide.util.RequestProcessor;

class SamplerImpl$12
  implements Runnable
{
  SamplerImpl$12(SamplerImpl paramSamplerImpl) {}
  
  public void run()
  {
    if (SamplerImpl.access$1300(this$0).getState() != 1)
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable"));
          
          SamplerImpl.access$1500(this$0);
        }
      });
      return;
    }
    if (!SamplerImpl.access$1300(this$0).isLocalApplication())
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_remote"));
          
          SamplerImpl.access$1500(this$0);
        }
      });
      return;
    }
    if (!JvmFactory.getJVMFor(SamplerImpl.access$1300(this$0)).isAttachable())
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_connect_jdk"));
          
          SamplerImpl.access$1500(this$0);
        }
      });
      return;
    }
    AttachModel attachModel = AttachModelFactory.getAttachFor(SamplerImpl.access$1300(this$0));
    if (attachModel == null)
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_connect_log"));
          
          SamplerImpl.access$1500(this$0);
        }
      });
      SamplerImpl.access$1600().log(Level.WARNING, "AttachModelFactory.getAttachFor(application) returns null for " + SamplerImpl.access$1300(this$0));
      return;
    }
    try
    {
      if (attachModel.takeHeapHistogram() == null)
      {
        SwingUtilities.invokeLater(new Runnable()
        {
          public void run()
          {
            SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_read_log"));
            
            SamplerImpl.access$1500(this$0);
          }
        });
        SamplerImpl.access$1600().log(Level.WARNING, "attachModel.takeHeapHistogram() returns null for " + SamplerImpl.access$1300(this$0));
        return;
      }
    }
    catch (Throwable t)
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          SamplerImpl.access$1902(this$0, NbBundle.getMessage(SamplerImpl.class, "MSG_Unavailable_read_log"));
          
          SamplerImpl.access$1500(this$0);
        }
      });
      SamplerImpl.access$1600().log(Level.WARNING, "attachModel.takeHeapHistogram() throws Throwable for " + SamplerImpl.access$1300(this$0), t);
      return;
    }
 
1 2 3 4 5

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd