Mercurial > hg > graal-compiler
changeset 18888:203618cfd638
added Fingerprint constructor that takes a list of events
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 20 Jan 2015 23:15:49 +0100 |
parents | 765bc32a4311 |
children | 65e1a9c42628 |
files | graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Fingerprint.java |
diffstat | 1 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Fingerprint.java Tue Jan 20 23:14:52 2015 +0100 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Fingerprint.java Tue Jan 20 23:15:49 2015 +0100 @@ -30,7 +30,7 @@ */ public class Fingerprint implements AutoCloseable { - private static final String ENABLED_PROPERTY_NAME = "graal.fingerprint"; + public static final String ENABLED_PROPERTY_NAME = "graal.fingerprint"; /** * Determines whether fingerprinting is enabled. This is set by the @@ -54,11 +54,24 @@ /** * Creates an object to verify execution matches a given fingerprint. * + * @param toVerifyAgainst the fingerprint events to verify against + */ + public Fingerprint(List<String> toVerifyAgainst) { + this.events = toVerifyAgainst; + index = 0; + } + + /** + * Creates an object to verify execution matches a given fingerprint. + * * @param toVerifyAgainst the fingerprint to verify against */ public Fingerprint(Fingerprint toVerifyAgainst) { - this.events = toVerifyAgainst.events; - index = 0; + this(toVerifyAgainst.events); + } + + public Collection<String> getEvents() { + return Collections.unmodifiableCollection(events); } /**