< prev index next >

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/GarbageCollectionsPage.java

Print this page




  47 import java.util.Map;
  48 import java.util.Set;
  49 import java.util.function.Predicate;
  50 import java.util.function.Supplier;
  51 import java.util.stream.Collectors;
  52 import java.util.stream.Stream;
  53 
  54 import org.eclipse.jface.action.IAction;
  55 import org.eclipse.jface.resource.ImageDescriptor;
  56 import org.eclipse.jface.viewers.ArrayContentProvider;
  57 import org.eclipse.jface.viewers.CheckboxTableViewer;
  58 import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
  59 import org.eclipse.jface.viewers.IStructuredSelection;
  60 import org.eclipse.jface.viewers.TableViewer;
  61 import org.eclipse.swt.SWT;
  62 import org.eclipse.swt.custom.CTabFolder;
  63 import org.eclipse.swt.custom.SashForm;
  64 import org.eclipse.swt.layout.GridData;
  65 import org.eclipse.swt.layout.GridLayout;
  66 import org.eclipse.swt.widgets.Composite;
  67 import org.eclipse.swt.widgets.Control;
  68 import org.eclipse.ui.forms.widgets.Form;
  69 import org.eclipse.ui.forms.widgets.FormToolkit;
  70 
  71 import org.openjdk.jmc.common.IMCThread;
  72 import org.openjdk.jmc.common.IState;
  73 import org.openjdk.jmc.common.IWritableState;
  74 import org.openjdk.jmc.common.item.Aggregators;
  75 import org.openjdk.jmc.common.item.IAggregator;
  76 import org.openjdk.jmc.common.item.IAttribute;
  77 import org.openjdk.jmc.common.item.IItem;
  78 import org.openjdk.jmc.common.item.IItemCollection;
  79 import org.openjdk.jmc.common.item.IItemFilter;
  80 import org.openjdk.jmc.common.item.IItemIterable;
  81 import org.openjdk.jmc.common.item.IItemQuery;
  82 import org.openjdk.jmc.common.item.IMemberAccessor;
  83 import org.openjdk.jmc.common.item.IType;
  84 import org.openjdk.jmc.common.item.ItemFilters;
  85 import org.openjdk.jmc.common.item.ItemQueryBuilder;
  86 import org.openjdk.jmc.common.item.ItemToolkit;
  87 import org.openjdk.jmc.common.unit.IQuantity;


 144 
 145                 @Override
 146                 public ImageDescriptor getImageDescriptor(IState state) {
 147                         return FlightRecorderUI.getDefault().getMCImageDescriptor(ImageConstants.PAGE_GC);
 148                 }
 149 
 150                 @Override
 151                 public String[] getTopics(IState state) {
 152                         return new String[] {JfrRuleTopics.GARBAGE_COLLECTION_TOPIC};
 153                 }
 154 
 155                 @Override
 156                 public IDisplayablePage createPage(IPageDefinition dpd, StreamModel items, IPageContainer editor) {
 157                         return new GarbageCollectionsPage(dpd, items, editor);
 158                 }
 159         }
 160 
 161         private static final ReferenceStatisticsType[] REF_TYPE = ReferenceStatisticsType.values();
 162         private static final String SASH = "sash"; //$NON-NLS-1$
 163         private static final String TABLE_SASH = "tableSash"; //$NON-NLS-1$
 164         private static final String THREAD_LANES = "threadLane"; // $NON-NLS-1$
 165         private static final String GCS = "gcs"; //$NON-NLS-1$
 166         private static final String CHART = "chart"; //$NON-NLS-1$
 167         private static final String PHASE_TABLE_FILTER = "phaseTableFilter"; //$NON-NLS-1$
 168         private static final String GC_TABLE_FILTER = "gcTableFilter"; //$NON-NLS-1$
 169         private static final String METASPACE_TABLE_FILTER = "metaspaceTableFilter"; //$NON-NLS-1$
 170         private static final String PHASE_LIST = "phaseList"; //$NON-NLS-1$
 171         private static final String METASPACE_LIST = "metaspaceList"; //$NON-NLS-1$
 172         private static final String ACTIVITY_LANES_ID = "threadActivityLanes"; //$NON-NLS-1$
 173 
 174         private final static Color LONGEST_PAUSE_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter();
 175         private final static Color SUM_OF_PAUSES_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter().brighter();
 176 
 177         private final static IItemQuery METASPACE_SUMMARY = ItemQueryBuilder.fromWhere(JdkFilters.METASPACE_SUMMARY)
 178                         .select(JdkAttributes.GC_METASPACE_USED, JdkAttributes.GC_METASPACE_CAPACITY,
 179                                         JdkAttributes.GC_METASPACE_COMMITTED, JdkAttributes.GC_METASPACE_RESERVED)
 180                         .build();
 181 
 182         private static class GC {
 183                 final IType<IItem> type;
 184                 final IItem gcItem;




  47 import java.util.Map;
  48 import java.util.Set;
  49 import java.util.function.Predicate;
  50 import java.util.function.Supplier;
  51 import java.util.stream.Collectors;
  52 import java.util.stream.Stream;
  53 
  54 import org.eclipse.jface.action.IAction;
  55 import org.eclipse.jface.resource.ImageDescriptor;
  56 import org.eclipse.jface.viewers.ArrayContentProvider;
  57 import org.eclipse.jface.viewers.CheckboxTableViewer;
  58 import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
  59 import org.eclipse.jface.viewers.IStructuredSelection;
  60 import org.eclipse.jface.viewers.TableViewer;
  61 import org.eclipse.swt.SWT;
  62 import org.eclipse.swt.custom.CTabFolder;
  63 import org.eclipse.swt.custom.SashForm;
  64 import org.eclipse.swt.layout.GridData;
  65 import org.eclipse.swt.layout.GridLayout;
  66 import org.eclipse.swt.widgets.Composite;

  67 import org.eclipse.ui.forms.widgets.Form;
  68 import org.eclipse.ui.forms.widgets.FormToolkit;
  69 
  70 import org.openjdk.jmc.common.IMCThread;
  71 import org.openjdk.jmc.common.IState;
  72 import org.openjdk.jmc.common.IWritableState;
  73 import org.openjdk.jmc.common.item.Aggregators;
  74 import org.openjdk.jmc.common.item.IAggregator;
  75 import org.openjdk.jmc.common.item.IAttribute;
  76 import org.openjdk.jmc.common.item.IItem;
  77 import org.openjdk.jmc.common.item.IItemCollection;
  78 import org.openjdk.jmc.common.item.IItemFilter;
  79 import org.openjdk.jmc.common.item.IItemIterable;
  80 import org.openjdk.jmc.common.item.IItemQuery;
  81 import org.openjdk.jmc.common.item.IMemberAccessor;
  82 import org.openjdk.jmc.common.item.IType;
  83 import org.openjdk.jmc.common.item.ItemFilters;
  84 import org.openjdk.jmc.common.item.ItemQueryBuilder;
  85 import org.openjdk.jmc.common.item.ItemToolkit;
  86 import org.openjdk.jmc.common.unit.IQuantity;


 143 
 144                 @Override
 145                 public ImageDescriptor getImageDescriptor(IState state) {
 146                         return FlightRecorderUI.getDefault().getMCImageDescriptor(ImageConstants.PAGE_GC);
 147                 }
 148 
 149                 @Override
 150                 public String[] getTopics(IState state) {
 151                         return new String[] {JfrRuleTopics.GARBAGE_COLLECTION_TOPIC};
 152                 }
 153 
 154                 @Override
 155                 public IDisplayablePage createPage(IPageDefinition dpd, StreamModel items, IPageContainer editor) {
 156                         return new GarbageCollectionsPage(dpd, items, editor);
 157                 }
 158         }
 159 
 160         private static final ReferenceStatisticsType[] REF_TYPE = ReferenceStatisticsType.values();
 161         private static final String SASH = "sash"; //$NON-NLS-1$
 162         private static final String TABLE_SASH = "tableSash"; //$NON-NLS-1$
 163         private static final String THREAD_LANES = "threadLane"; //$NON-NLS-1$
 164         private static final String GCS = "gcs"; //$NON-NLS-1$
 165         private static final String CHART = "chart"; //$NON-NLS-1$
 166         private static final String PHASE_TABLE_FILTER = "phaseTableFilter"; //$NON-NLS-1$
 167         private static final String GC_TABLE_FILTER = "gcTableFilter"; //$NON-NLS-1$
 168         private static final String METASPACE_TABLE_FILTER = "metaspaceTableFilter"; //$NON-NLS-1$
 169         private static final String PHASE_LIST = "phaseList"; //$NON-NLS-1$
 170         private static final String METASPACE_LIST = "metaspaceList"; //$NON-NLS-1$
 171         private static final String ACTIVITY_LANES_ID = "threadActivityLanes"; //$NON-NLS-1$
 172 
 173         private final static Color LONGEST_PAUSE_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter();
 174         private final static Color SUM_OF_PAUSES_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter().brighter();
 175 
 176         private final static IItemQuery METASPACE_SUMMARY = ItemQueryBuilder.fromWhere(JdkFilters.METASPACE_SUMMARY)
 177                         .select(JdkAttributes.GC_METASPACE_USED, JdkAttributes.GC_METASPACE_CAPACITY,
 178                                         JdkAttributes.GC_METASPACE_COMMITTED, JdkAttributes.GC_METASPACE_RESERVED)
 179                         .build();
 180 
 181         private static class GC {
 182                 final IType<IItem> type;
 183                 final IItem gcItem;


< prev index next >