All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.adoptopenjdk.jitwatch.jarscan.nextinstruction.NextInstructionCountList Maven / Gradle / Ivy

Go to download

A Maven plugin that scans the project artifact and its dependencies for methods that cannot be inlined by the JIT compiler. It uses the JarScan utility from the JITWatch project to do that. See https://github.com/AdoptOpenJDK/jitwatch .

The newest version!
/*
 * Copyright (c) 2013-2016 Chris Newland.
 * Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
 * Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
 */
package org.adoptopenjdk.jitwatch.jarscan.nextinstruction;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class NextInstructionCountList
{
	private List list = new ArrayList<>();

	public List getList()
	{
		Collections.sort(list, new Comparator()
		{
			@Override
			public int compare(NextInstructionCount o1, NextInstructionCount o2)
			{
				return Integer.compare(o2.getCount(), o1.getCount());
			}
		});

		return list;
	}

	public void add(NextInstructionCount nextBytecode)
	{
		list.add(nextBytecode);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy