12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 25 package org.graalvm.compiler.replacements; 26 27 /** 28 * A histogram that can (only) be {@linkplain #inc(long) incremented} from within a snippet for 29 * gathering snippet specific metrics. 30 */ 31 public final class SnippetIntegerHistogram { 32 private final SnippetCounter.Group group; 33 private final String name; 34 35 private final SnippetCounter counter0; 36 private final SnippetCounter counter1; 37 private final SnippetCounter counter2; 38 private final SnippetCounter counter3; 39 private final SnippetCounter counter4; 40 private final SnippetCounter counter5; 41 private final SnippetCounter counter6; 42 private final SnippetCounter counter7; 43 private final SnippetCounter counter8; 44 private final SnippetCounter counter9; 45 private final SnippetCounter counter10; 46 47 private final int counter0UpperBound; 48 private final int counter1UpperBound; 49 private final int counter2UpperBound; 50 private final int counter3UpperBound; 51 private final int counter4UpperBound; | 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 25 package org.graalvm.compiler.replacements; 26 27 /** 28 * A histogram that can (only) be {@linkplain #inc(long) incremented} from within a snippet for 29 * gathering snippet specific metrics. 30 */ 31 public final class SnippetIntegerHistogram { 32 public static final SnippetIntegerHistogram DISABLED_COUNTER = new SnippetIntegerHistogram(null, 1, "Disabled", "Disabled"); 33 34 private final SnippetCounter.Group group; 35 private final String name; 36 37 private final SnippetCounter counter0; 38 private final SnippetCounter counter1; 39 private final SnippetCounter counter2; 40 private final SnippetCounter counter3; 41 private final SnippetCounter counter4; 42 private final SnippetCounter counter5; 43 private final SnippetCounter counter6; 44 private final SnippetCounter counter7; 45 private final SnippetCounter counter8; 46 private final SnippetCounter counter9; 47 private final SnippetCounter counter10; 48 49 private final int counter0UpperBound; 50 private final int counter1UpperBound; 51 private final int counter2UpperBound; 52 private final int counter3UpperBound; 53 private final int counter4UpperBound; |