001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
005 *  You may not use this file except in compliance with the License. You
006 *  may obtain a copy of the License at
007 *
008 *      http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package org.mmtk.utility.gcspy;
014
015/**
016 * This class provides constants used by the GCspy framweork.
017 * These must correspond with values in gcspy_stream.h
018 * <table>
019      <caption>Presentation</caption>
020      <tr><td>PRESENTATION_PLAIN</td>      <td>presented as is</td>
021      <tr><td>PRESENTATION_PLUS</td>       <td>as max+ if value exceeds max else as is</td>
022      <tr><td>PRESENTATION_MAX_VAR</td>    <td>ditto but takes max value from a specified stream</td>
023      <tr><td>PRESENTATION_PERCENT</td>    <td>as value (percent)</td>
024      <tr><td>PRESENTATION_PERCENT_VAR</td><td>ditto but takes max value from a specified stream</td>
025      <tr><td>PRESENTATION_ENUM </td>      <td>chooses from an enumeration</td>
026   </table>
027   <table>
028      <caption>Paint style</caption>
029      <tr><td>PAINT_STYLE_PLAIN</td>       <td>Paints as is</td>
030      <tr><td>PAINT_STYLE_ZERO</td>        <td>ditto but treats zero values specially</td>
031   </table>
032   <table>
033      <caption>Data types</caption>
034      <tr><td>BYTE_TYPE</td>  <td>stream of bytes</td>
035      <tr><td>SHORT_TYPE</td> <td>stream of shorts</td>
036      <tr><td>INT_TYPE</td>   <td>stream of ints</td>
037   </table>
038 * StreamConstants
039 */
040
041public final class StreamConstants {
042
043  public static final int NAME_LEN = 40;
044  public static final int PRESENTATION_PLAIN       = 0;
045  public static final int PRESENTATION_PLUS        = 1;
046  public static final int PRESENTATION_MAX_VAR     = 2;
047  public static final int PRESENTATION_PERCENT     = 3;
048  public static final int PRESENTATION_PERCENT_VAR = 4;
049  public static final int PRESENTATION_ENUM        = 5;
050
051  public static final int PAINT_STYLE_PLAIN = 0;
052  public static final int PAINT_STYLE_ZERO  = 1;
053
054  public static final int BYTE_TYPE  = 0;
055  public static final int SHORT_TYPE = 1;
056  public static final int INT_TYPE   = 2;
057
058  public static final int ENUM_MAX_LEN = 20;
059  public static final int ENUM_MAX_NUM = 5;
060
061  private StreamConstants() {
062    // prevent instantiation
063  }
064}